更新项目访问设置
OpenAPI 契约
- 方法
- PATCH
- 路径
/api/v1/projects/{id}/access- 认证
- jwtBearer (bearer)
- 响应状态
- 200 400 401 403 404 409 429 500
请求与响应 Schema
JSON
{
"requestBody": {
"application/json": {
"$ref": "#/components/schemas/UpdateProjectAccessRequest"
}
},
"responses": {
"200": {
"description": "Project access updated",
"content": {
"application/json": {
"$ref": "#/components/schemas/ProjectAccessResponse"
}
}
},
"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}/access 仅限 JWT,并且需要项目管理能力。提交 WORKSPACE 或 RESTRICTED 作为 accessMode;响应返回更新后的模式以及调用方的有效角色和能力。
更改模式不会创建或删除直接授权。RESTRICTED 项目仍只对适用的直接授权或获准的控制面管理可见。nfy_ 自动化密钥不能调用此操作。
json
{"accessMode":"RESTRICTED"}