获取项目访问设置
OpenAPI 契约
- 方法
- GET
- 路径
/api/v1/projects/{id}/access- 认证
- jwtBearer (bearer)
- 响应状态
- 200 400 401 403 404 409 429 500
请求与响应 Schema
JSON
{
"requestBody": {},
"responses": {
"200": {
"description": "Project access",
"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"
}
}
}
}
}GET /api/v1/projects/{id}/access 仅限 JWT。能够查看项目或管理其访问设置的调用方会得到项目 ID、工作区 ID、访问模式(WORKSPACE 或 RESTRICTED)、可解析时的有效项目角色,以及调用方的能力。
服务器会在每次请求时解析当前工作区成员关系和直接授权。超出调用方可见与管理边界的项目会被报告为未找到。nfy_ 自动化密钥不能调用此控制面操作。