列出 API 密钥 scope

OpenAPI 契约

方法
GET
路径
/api/v1/api-keys/scopes
认证
jwtBearer (bearer)
响应状态
200 400 401 403 404 429 500
请求与响应 Schema
JSON
{
  "requestBody": {},
  "responses": {
    "200": {
      "description": "Supported API-key scopes",
      "content": {
        "application/json": {
          "items": {
            "$ref": "#/components/schemas/ApiKeyScopeResponse"
          },
          "type": "array"
        }
      }
    },
    "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 API key was not found",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    },
    "429": {
      "description": "Rate limit exceeded",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/SecurityError"
        }
      }
    },
    "500": {
      "description": "Unexpected server error",
      "content": {
        "application/json": {
          "$ref": "#/components/schemas/ApiError"
        }
      }
    }
  }
}

GET /api/v1/api-keys/scopes 仅接受 JWT。它返回 API 密钥编辑器所使用的固定权限目录。每项都包含机器可读的 scope、显示 label、说明、资源 group、访问类型(READ 或 WRITE)以及所有 impliedScopes。

当前目录包含 build:read、build:write、artifact:read、project:read、project:write、processor:read、processor:write 和 analytics:read。目前没有 scope 隐含其他 scope,因此调用方必须授予集成所需的每项权限。nfy_ automation key 不能调用此 control-plane 操作。

http
GET /api/v1/api-keys/scopes
Authorization: Bearer <access token>