更新项目人员

OpenAPI 契约

方法
PATCH
路径
/api/v1/projects/{id}/people/{grantId}
认证
jwtBearer (bearer)
响应状态
200 400 401 403 404 409 429 500
请求与响应 Schema
JSON
{
  "requestBody": {
    "application/json": {
      "$ref": "#/components/schemas/UpdateProjectGrantRequest"
    }
  },
  "responses": {
    "200": {
      "description": "Project person updated",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ProjectGrantResponse"
        }
      }
    },
    "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 project or build was not found",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    },
    "409": {
      "description": "Request conflicts with current project state",
      "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"
        }
      }
    }
  }
}

PATCH /api/v1/projects/{id}/people/{grantId} 仅限 JWT,并且需要项目管理能力。提交角色:ADMIN、MAINTAINER、BUILDER、VIEWER 或 ARTIFACT_CONSUMER。该授权必须属于路由中的项目。

服务拒绝降级最后一个直接 ADMIN 授权。授权不存在或属于其他项目时会报告未找到。

json
{"role":"MAINTAINER"}