Update a build hosting path

OpenAPI contract

Method
PATCH
Path
/api/v1/builds/{taskId}/hosting
Security
jwtBearer (bearer) OR automationKey (bearer)
Response status
200 400 401 403 404 429 500
Request and response schemas
JSON
{
  "requestBody": {
    "application/json": {
      "$ref": "#/components/schemas/UpdateHostingPathRequest"
    }
  },
  "responses": {
    "200": {
      "description": "Hosting updated",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/CompileTaskResponse"
        }
      }
    },
    "400": {
      "description": "Invalid request",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/RequestError"
        }
      }
    },
    "401": {
      "description": "Authentication required or invalid",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "403": {
      "description": "Authenticated but not permitted",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "404": {
      "description": "Requested build was not found",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    },
    "429": {
      "description": "HTTP rate limit or API-key NCU usage limit exceeded",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/RateLimitError"
        }
      }
    },
    "500": {
      "description": "Unexpected server error",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  }
}

Rename a build's hosted path using a JWT or an nfy_ key with build:write. A project task additionally requires effective build:write capability on its project; a legacy or ad-hoc task uses its exact-owner fallback. Send a URL-safe relative path, not a complete URL. Leading and trailing slashes are normalized; segments may use letters, digits, dots, underscores, and hyphens. Empty paths, traversal segments, backslashes, query/fragment characters, percent signs, colons, oversized paths, and collisions are rejected.

This endpoint changes the route address, not access. Retrieving a successful artifact at the new path still requires a dashboard JWT or an nfy_ key carrying artifact:read, plus effective artifact:output:read for a project task or exact ownership of a legacy/ad-hoc task. A difficult-to-guess path is not a permission control. The task response is the source of the current hostingPath.

json
{"hostingPath":"releases/example/native.jar"}