Red Hat Quay API 参考


Red Hat Quay 3.14

Red Hat Quay API 参考

Red Hat OpenShift Documentation Team

摘要

Red Hat Quay API 参考

前言

Red Hat Quay 应用程序编程接口(API)提供了一个全面的 RESTful 接口,用于管理和自动化 Red Hat Quay 中的任务。此 API 围绕 OAuth 2.0 协议 而设计,支持安全、精细访问 Red Hat Quay 资源,并允许管理员和用户执行诸如创建存储库、管理镜像、设置权限等操作。

Red Hat Quay 遵循 Semantic Versioning (SemVer)原则,确保跨版本的可预测的 API 稳定性,例如:

  • 主发行版本 :引入新功能。可能包括破坏对 API 兼容性的更改。例如,Red Hat Quay 2.0 的 API 与 Red Hat Quay 3.0 不同。
  • 次发行版本 :以向后兼容的方式添加新功能。例如,3. y 版本为 版本 3. 发行版本添加了功能。
  • 补丁版本 :提供 bug 修复和改进,同时保持与次要发行本(如 3.y.z )的向后兼容性。

以下指南更详细地描述了 Red Hat Quay API,并提供了有关以下主题的详情:

  • API 端点结构,包括支持的 HTTP 方法
  • 每个端点的请求和响应模式
  • 必需和可选参数
  • 身份验证和授权要求
  • 常见错误代码和故障排除信息

如需了解更多指导方法,包括令牌概述、管理策略、了解 API 端点等,请参阅 Red Hat Quay API 指南

第 1 章 授权

oauth2_implicit

范围

以下范围用于控制对 API 端点的访问:

影响范围描述

repo:read

此应用能够查看和拉取对授予用户或机器人帐户可见的所有存储库

repo:write

此应用能够查看、推送和拉取到授予用户或机器人帐户具有写入访问权限的所有存储库

repo:admin

此应用将具有授予用户或机器人帐户具有访问权限的所有存储库的管理员访问权限

repo:create

此应用能够在 中创建存储库到任何允许授予用户或机器人帐户创建存储库的命名空间

user:read

此应用程序将能够读取用户信息,如用户名和电子邮件地址。

org:admin

此应用程序将能够管理您的组织,包括创建机器人、创建团队、调整团队成员资格和更改计费设置。在授予此权限前,您应该在请求的应用程序中具有绝对信任。

super:user

此应用程序将能够管理您的安装,包括管理用户、管理机构和其他在超级用户面板中的功能。在授予此权限前,您应该在请求的应用程序中具有绝对信任。

user:admin

此应用程序将能够管理您的帐户,包括创建机器人,并将它们授予您的存储库的权限。在授予此权限前,您应该在请求的应用程序中具有绝对信任。

第 2 章 appspecifictokens

管理当前用户的特定于应用的令牌。

2.1. createAppToken

为用户创建新应用特定令牌。

POST /api/v1/user/apptoken

授权: oauth2_implicit (user:admin)

请求正文模式(application/json)

新令牌的描述。

名称描述模式

标题
必需

有助于识别令牌的友好名称

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
 $ curl -X POST \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "MyAppToken"
  }' \
  "http://quay-server.example.com/api/v1/user/apptoken"

2.2. listAppTokens

列出用户的特定应用令牌。

GET /api/v1/user/apptoken

授权: oauth2_implicit (user:admin)

查询参数
类型Name描述模式

query

过期
可选

如果为 true,则只返回这些令牌过期

布尔值

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <access_token>" \
  "http://quay-server.example.com/api/v1/user/apptoken"

2.3. getAppToken

返回用户的特定应用令牌。

GET /api/v1/user/apptoken/{token_uuid}

授权: oauth2_implicit (user:admin)

路径参数
类型Name描述模式

path

token_uuid
required

特定于应用程序的 uuid

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <access_token>" \
  "http://quay-server.example.com/api/v1/user/apptoken/<token_uuid>"

2.4. revokeAppToken

为用户撤销特定的应用令牌。

DELETE /api/v1/user/apptoken/{token_uuid}

授权: oauth2_implicit (user:admin)

路径参数
类型Name描述模式

path

token_uuid
required

特定于应用程序的 uuid

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE \
  -H "Authorization: Bearer <access_token>" \
  "http://quay-server.example.com/api/v1/user/apptoken/<token_uuid>"

第 3 章 build

创建、列出、取消和获取存储库构建的 status/logs。

3.1. getRepoBuildStatus

返回由 build uuids 指定的构建的状态。

GET /api/v1/repository/{repository}/build/{build_uuid}/status

授权: oauth2_implicit (存储库:read)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

build_uuid
required

构建的 UUID

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

3.2. getRepoBuildLogs

返回由 build uuid 指定的构建的构建日志。

GET /api/v1/repository/{repository}/build/{build_uuid}/logs

授权: oauth2_implicit (存储库:read)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

build_uuid
required

构建的 UUID

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

3.3. getRepoBuild

返回有关构建的信息。

GET /api/v1/repository/{repository}/build/{build_uuid}

授权: oauth2_implicit (存储库:read)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

build_uuid
required

构建的 UUID

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

3.4. cancelRepoBuild

取消存储库构建。

DELETE /api/v1/repository/{repository}/build/{build_uuid}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

build_uuid
required

构建的 UUID

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

3.5. requestRepoBuild

请求构建存储库并从指定的输入推送。

POST /api/v1/repository/{repository}/build/

授权: oauth2_implicit (存储库:写)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

请求正文模式(application/json)

新存储库构建的描述。

名称描述模式

file_id
optional

上传构建 spec 时生成的文件 ID

字符串

archive_url
optional

要构建的 .tar.gz 的 URL。必须以 "http" 或 "https" 开头。

字符串

子目录
可选

可在其中找到 Dockerfile 的子目录。您只能指定这个或 dockerfile_path

字符串

dockerfile_path
optional

到 dockerfile 的路径。您只能指定此或子目录。

字符串

上下文
可选

传递 dockerfile 的上下文。这是可选的。

字符串

pull_robot
optional

用作拉取凭证的 Quay 机器人帐户的用户名

string

标签
可选

构建的镜像要推送到的标签。如果没有指定,则使用 "latest"。

string 数组
非空 唯一

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

3.6. getRepoBuilds

获取存储库构建列表。

GET /api/v1/repository/{repository}/build/

授权: oauth2_implicit (存储库:read)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

查询参数
类型Name描述模式

query


可选

返回自给定的 unix 时间码后的所有构建

整数

query

限制
可选

要返回的最大构建数

整数

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

第 4 章 discovery

API 发现信息。

4.1. discovery

列出 swagger API 格式提供的所有 API 端点。

GET /api/v1/discovery

授权: 

查询参数
类型Name描述模式

query

内部
可选

是否包含内部 API。

布尔值

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/discovery?query=true" \
    -H "Authorization: Bearer <access_token>"

第 5 章 错误

错误详情 API。

5.1. getErrorDescription

获取错误的详细描述。

GET /api/v1/error/{error_type}

授权: 

路径参数
类型Name描述模式

path

error_type
required

标识错误类型的错误代码。

字符串

响应
HTTP 代码描述模式

200

成功调用

ApiErrorDescription

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/error/<error_type>" \
    -H "Authorization: Bearer <access_token>"

第 6 章 globalmessages

消息 API.

6.1. createGlobalMessage

创建消息。

POST /api/v1/messages

授权: oauth2_implicit (超级:user)

请求正文模式(application/json)

创建新消息

名称描述模式

message
必需

单个消息

对象

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://<quay-server.example.com>/api/v1/messages" \
    -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
        "message": {
            "content": "Hi",
            "media_type": "text/plain",
            "severity": "info"
        }
    }'

6.2. getGlobalMessages

返回超级用户消息。

GET /api/v1/messages

授权: 

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/messages" \
    -H "Authorization: Bearer <access_token>"

6.3. deleteGlobalMessage

删除消息。

DELETE /api/v1/message/{uuid}

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

UUID
必需

 

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE "https://<quay-server.example.com>/api/v1/message/<uuid>" \
    -H "Authorization: Bearer <access_token>"

第 7 章 logs

访问机构或存储库的使用情况日志。

7.1. getAggregateUserLogs

返回当前用户的聚合日志。

GET /api/v1/user/aggregatelogs

授权: oauth2_implicit (user:admin)

查询参数
类型Name描述模式

query

执行
可选

过滤日志的用户名。

字符串

query

ENDTIME
可选

日志的最新时间。格式: UTC 为 "%m/%d/%Y"。

字符串

query

startTime
可选

日志的最早时间。格式: UTC 为 "%m/%d/%Y"。

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Accept: application/json" \
  "<quay-server.example.com>/api/v1/user/aggregatelogs?performer=<username>&starttime=<MM/DD/YYYY>&endtime=<MM/DD/YYYY>"

7.2. exportUserLogs

返回当前用户的聚合日志。

POST /api/v1/user/exportlogs

授权: oauth2_implicit (user:admin)

查询参数
类型Name描述模式

query

ENDTIME
可选

日志的最新时间。格式: UTC 为 "%m/%d/%Y"。

字符串

query

startTime
可选

日志的最早时间。格式: UTC 为 "%m/%d/%Y"。

字符串

请求正文模式(application/json)

配置导出日志操作

名称描述模式

callback_url
optional

使用到导出日志的链接调用的回调 URL

字符串

callback_email
optional

通过电子邮件发送到导出日志的链接的电子邮件地址

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
        "starttime": "<MM/DD/YYYY>",
        "endtime": "<MM/DD/YYYY>",
        "callback_email": "your.email@example.com"
      }' \
  "http://<quay-server.example.com>/api/v1/user/exportlogs"

7.3. listUserLogs

列出当前用户的日志。

GET /api/v1/user/logs

授权: oauth2_implicit (user:admin)

查询参数
类型Name描述模式

query

next_page
optional

下一页面的页面令牌

字符串

query

执行
可选

过滤日志的用户名。

字符串

query

ENDTIME
可选

日志的最新时间。格式: UTC 为 "%m/%d/%Y"。

字符串

query

startTime
可选

日志的最早时间。格式: UTC 为 "%m/%d/%Y"。

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET   -H "Authorization: Bearer <bearer_token>"   -H "Accept: application/json"   "<quay-server.example.com>/api/v1/user/logs"

7.4. getAggregateOrgLogs

获取指定机构的聚合日志。

GET /api/v1/organization/{orgname}/aggregatelogs

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

查询参数
类型Name描述模式

query

执行
可选

过滤日志的用户名。

字符串

query

ENDTIME
可选

日志的最新时间。格式: UTC 为 "%m/%d/%Y"。

字符串

query

startTime
可选

日志的最早时间。格式: UTC 为 "%m/%d/%Y"。

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Accept: application/json" \
  "<quay-server.example.com>/api/v1/organization/{orgname}/aggregatelogs"

7.5. exportOrgLogs

导出指定机构的日志。

POST /api/v1/organization/{orgname}/exportlogs

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

查询参数
类型Name描述模式

query

ENDTIME
可选

日志的最新时间。格式: UTC 为 "%m/%d/%Y"。

字符串

query

startTime
可选

日志的最早时间。格式: UTC 为 "%m/%d/%Y"。

字符串

请求正文模式(application/json)

配置导出日志操作

名称描述模式

callback_url
optional

使用到导出日志的链接调用的回调 URL

字符串

callback_email
optional

通过电子邮件发送到导出日志的链接的电子邮件地址

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
        "starttime": "<MM/DD/YYYY>",
        "endtime": "<MM/DD/YYYY>",
        "callback_email": "org.logs@example.com"
      }' \
  "http://<quay-server.example.com>/api/v1/organization/{orgname}/exportlogs"

7.6. listOrgLogs

列出指定机构的日志。

GET /api/v1/organization/{orgname}/logs

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

查询参数
类型Name描述模式

query

next_page
optional

下一页面的页面令牌

字符串

query

执行
可选

过滤日志的用户名。

字符串

query

ENDTIME
可选

日志的最新时间。格式: UTC 为 "%m/%d/%Y"。

字符串

query

startTime
可选

日志的最早时间。格式: UTC 为 "%m/%d/%Y"。

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Accept: application/json" \
  "http://<quay-server.example.com>/api/v1/organization/{orgname}/logs"

7.7. getAggregateRepoLogs

返回指定存储库的聚合日志。

GET /api/v1/repository/{repository}/aggregatelogs

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

查询参数
类型Name描述模式

query

ENDTIME
可选

日志的最新时间。格式: UTC 为 "%m/%d/%Y"。

字符串

query

startTime
可选

日志的最早时间。格式: UTC 为 "%m/%d/%Y"。

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Accept: application/json" \
  "<quay-server.example.com>/api/v1/repository/<repository_name>/<namespace>/aggregatelogs?starttime=2024-01-01&endtime=2024-06-18""

7.8. exportRepoLogs

对指定存储库的日志导出排队。

POST /api/v1/repository/{repository}/exportlogs

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

查询参数
类型Name描述模式

query

ENDTIME
可选

日志的最新时间。格式: UTC 为 "%m/%d/%Y"。

字符串

query

startTime
可选

日志的最早时间。格式: UTC 为 "%m/%d/%Y"。

字符串

请求正文模式(application/json)

配置导出日志操作

名称描述模式

callback_url
optional

使用到导出日志的链接调用的回调 URL

字符串

callback_email
optional

通过电子邮件发送到导出日志的链接的电子邮件地址

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
        "starttime": "2024-01-01",
        "endtime": "2024-06-18",
        "callback_url": "http://your-callback-url.example.com"
      }' \
  "http://<quay-server.example.com>/api/v1/repository/{repository}/exportlogs"

7.9. listRepoLogs

列出指定存储库的日志。

GET /api/v1/repository/{repository}/logs

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

查询参数
类型Name描述模式

query

next_page
optional

下一页面的页面令牌

字符串

query

ENDTIME
可选

日志的最新时间。格式: UTC 为 "%m/%d/%Y"。

字符串

query

startTime
可选

日志的最早时间。格式: UTC 为 "%m/%d/%Y"。

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Accept: application/json" \
  "http://<quay-server.example.com>/api/v1/repository/{repository}/logs"

第 8 章 清单(Inventory)

管理存储库的清单。

8.1. getManifestLabel

使用清单下特定 ID 检索标签。

GET /api/v1/repository/{repository}/manifest/{manifestref}/labels/{labelid}

授权: oauth2_implicit (存储库:read)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

manifestref
必需

清单摘要

字符串

path

labelid
required

标签的 ID

string

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Accept: application/json" \
  https://<quay-server.example.com>/api/v1/repository/<repository>/manifest/<manifestref>/labels/<label_id>

8.2. deleteManifestLabel

从清单中删除现有标签。

DELETE /api/v1/repository/{repository}/manifest/{manifestref}/labels/{labelid}

授权: oauth2_implicit (存储库:写)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

manifestref
必需

清单摘要

字符串

path

labelid
required

标签的 ID

string

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE \
  -H "Authorization: Bearer <bearer_token>" \
  https://<quay-server.example.com>/api/v1/repository/<repository>/manifest/<manifestref>/labels/<labelid>

8.3. addManifestLabel

将新标签添加到标签清单中。

POST /api/v1/repository/{repository}/manifest/{manifestref}/labels

授权: oauth2_implicit (存储库:写)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

manifestref
必需

清单摘要

string

请求正文模式(application/json)

为清单添加标签

名称描述模式

key
必需

标签的密钥

string

需要 的值

标签的值

string

media_type
required

此标签的介质类型

 
响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Content-Type: application/json" \
  --data '{
    "key": "<key>",
    "value": "<value>",
    "media_type": "<media_type>"
  }' \
  https://<quay-server.example.com>/api/v1/repository/<repository>/manifest/<manifestref>/labels

8.4. listManifestLabels

GET /api/v1/repository/{repository}/manifest/{manifestref}/labels

授权: oauth2_implicit (存储库:read)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

manifestref
必需

清单摘要

string

查询参数
类型Name描述模式

query

过滤
可选

如果指定,则仅返回与给定前缀匹配的标签

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Accept: application/json" \
  https://<quay-server.example.com>/api/v1/repository/<repository>/manifest/<manifestref>/labels

8.5. getRepoManifest

GET /api/v1/repository/{repository}/manifest/{manifestref}

授权: oauth2_implicit (存储库:read)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

manifestref
必需

清单摘要

string

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Accept: application/json" \
  https://<quay-server.example.com>/api/v1/repository/<repository>/manifest/<manifestref>

第 9 章 mirror

9.1. syncCancel

为给定 Repository 的镜像配置更新 sync_status。

POST /api/v1/repository/{repository}/mirror/sync-cancel

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://<quay-server.example.com>/api/v1/repository/<namespace>/<repo>/mirror/sync-cancel" \

9.2. syncNow

为给定 Repository 的镜像配置更新 sync_status。

POST /api/v1/repository/{repository}/mirror/sync-now

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://<quay-server.example.com>/api/v1/repository/<namespace>/<repo>/mirror/sync-now" \
     -H "Authorization: Bearer <access_token>"

9.3. getRepoMirrorConfig

返回一个给定存储库的 Mirror 配置。

GET /api/v1/repository/{repository}/mirror

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

200

成功调用

ViewMirrorConfig

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/repository/<namespace>/<repo>/mirror" \
     -H "Authorization: Bearer <access_token>"

9.4. changeRepoMirrorConfig

允许用户修改存储库的镜像配置。

PUT /api/v1/repository/{repository}/mirror

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

请求正文模式(application/json)

更新存储库镜像配置。

名称描述模式

is_enabled
optional

用于启用或禁用同步。

布尔值

external_reference
可选

外部存储库的位置。

字符串

external_registry_username
optional

用于与外部 registry 进行身份验证的用户名。

 

external_registry_password
optional

用于与外部 registry 进行身份验证的密码。

 

sync_start_date
optional

决定此存储库下次准备同步的时间。

字符串

sync_interval
optional

next_start_date 开始同步后的秒数。

整数

robot_username
optional

用于镜像推送的机器人的用户名。

字符串

root_rule
可选

用于决定应同步哪些标签的 glob-patterns 列表。

对象

external_registry_config
optional

 

对象

响应
HTTP 代码描述模式

201

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT "https://<quay-server.example.com>/api/v1/repository/<namespace>/<repo>/mirror" \
    -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
        "is_enabled": <false>, 1
        "external_reference": "<external_reference>",
        "external_registry_username": "<external_registry_username>",
        "external_registry_password": "<external_registry_password>",
        "sync_start_date": "<sync_start_date>",
        "sync_interval": <sync_interval>,
        "robot_username": "<robot_username>",
        "root_rule": {
            "rule": "<rule>",
            "rule_type": "<rule_type>"
        }
    }'
1
禁用自动同步。

9.5. createRepoMirrorConfig

为给定存储库创建一个 RepoMirrorConfig。

POST /api/v1/repository/{repository}/mirror

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

请求正文模式(application/json)

创建存储库镜像配置。

名称描述模式

is_enabled
optional

用于启用或禁用同步。

布尔值

external_reference
必需

外部存储库的位置。

字符串

external_registry_username
optional

用于与外部 registry 进行身份验证的用户名。

 

external_registry_password
optional

用于与外部 registry 进行身份验证的密码。

 

sync_start_date
required

决定此存储库下次准备同步的时间。

字符串

sync_interval
required

next_start_date 开始同步后的秒数。

整数

robot_username
required

用于镜像推送的机器人的用户名。

字符串

root_rule
必需

用于决定应同步哪些标签的 glob-patterns 列表。

对象

external_registry_config
optional

 

对象

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://<quay-server.example.com>/api/v1/repository/<namespace>/<repo>/mirror" \
    -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
        "is_enabled": <is_enabled>,
        "external_reference": "<external_reference>",
        "external_registry_username": "<external_registry_username>",
        "external_registry_password": "<external_registry_password>",
        "sync_start_date": "<sync_start_date>",
        "sync_interval": <sync_interval>,
        "robot_username": "<robot_username>",
        "root_rule": {
            "rule": "<rule>",
            "rule_type": "<rule_type>"
        }
    }'

第 10 章 namespacequota

10.1. listUserQuota

GET /api/v1/user/quota

授权: oauth2_implicit (user:admin)

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/user/quota" \
  -H "Authorization: Bearer <access_token>"

10.2. getOrganizationQuotaLimit

GET /api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id}

授权: 

路径参数
类型Name描述模式

path

quota_id
required

 

字符串

path

limit_id
required

 

字符串

path

需要OrgName

 

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/organization/<orgname>/quota/<quota_id>/limit/<limit_id>" \
     -H "Authorization: Bearer <access_token>"

10.3. changeOrganizationQuotaLimit

PUT /api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id}

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

quota_id
required

 

字符串

path

limit_id
required

 

字符串

path

需要OrgName

 

字符串

请求正文模式(application/json)

更改机构配额限制的描述

名称描述模式

type
可选

配额限制类型:"Warning"或"Reject"

字符串

threshold_percent
可选

配额阈值,以百分比为单位

整数

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT "https://<quay-server.example.com>/api/v1/organization/<orgname>/quota/<quota_id>/limit/<limit_id>" \
     -H "Authorization: Bearer <access_token>" \
     -H "Content-Type: application/json" \
     -d '{
           "type": "<type>",
           "threshold_percent": <threshold_percent>
         }'

10.4. deleteOrganizationQuotaLimit

DELETE /api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id}

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

quota_id
required

 

字符串

path

limit_id
required

 

字符串

path

需要OrgName

 

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE "https://<quay-server.example.com>/api/v1/organization/<orgname>/quota/<quota_id>/limit/<limit_id>" \
     -H "Authorization: Bearer <access_token>"

10.5. createOrganizationQuotaLimit

POST /api/v1/organization/{orgname}/quota/{quota_id}/limit

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

quota_id
required

 

字符串

path

需要OrgName

 

字符串

请求正文模式(application/json)

新机构配额限制的描述

名称描述模式

type
必需

配额限制类型:"Warning"或"Reject"

string

threshold_percent
required

配额阈值,以百分比为单位

整数

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://<quay-server.example.com>/api/v1/organization/<orgname>/quota/<quota_id>/limit" \
     -H "Authorization: Bearer <access_token>" \
     -H "Content-Type: application/json" \
     -d '{
           "limit_bytes": 21474836480,
           "type": "Reject", 1
           "threshold_percent": 90 2
         }'

10.6. listOrganizationQuotaLimit

GET /api/v1/organization/{orgname}/quota/{quota_id}/limit

授权: 

路径参数
类型Name描述模式

path

quota_id
required

 

字符串

path

需要OrgName

 

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/organization/<orgname>/quota/<quota_id>/limit" \
     -H "Authorization: Bearer <access_token>"

10.7. getUserQuotaLimit

GET /api/v1/user/quota/{quota_id}/limit/{limit_id}

授权: oauth2_implicit (user:admin)

路径参数
类型Name描述模式

path

quota_id
required

 

字符串

path

limit_id
required

 

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/user/quota/{quota_id}/limit/{limit_id}" \
  -H "Authorization: Bearer <access_token>"

10.8. listUserQuotaLimit

GET /api/v1/user/quota/{quota_id}/limit

授权: oauth2_implicit (user:admin)

路径参数
类型Name描述模式

path

quota_id
required

 

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/user/quota/{quota_id}/limit" \
  -H "Authorization: Bearer <access_token>"

10.9. getOrganizationQuota

GET /api/v1/organization/{orgname}/quota/{quota_id}

授权: 

路径参数
类型Name描述模式

path

quota_id
required

 

字符串

path

需要OrgName

 

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/organization/<orgname>/quota/<quota_id>" \
     -H "Authorization: Bearer <access_token>"S

10.10. changeOrganizationQuota

PUT /api/v1/organization/{orgname}/quota/{quota_id}

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

quota_id
required

 

字符串

path

需要OrgName

 

字符串

请求正文模式(application/json)

新机构配额的描述

名称描述模式

limit_bytes
optional

允许机构的字节数

integer

限制
可选

组织的人类可读存储容量。接受 SI 单位,如 Mi、Gi 或 Ti,以及非标准单位(如 GB 或 MB)。必须使用 limit_bytes 相互排斥。

string

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT "https://<quay-server.example.com>/api/v1/organization/<orgname>/quota/<quota_id>" \
     -H "Authorization: Bearer <access_token>" \
     -H "Content-Type: application/json" \
     -d '{
         "limit_bytes": <limit_in_bytes>
     }'

10.11. deleteOrganizationQuota

DELETE /api/v1/organization/{orgname}/quota/{quota_id}

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

quota_id
required

 

字符串

path

需要OrgName

 

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE "https://<quay-server.example.com>/api/v1/organization/<orgname>/quota/<quota_id>" \
     -H "Authorization: Bearer <access_token>"

10.12. createOrganizationQuota

创建新机构配额。

POST /api/v1/organization/{orgname}/quota

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

需要OrgName

 

字符串

请求正文模式(application/json)

新机构配额的描述

名称描述模式

limit_bytes
required

允许机构的字节数

integer

限制
可选

组织的人类可读存储容量。接受 SI 单位,如 Mi、Gi 或 Ti,以及非标准单位(如 GB 或 MB)。必须使用 limit_bytes 相互排斥。

string

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://<quay-server.example.com>/api/v1/organization/<orgname>/quota" \
     -H "Authorization: Bearer <access_token>" \
     -H "Content-Type: application/json" \
     -d '{
         "limit_bytes": 10737418240,
         "limits": "10 Gi"
     }'

10.13. listOrganizationQuota

GET /api/v1/organization/{orgname}/quota

授权: 

路径参数
类型Name描述模式

path

需要OrgName

 

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -k -X GET -H "Authorization: Bearer <token>" -H 'Content-Type: application/json'  https://<quay-server.example.com>/api/v1/organization/<organization_name>/quota

10.14. getUserQuota

GET /api/v1/user/quota/{quota_id}

授权: oauth2_implicit (user:admin)

路径参数
类型Name描述模式

path

quota_id
required

 

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/user/quota/{quota_id}" \
  -H "Authorization: Bearer <access_token>"

第 11 章 机构

管理机构、成员和 OAuth 应用。

11.1. createOrganization

创建新机构。

POST /api/v1/organization/

授权: oauth2_implicit (user:admin)

请求正文模式(application/json)

新组织的描述。

名称描述模式

name
必需

机构用户名

字符串

email
可选

机构联系电子邮件

字符串

recaptcha_response
optional

(可以禁用)recaptcha 响应代码进行验证

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST   -H "Authorization: Bearer <bearer_token>" -H "Content-Type: application/json"   -d '{
    "name": "<new_organization_name>"
  }'   "https://<quay-server.example.com>/api/v1/organization/"

11.2. validateProxyCacheConfig

POST /api/v1/organization/{orgname}/validateproxycache

授权: 

路径参数
类型Name描述模式

path

需要OrgName

 

字符串

请求正文模式(application/json)

机构的代理缓存配置

名称描述模式

upstream_registry
required

要缓存的上游 registry 的名称

字符串

响应
HTTP 代码描述模式

202

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://<quay-server.example.com>/api/v1/organization/{orgname}/validateproxycache" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
        "upstream_registry": "<upstream_registry>"
      }'

11.3. getOrganizationCollaborators

列出指定机构的外部协作者。

GET /api/v1/organization/{orgname}/collaborators

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/organization/{orgname}/collaborators" \
  -H "Authorization: Bearer <access_token>"

11.4. getOrganizationApplication

使用指定组织下的指定 client_id 检索应用。

GET /api/v1/organization/{orgname}/applications/{client_id}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

client_id
required

OAuth 客户端 ID

字符串

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/organization/<orgname>/applications/<client_id>" \
  -H "Authorization: Bearer <access_token>"

11.5. updateOrganizationApplication

更新此机构下的应用程序。

PUT /api/v1/organization/{orgname}/applications/{client_id}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

client_id
required

OAuth 客户端 ID

字符串

path

需要OrgName

机构名称

字符串

请求正文模式(application/json)

更新的应用程序的描述。

名称描述模式

name
必需

应用程序的名称

字符串

redirect_uri
required

应用程序的 OAuth 重定向的 URI

字符串

application_uri
required

应用程序主页的 URI

字符串

description
可选

应用程序的人类可读描述

字符串

avatar_email
optional

用于应用程序的 avatar 电子邮件地址

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT "https://quay-server.example.com/api/v1/organization/test/applications/12345" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
        "name": "Updated Application Name",
        "redirect_uri": "https://example.com/oauth/callback",
        "application_uri": "https://example.com",
        "description": "Updated description for the application",
        "avatar_email": "avatar@example.com"
      }'

11.6. deleteOrganizationApplication

删除此机构下的应用程序。

DELETE /api/v1/organization/{orgname}/applications/{client_id}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

client_id
required

OAuth 客户端 ID

字符串

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE "https://<quay-server.example.com>/api/v1/organization/{orgname}/applications/{client_id}" \
  -H "Authorization: Bearer <access_token>"

11.7. createOrganizationApplication

在此组织下创建新应用。

POST /api/v1/organization/{orgname}/applications

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

请求正文模式(application/json)

新组织应用的描述。

名称描述模式

name
必需

应用程序的名称

字符串

redirect_uri
optional

应用程序的 OAuth 重定向的 URI

字符串

application_uri
optional

应用程序主页的 URI

字符串

description
可选

应用程序的人类可读描述

字符串

avatar_email
optional

用于应用程序的 avatar 电子邮件地址

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://<quay-server.example.com>/api/v1/organization/<orgname>/applications" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
        "name": "<app_name>",
        "redirect_uri": "<redirect_uri>",
        "application_uri": "<application_uri>",
        "description": "<app_description>",
        "avatar_email": "<avatar_email>"
      }'

11.8. getOrganizationApplications

列出指定机构的应用程序。

GET /api/v1/organization/{orgname}/applications

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/organization/<orgname>/applications" \
  -H "Authorization: Bearer <access_token>"

11.9. getProxyCacheConfig

检索组织的代理缓存配置。

GET /api/v1/organization/{orgname}/proxycache

授权: 

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/organization/{orgname}/proxycache" \
  -H "Authorization: Bearer <access_token>"

11.10. deleteProxyCacheConfig

删除机构的代理缓存配置。

DELETE /api/v1/organization/{orgname}/proxycache

授权: 

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE "https://<quay-server.example.com>/api/v1/organization/{orgname}/proxycache" \
  -H "Authorization: Bearer <access_token>"

11.11. createProxyCacheConfig

为机构创建代理缓存配置。

POST /api/v1/organization/{orgname}/proxycache

授权: 

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

请求正文模式(application/json)

机构的代理缓存配置

名称描述模式

upstream_registry
required

要缓存的上游 registry 的名称

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://<quay-server.example.com>/api/v1/organization/<orgname>/proxycache" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
        "upstream_registry": "<upstream_registry>"
      }'

11.12. getOrganizationMember

检索组织成员的详细信息。

GET /api/v1/organization/{orgname}/members/{membername}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要 memberName

机构成员的用户名

string

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/organization/<orgname>/members/<membername>" \
  -H "Authorization: Bearer <access_token>"

11.13. removeOrganizationMember

从机构中删除成员,撤销其所有存储库的权限,并将其从机构中的所有团队中删除。

DELETE /api/v1/organization/{orgname}/members/{membername}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要 memberName

机构成员的用户名

string

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE "https://<quay-server.example.com>/api/v1/organization/<orgname>/members/<membername>" \
  -H "Authorization: Bearer <access_token>"

11.14. getOrganizationMembers

列出指定机构的人员成员。

GET /api/v1/organization/{orgname}/members

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/organization/<orgname>/members" \
  -H "Authorization: Bearer <access_token>"

11.15. getOrganization

获取指定机构的详细信息。

GET /api/v1/organization/{orgname}

授权: 

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  "<quay-server.example.com>/api/v1/organization/<organization_name>"

11.16. changeOrganizationDetails

更改指定机构的详情。

PUT /api/v1/organization/{orgname}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

请求正文模式(application/json)

现有机构的更新描述

名称描述模式

email
可选

机构联系电子邮件

字符串

invoice_email
optional

机构是否希望接收发票的电子邮件

布尔值

invoice_email_address
optional

要接收发票的电子邮件地址

 

tag_expiration_s
optional

标签过期的秒数

整数

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT \
  -H "Authorization: Bearer <bearer_token>" \
  "<quay-server.example.com>/api/v1/organization/<organization_name>"

11.17. deleteAdminedOrganization

删除指定的机构。

DELETE /api/v1/organization/{orgname}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  "<quay-server.example.com>/api/v1/organization/<organization_name>"

11.18. getApplicationInformation

获取指定应用程序的信息。

GET /api/v1/app/{client_id}

授权: 

路径参数
类型Name描述模式

path

client_id
required

OAuth 客户端 ID

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/app/<client_id>" \
  -H "Authorization: Bearer <access_token>"

第 12 章 权限

管理存储库权限。

12.1. getUserTransitivePermission

获取指定用户的获取权限。

GET /api/v1/repository/{repository}/permissions/user/{username}/transitive

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 的用户名

权限应用到的用户的用户名

字符串

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <access_token>" \
  "https://quay-server.example.com/api/v1/repository/<repository_path>/permissions/user/<username>/transitive"

12.2. getUserPermissions

获取指定用户的权限。

GET /api/v1/repository/{repository}/permissions/user/{username}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 的用户名

权限应用到的用户的用户名

字符串

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <access_token>" \
  "https://quay-server.example.com/api/v1/repository/<repository_path>/permissions/user/<username>"

12.3. changeUserPermissions

更新现有仓库的 perimsions。

PUT /api/v1/repository/{repository}/permissions/user/{username}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 的用户名

权限应用到的用户的用户名

字符串

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

请求正文模式(application/json)

用户权限的描述。

名称描述模式

需要 角色

用户使用的角色

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Content-Type: application/json" \
  -d '{"role": "admin"}' \
  https://<quay-server.example.com>/api/v1/repository/<namespace>/<repository>/permissions/user/<username>

12.4. deleteUserPermissions

删除用户权限。

DELETE /api/v1/repository/{repository}/permissions/user/{username}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 的用户名

权限应用到的用户的用户名

字符串

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Accept: application/json" \
  https://<quay-server.example.com>/api/v1/repository/<namespace>/<repository>/permissions/user/<username>

12.5. getTeamPermissions

获取指定团队的权限。

GET /api/v1/repository/{repository}/permissions/team/{teamname}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

TeamName
必需

权限应用到的团队的名称

string

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <access_token>" \
  "https://quay-server.example.com/api/v1/repository/<namespace>/<repository>/permissions/team/<teamname>"

12.6. changeTeamPermissions

更新现有团队权限。

PUT /api/v1/repository/{repository}/permissions/team/{teamname}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

TeamName
必需

权限应用到的团队的名称

string

请求正文模式(application/json)

团队权限的描述。

名称描述模式

需要 角色

用于团队的角色

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

$ curl -X PUT \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{"role": "<role>"}' \
  "https://quay-server.example.com/api/v1/repository/<namespace>/<repository>/permissions/team/<teamname>"

12.7. deleteTeamPermissions

删除指定团队的权限。

DELETE /api/v1/repository/{repository}/permissions/team/{teamname}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

TeamName
必需

权限应用到的团队的名称

string

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE \
  -H "Authorization: Bearer <access_token>" \
  "https://quay-server.example.com/api/v1/repository/<namespace>/<repository>/permissions/team/<teamname>"

12.8. listRepoTeamPermissions

列出所有团队权限。

GET /api/v1/repository/{repository}/permissions/team/

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <access_token>" \
  "https://quay-server.example.com/api/v1/repository/<namespace>/<repository>/permissions/team/"

12.9. listRepoUserPermissions

列出所有用户权限。

GET /api/v1/repository/{repository}/permissions/user/

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Accept: application/json" \
  https://<quay-server.example.com>/api/v1/repository/<namespace>/<repository>/permissions/user/<username>/

第 13 章 policy

13.1. createOrganizationAutoPrunePolicy

为机构创建一个自动修剪策略

POST /api/v1/organization/{orgname}/autoprunepolicy/

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

请求正文模式(application/json)

要应用到用户命名空间的策略配置

Name描述模式

所需 方法

用于修剪标签的方法(number_of_tags、create_date)

string

需要 的值

用于修剪方法的值(标签数量(如 10 个,时间 delta,如 7d (7 天))

 

tagPattern
optional

仅与此模式匹配的标签将被修剪

string

tagPatternMatches
optional

确定修剪的标签是否应该与 tagPattern 匹配

布尔值

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST -H "Authorization: Bearer <access_token>" -H "Content-Type: application/json" -d '{"method": "number_of_tags", "value": 10}' http://<quay-server.example.com>/api/v1/organization/<organization_name>/autoprunepolicy/

13.2. listOrganizationAutoPrunePolicies

列出机构的自动修剪策略

GET /api/v1/organization/{orgname}/autoprunepolicy/

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/organization/example_org/autoprunepolicy/" \
  -H "Authorization: Bearer <your_access_token>"

13.3. getOrganizationAutoPrunePolicy

获取机构的自动修剪策略

GET /api/v1/organization/{orgname}/autoprunepolicy/{policy_uuid}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

policy_uuid
required

策略的唯一 ID

string

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET -H "Authorization: Bearer <access_token>" http://<quay-server.example.com>/api/v1/organization/<organization_name>/autoprunepolicy/<policy_uuid>

13.4. deleteOrganizationAutoPrunePolicy

删除机构的自动修剪策略

DELETE /api/v1/organization/{orgname}/autoprunepolicy/{policy_uuid}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

policy_uuid
required

策略的唯一 ID

string

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE "https://quay-server.example.com/api/v1/organization/example_org/autoprunepolicy/example_policy_uuid" \
  -H "Authorization: Bearer <your_access_token>"

13.5. updateOrganizationAutoPrunePolicy

更新机构的自动修剪策略

PUT /api/v1/organization/{orgname}/autoprunepolicy/{policy_uuid}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

policy_uuid
required

策略的唯一 ID

string

path

需要OrgName

机构名称

字符串

请求正文模式(application/json)

要应用到用户命名空间的策略配置

Name描述模式

所需 方法

用于修剪标签的方法(number_of_tags、create_date)

string

需要 的值

用于修剪方法的值(标签数量(如 10 个,时间 delta,如 7d (7 天))

 

tagPattern
optional

仅与此模式匹配的标签将被修剪

string

tagPatternMatches
optional

确定修剪的标签是否应该与 tagPattern 匹配

布尔值

响应
HTTP 代码描述模式

204

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT   -H "Authorization: Bearer <bearer_token>"   -H "Content-Type: application/json"   -d '{
    "method": "creation_date",
    "value": "4d",
    "tagPattern": "^v*",
    "tagPatternMatches": true
  }'   "<quay-server.example.com>/api/v1/organization/<organization_name>/autoprunepolicy/<uuid>"

13.6. createRepositoryAutoPrunePolicy

为存储库创建一个自动修剪策略

POST /api/v1/repository/{repository}/autoprunepolicy/

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

请求正文模式(application/json)

要应用到用户命名空间的策略配置

Name描述模式

所需 方法

用于修剪标签的方法(number_of_tags、create_date)

string

需要 的值

用于修剪方法的值(标签数量(如 10 个,时间 delta,如 7d (7 天))

 

tagPattern
optional

仅与此模式匹配的标签将被修剪

string

tagPatternMatches
optional

确定修剪的标签是否应该与 tagPattern 匹配

布尔值

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST -H "Authorization: Bearer <access_token>" -H "Content-Type: application/json" -d '{"method": "number_of_tags","value": 2}' http://<quay-server.example.com>/api/v1/repository/<organization_name>/<repository_name>/autoprunepolicy/

13.7. listRepositoryAutoPrunePolicies

列出存储库的自动修剪策略

GET /api/v1/repository/{repository}/autoprunepolicy/

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/autoprunepolicy/" \
  -H "Authorization: Bearer <your_access_token>"

13.8. getRepositoryAutoPrunePolicy

获取存储库的自动修剪策略

GET /api/v1/repository/{repository}/autoprunepolicy/{policy_uuid}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

policy_uuid
required

策略的唯一 ID

string

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/autoprunepolicy/123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer <your_access_token>"

13.9. deleteRepositoryAutoPrunePolicy

删除存储库的自动修剪策略

DELETE /api/v1/repository/{repository}/autoprunepolicy/{policy_uuid}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

policy_uuid
required

策略的唯一 ID

string

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/autoprunepolicy/123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer <your_access_token>"

13.10. updateRepositoryAutoPrunePolicy

更新存储库的自动修剪策略

PUT /api/v1/repository/{repository}/autoprunepolicy/{policy_uuid}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

policy_uuid
required

策略的唯一 ID

string

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

请求正文模式(application/json)

要应用到用户命名空间的策略配置

Name描述模式

所需 方法

用于修剪标签的方法(number_of_tags、create_date)

string

需要 的值

用于修剪方法的值(标签数量(如 10 个,时间 delta,如 7d (7 天))

 

tagPattern
optional

仅与此模式匹配的标签将被修剪

string

tagPatternMatches
optional

确定修剪的标签是否应该与 tagPattern 匹配

布尔值

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "number_of_tags",
    "value": "5",
    "tagPattern": "^test.*",
    "tagPatternMatches": true
  }' \
  "https://quay-server.example.com/api/v1/repository/<namespace>/<repo_name>/autoprunepolicy/<uuid>"

13.11. createUserAutoPrunePolicy

为当前登录的用户创建自动修剪策略

POST /api/v1/user/autoprunepolicy/

授权: oauth2_implicit (user:admin)

请求正文模式(application/json)

要应用到用户命名空间的策略配置

Name描述模式

所需 方法

用于修剪标签的方法(number_of_tags、create_date)

string

需要 的值

用于修剪方法的值(标签数量(如 10 个,时间 delta,如 7d (7 天))

 

tagPattern
optional

仅与此模式匹配的标签将被修剪

string

tagPatternMatches
optional

确定修剪的标签是否应该与 tagPattern 匹配

布尔值

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://quay-server.example.com/api/v1/user/autoprunepolicy/" \
  -H "Authorization: Bearer <your_access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "number_of_tags",
    "value": 10,
    "tagPattern": "v*",
    "tagPatternMatches": true
  }'

13.12. listUserAutoPrunePolicies

列出当前登录用户的自动修剪策略

GET /api/v1/user/autoprunepolicy/

授权: oauth2_implicit (user:admin)

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/user/autoprunepolicy/" \
  -H "Authorization: Bearer <your_access_token>"

13.13. getUserAutoPrunePolicy

获取当前登录用户的自动修剪策略

GET /api/v1/user/autoprunepolicy/{policy_uuid}

授权: oauth2_implicit (user:admin)

路径参数
类型Name描述模式

path

policy_uuid
required

策略的唯一 ID

string

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/user/autoprunepolicy/{policy_uuid}" \
  -H "Authorization: Bearer <your_access_token>"

13.14. deleteUserAutoPrunePolicy

删除当前登录的用户的自动修剪策略

DELETE /api/v1/user/autoprunepolicy/{policy_uuid}

授权: oauth2_implicit (user:admin)

路径参数
类型Name描述模式

path

policy_uuid
required

策略的唯一 ID

string

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE "https://quay-server.example.com/api/v1/user/autoprunepolicy/<policy_uuid>" \
  -H "Authorization: Bearer <your_access_token>"

13.15. updateUserAutoPrunePolicy

为当前登录的用户更新自动修剪策略

PUT /api/v1/user/autoprunepolicy/{policy_uuid}

授权: oauth2_implicit (user:admin)

路径参数
类型Name描述模式

path

policy_uuid
required

策略的唯一 ID

string

请求正文模式(application/json)

要应用到用户命名空间的策略配置

Name描述模式

所需 方法

用于修剪标签的方法(number_of_tags、create_date)

string

需要 的值

用于修剪方法的值(标签数量(如 10 个,时间 delta,如 7d (7 天))

 

tagPattern
optional

仅与此模式匹配的标签将被修剪

string

tagPatternMatches
optional

确定修剪的标签是否应该与 tagPattern 匹配

布尔值

响应
HTTP 代码描述模式

204

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT "https://quay-server.example.com/api/v1/user/autoprunepolicy/<policy_uuid>" \
  -H "Authorization: Bearer <your_access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "number_of_tags",
    "value": "10",
    "tagPattern": ".*-old",
    "tagPatternMatches": true
  }'

第 14 章 Prototype

管理添加到存储库的默认权限。

14.1. updateOrganizationPrototypePermission

更新现有权限原型的角色。

PUT /api/v1/organization/{orgname}/prototypes/{prototypeid}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

必要设计
时需要

原型的 ID

string

path

需要OrgName

机构名称

字符串

请求正文模式(application/json)

新原型角色的描述

名称描述模式

角色
可选

应该应用到权限的角色

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Content-Type: application/json" \
  --data '{
    "role": "write"
  }' \
  https://<quay-server.example.com>/api/v1/organization/<organization_name>/prototypes/<prototypeid>

14.2. deleteOrganizationPrototypePermission

删除现有权限设计模型。

DELETE /api/v1/organization/{orgname}/prototypes/{prototypeid}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

必要设计
时需要

原型的 ID

string

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
curl -X DELETE \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Accept: application/json" \
  https://<quay-server.example.com>/api/v1/organization/<organization_name>/prototypes/<prototype_id>

14.3. createOrganizationPrototypePermission

创建新权限设计图。

POST /api/v1/organization/{orgname}/prototypes

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

请求正文模式(application/json)

新原型描述

名称描述模式

需要 角色

应该应用到委派的角色

字符串

activating_user
optional

创建规则应该应用的用户的存储库

object

需要 委托

有关规则授予访问权限的用户或团队的信息

对象

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST   -H "Authorization: Bearer <bearer_token>"   -H "Content-Type: application/json"   --data '{
    "role": "<admin_read_or_write>",
    "delegate": {
      "name": "<username>",
      "kind": "user"
    },
    "activating_user": {
      "name": "<robot_name>"
    }
  }'   https://<quay-server.example.com>/api/v1/organization/<organization_name>/prototypes

14.4. getOrganizationPrototypePermissions

列出此组织的现有原型。

GET /api/v1/organization/{orgname}/prototypes

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Accept: application/json" \
  https://<quay-server.example.com>/api/v1/organization/<organization_name>/prototypes

第 15 章 引用器

列出 v2 API 引用器

15.1. getReferrers

列出镜像摘要的 v2 API 引用器。

GET /v2/{organization_name}/{repository_name}/referrers/{digest}
请求正文模式(application/json)

镜像摘要的引用。

类型

Name

描述

模式

path

需要OrgName

机构名称

字符串

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

所需引用

在存储库下查找清单的 OCI 引用器。

string

第 16 章 软件仓库

列出、创建和管理存储库。

16.1. createRepo

创建新软件仓库。

POST /api/v1/repository

授权: oauth2_implicit (存储库:create)

请求正文模式(application/json)

新存储库的描述

名称描述模式

需要 仓库

仓库名称

string

需要 可见性

存储库开始的可见性

字符串

namespace
可选

创建存储库的命名空间。如果省略,则使用调用者的用户名

string

描述
必需

Markdown 编码的仓库描述

字符串

repo_kind
optional

存储库类型

 
响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "repository": "<new_repository_name>",
    "visibility": "<public>",
    "description": "<This is a description of the new repository>."
  }' \
  "https://quay-server.example.com/api/v1/repository"

16.2. listRepos

在各种情况下,获取当前用户对当前用户可见的存储库列表。

GET /api/v1/repository

授权: oauth2_implicit (存储库:read)

查询参数
类型Name描述模式

query

next_page
optional

下一页面的页面令牌

字符串

query

repo_kind
optional

要返回的仓库类型

字符串

query

popularity
可选

是否包含存储库的流行度指标。

布尔值

query

last_modified
可选

是否包含存储库最后一次修改的时间。

布尔值

query

需要 公共

通过 virtue public 来添加用户可见的任何软件仓库

布尔值

query

需要不足

过滤用户返回到这些存储库的存储库

布尔值

query

namespace
必需

过滤返回到此命名空间的存储库

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  "https://quay-server.example.com/api/v1/repository?public=true&starred=false&namespace=<NAMESPACE>"

16.3. changeRepoVisibility

更改存储库的可见性。

POST /api/v1/repository/{repository}/changevisibility

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

请求正文模式(application/json)

更改存储库的可见性。

名称描述模式

需要 可见性

存储库开始的可见性

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

命令示例
$ curl -X POST \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
        "visibility": "private"
      }' \
  "https://quay-server.example.com/api/v1/repository/<NAMESPACE>/<REPO_NAME>/changevisibility"

16.4. changeRepoState

更改存储库的状态。

PUT /api/v1/repository/{repository}/changestate

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

请求正文模式(application/json)

更改存储库的状态。

名称描述模式

需要 状态

确定是否允许推送。

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令

16.5. getRepo

获取指定的存储库。

GET /api/v1/repository/{repository}

授权: oauth2_implicit (存储库:read)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

查询参数
类型Name描述模式

query

IncludeTags
可选

是否包含存储库标签

布尔值

query

includeStats
可选

是否包含操作统计信息

布尔值

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET -H "Authorization: Bearer <bearer_token>" "<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>"

16.6. updateRepo

更新指定存储库中的描述。

PUT /api/v1/repository/{repository}

授权: oauth2_implicit (存储库:写)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

请求正文模式(application/json)

可以在存储库中更新的字段。

名称描述模式

描述
必需

Markdown 编码的仓库描述

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Content-Type: application/json" \
  -d '{
        "description": "This is an updated description for the repository."
      }' \
  "https://quay-server.example.com/api/v1/repository/<NAMESPACE>/<REPOSITORY>"

16.7. deleteRepository

删除存储库。

DELETE /api/v1/repository/{repository}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE   -H "Authorization: Bearer <bearer_token>" "<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>"

第 17 章 repositorynotification

列出、创建和管理存储库事件/通知。

17.1. testRepoNotification

将测试通知排队此存储库。

POST /api/v1/repository/{repository}/notification/{uuid}/test

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

UUID
必需

通知的 UUID

string

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST \
  -H "Authorization: Bearer <bearer_token>" \
  https://<quay-server.example.com>/api/v1/repository/<repository>/notification/<uuid>/test

17.2. getRepoNotification

获取指定通知的信息。

GET /api/v1/repository/{repository}/notification/{uuid}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

UUID
必需

通知的 UUID

string

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST \
  -H "Authorization: Bearer <bearer_token>" \
  https://<quay-server.example.com>/api/v1/repository/<repository>/notification/<uuid>

17.3. deleteRepoNotification

删除指定的通知。

DELETE /api/v1/repository/{repository}/notification/{uuid}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

UUID
必需

通知的 UUID

string

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE \
  -H "Authorization: Bearer <bearer_token>" \
  https://<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>/notification/<uuid>

17.4. resetRepositoryNotificationFailures

将存储库通知重置为 0 个失败。

POST /api/v1/repository/{repository}/notification/{uuid}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

UUID
必需

通知的 UUID

string

响应
HTTP 代码描述模式

204

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST \
  -H "Authorization: Bearer <bearer_token>" \
  https://<quay-server.example.com>/api/v1/repository/<repository>/notification/<uuid>

17.5. createRepoNotification

POST /api/v1/repository/{repository}/notification/

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

请求正文模式(application/json)

在仓库中创建通知的信息

名称描述模式

需要 事件

通知将响应的事件

string

所需 方法

通知方法(如电子邮件或 Web 回调)

string

需要配置

特定通知方法的 JSON 配置信息

object

eventConfig
必需

特定通知事件的 JSON 配置信息

对象

title
可选

通知的人类可读标题

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Content-Type: application/json" \
  --data '{
    "event": "<event>",
    "method": "<method>",
    "config": {
      "<config_key>": "<config_value>"
    },
    "eventConfig": {
      "<eventConfig_key>": "<eventConfig_value>"
    }
  }' \
  https://<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>/notification/

17.6. listRepoNotifications

列出指定存储库的通知。

GET /api/v1/repository/{repository}/notification/

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET  -H "Authorization: Bearer <bearer_token>"   -H "Accept: application/json"  https://<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>/notification

第 18 章 机器人

管理用户和组织机器人帐户。

18.1. getUserRobots

列出该用户的可用机器人。

GET /api/v1/user/robots

授权: oauth2_implicit (user:admin)

查询参数
类型Name描述模式

query

限制
可选

如果指定,则要返回的机器人数。

整数

query

令牌
可选

如果为 false,则不会返回机器人的令牌。

布尔值

query

权限
可选

是否包括机器人具有权限的存储库和团队。

布尔值

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/user/robots?limit=10&token=false&permissions=true" \
  -H "Authorization: Bearer <your_access_token>"

18.2. getOrgRobotPermissions

返回组织机器人的存储库权限列表。

GET /api/v1/organization/{orgname}/robots/{robot_shortname}/permissions

授权: oauth2_implicit (user:admin)

路径参数
类型Name描述模式

path

robot_shortname
required

机器人的短名称,没有任何用户或机构前缀

string

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  "https://quay-server.example.com/api/v1/organization/<ORGNAME>/robots/<ROBOT_SHORTNAME>/permissions"

18.3. regenerateOrgRobotToken

为机构机器人重新生成令牌。

POST /api/v1/organization/{orgname}/robots/{robot_shortname}/regenerate

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

robot_shortname
required

机器人的短名称,没有任何用户或机构前缀

string

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST \
  -H "Authorization: Bearer <bearer_token>" \
  "<quay-server.example.com>/api/v1/organization/<orgname>/robots/<robot_shortname>/regenerate"

18.4. getUserRobotPermissions

返回用户机器人的存储库权限列表。

GET /api/v1/user/robots/{robot_shortname}/permissions

授权: oauth2_implicit (user:admin)

路径参数
类型Name描述模式

path

robot_shortname
required

机器人的短名称,没有任何用户或机构前缀

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  "https://quay-server.example.com/api/v1/user/robots/<ROBOT_SHORTNAME>/permissions"

18.5. regenerateUserRobotToken

为用户的机器人重新生成令牌。

POST /api/v1/user/robots/{robot_shortname}/regenerate

授权: oauth2_implicit (user:admin)

路径参数
类型Name描述模式

path

robot_shortname
required

机器人的短名称,没有任何用户或机构前缀

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST \
  -H "Authorization: Bearer <bearer_token>" \
  "<quay-server.example.com>/api/v1/user/robots/<robot_shortname>/regenerate"

18.6. getOrgRobot

使用指定名称返回机构的机器人。

GET /api/v1/organization/{orgname}/robots/{robot_shortname}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

robot_shortname
required

机器人的短名称,没有任何用户或机构前缀

string

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  "https://quay-server.example.com/api/v1/organization/<ORGNAME>/robots/<ROBOT_SHORTNAME>"

18.7. createOrgRobot

在组织中创建一个新的机器人。

PUT /api/v1/organization/{orgname}/robots/{robot_shortname}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

robot_shortname
required

机器人的短名称,没有任何用户或机构前缀

string

path

需要OrgName

机构名称

字符串

请求正文模式(application/json)

创建机器人的可选数据

名称描述模式

description
可选

机器人的可选文本描述

字符串

unstructured_metadata
optional

机器人的可选非结构化元数据

对象

响应
HTTP 代码描述模式

201

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT   -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/organization/<organization_name>/robots/<robot_name>"

18.8. deleteOrgRobot

删除现有的组织机器人。

DELETE /api/v1/organization/{orgname}/robots/{robot_shortname}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

robot_shortname
required

机器人的短名称,没有任何用户或机构前缀

string

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
curl -X DELETE \
  -H "Authorization: Bearer <bearer_token>" \
  "<quay-server.example.com>/api/v1/organization/<organization_name>/robots/<robot_shortname>"

18.9. getOrgRobots

列出组织的机器人。

GET /api/v1/organization/{orgname}/robots

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要OrgName

机构名称

字符串

查询参数
类型Name描述模式

query

限制
可选

如果指定,则要返回的机器人数。

整数

query

令牌
可选

如果为 false,则不会返回机器人的令牌。

布尔值

query

权限
可选

是否包括机器人具有权限的存储库和团队。

布尔值

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/organization/<organization_name>/robots"

18.10. getUserRobot

返回具有指定名称的机器人。

GET /api/v1/user/robots/{robot_shortname}

授权: oauth2_implicit (user:admin)

路径参数
类型Name描述模式

path

robot_shortname
required

机器人的短名称,没有任何用户或机构前缀

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  "<quay-server.example.com>/api/v1/user/robots/<robot_shortname>"

18.11. createUserRobot

使用指定名称创建一个新用户机器人。

PUT /api/v1/user/robots/{robot_shortname}

授权: oauth2_implicit (user:admin)

路径参数
类型Name描述模式

path

robot_shortname
required

机器人的短名称,没有任何用户或机构前缀

字符串

请求正文模式(application/json)

创建机器人的可选数据

名称描述模式

description
可选

机器人的可选文本描述

字符串

unstructured_metadata
optional

机器人的可选非结构化元数据

对象

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT   -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/user/robots/<robot_name>"

18.12. deleteUserRobot

删除现有的机器人。

DELETE /api/v1/user/robots/{robot_shortname}

授权: oauth2_implicit (user:admin)

路径参数
类型Name描述模式

path

robot_shortname
required

机器人的短名称,没有任何用户或机构前缀

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE \
  -H "Authorization: Bearer <bearer_token>" \
  "<quay-server.example.com>/api/v1/user/robots/<robot_shortname>"

18.13. Auth Federated Robot Token

使用机器人身份联邦机制返回过期机器人令牌。

GET oauth2/federation/robot/token

授权: oauth2_implicit (robot:auth)

响应
HTTP 代码描述模式

200

身份验证和令牌生成成功

{ "token": "string" }

401

未授权 :缺少或无效的身份验证

{ "error": "string" }

请求正文
类型Name描述模式

正文(body)

auth_result
必需

身份验证过程的结果,其中包含有关机器人身份的信息。

{ "missing": "boolean", "error_message": "string", "context": { "robot": "RobotObject" } }

示例命令
$ curl -X GET "https://quay-server.example.com/oauth2/federation/robot/token" \
  -H "Authorization: Bearer <your_access_token>"

18.14. createOrgRobotFederation

为指定机构机器人创建联邦配置。

POST /api/v1/organization/{orgname}/robots/{robot_shortname}/federation

检索指定机构机器人的联邦配置。

授权: oauth2_implicit (user:admin)

路径参数
类型Name描述模式

path

所需的 OrgName + robot_shortname

机器人的机构名称和短名称,没有任何用户或机构前缀

string

响应
HTTP 代码描述模式

201

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

示例命令
$ curl -X POST "https://quay-server.example.com/api/v1/organization/{orgname}/robots/{robot_shortname}/federation" \
  -H "Authorization: Bearer <your_access_token>" \
  -H "Content-Type: application/json"

第 20 章 secscan

列出和管理存储库漏洞和其他安全信息。

20.1. getRepoManifestSecurity

GET /api/v1/repository/{repository}/manifest/{manifestref}/security

授权: oauth2_implicit (存储库:read)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

manifestref
必需

清单摘要

string

查询参数
类型Name描述模式

query

漏洞
可选

包括漏洞信息

布尔值

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Accept: application/json" \
  "https://quay-server.example.com/api/v1/repository/<namespace>/<repository>/manifest/<manifest_digest>/security?vulnerabilities=<true_or_false>"

第 21 章 超级用户

超级用户 API。

21.1. createInstallUser

创建新用户。

POST /api/v1/superuser/users/

授权: oauth2_implicit (超级:user)

请求正文模式(application/json)

创建用户的数据

名称描述模式

需要 的用户名

正在创建的用户的用户名

字符串

email
可选

正在创建的用户的电子邮件地址

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST -H "Authorization: Bearer <bearer_token>" -H "Content-Type: application/json" -d '{
  "username": "newuser",
  "email": "newuser@example.com"
}' "https://<quay-server.example.com>/api/v1/superuser/users/"

21.2. deleteInstallUser

删除用户。

DELETE /api/v1/superuser/users/{username}

授权: oauth2_implicit (超级:user)

请求正文模式(application/json)

删除用户的数据

Name描述模式

需要 的用户名

要删除的用户的用户名

string

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/superuser/users/{username}"

21.3. listAllUsers

返回系统中所有用户的列表。

GET /api/v1/superuser/users/

授权: oauth2_implicit (超级:user)

查询参数
类型Name描述模式

query

next_page
optional

下一页面的页面令牌

字符串

query

限制
可选

限制为每个页面返回的结果数。最大 100。

整数

query

禁用
可选

如果为 false,则仅返回启用的用户。

布尔值

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/superuser/users/"

21.4. listAllLogs

列出当前系统的使用日志。

GET /api/v1/superuser/logs

授权: oauth2_implicit (超级:user)

查询参数
类型Name描述模式

query

next_page
optional

下一页面的页面令牌

字符串

query


可选

日志的页面号

整数

query

ENDTIME
可选

获取日志的最新时间(%m/%d/%Y %Z)

字符串

query

startTime
可选

从中获取日志的最早时间(%m/%d/%Y %Z)

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  "https://<quay_server>/api/v1/superuser/logs?starttime=<start_time>&endtime=<end_time>&page=<page_number>&next_page=<next_page_token>"

21.5. listAllOrganizations

列出当前系统的机构。

GET /api/v1/superuser/organizations

授权: oauth2_implicit (超级:user)

查询参数
类型Name描述模式

path

name
必需

受管机构的名称

string

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/superuser/organizations/"

21.6. createServiceKey

POST /api/v1/superuser/keys

授权: oauth2_implicit (超级:user)

请求正文模式(application/json)

创建服务密钥的描述

名称描述模式

需要 服务

使用这个密钥验证的服务

字符串

name
可选

服务密钥的友好名称

字符串

元数据
可选

此键元数据的键/值对

对象

notes
可选

如果指定,键的额外备注

string

过期

过期日期为 unix 时间戳

 
响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Content-Type: application/json" \
  -d '{
        "service": "<service_name>",
        "expiration": <unix_timestamp>
      }' \
  "<quay_server>/api/v1/superuser/keys"

21.7. listServiceKeys

GET /api/v1/superuser/keys

授权: oauth2_implicit (超级:user)

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  "https://<quay_server>/api/v1/superuser/keys"

21.8. changeUserQuotaSuperUser

PUT /api/v1/superuser/organization/{namespace}/quota/{quota_id}

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

namespace
必需

 

字符串

path

quota_id
required

 

字符串

请求正文模式(application/json)

新机构配额的描述

名称描述模式

limit_bytes
optional

允许机构的字节数

整数

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT "https://quay-server.example.com/api/v1/superuser/organization/<namespace>/quota/<quota_id>" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "limit_bytes": <NEW_QUOTA_LIMIT>
  }'

21.9. deleteUserQuotaSuperUser

DELETE /api/v1/superuser/organization/{namespace}/quota/{quota_id}

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

namespace
必需

 

字符串

path

quota_id
required

 

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE "https://quay-server.example.com/api/v1/superuser/organization/<namespace>/quota/<quota_id>" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"

21.10. createUserQuotaSuperUser

POST /api/v1/superuser/organization/{namespace}/quota

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

namespace
必需

 

字符串

请求正文模式(application/json)

新机构配额的描述

名称描述模式

limit_bytes
required

允许机构的字节数

整数

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://quay-server.example.com/api/v1/superuser/organization/<namespace>/quota" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "limit_bytes": 10737418240
  }'

21.11. listUserQuotaSuperUser

GET /api/v1/superuser/organization/{namespace}/quota

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

namespace
必需

 

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/superuser/organization/<namespace>/quota" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"

21.12. changeOrganizationQuotaSuperUser

PUT /api/v1/superuser/users/{namespace}/quota/{quota_id}

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

namespace
必需

 

字符串

path

quota_id
required

 

字符串

请求正文模式(application/json)

新机构配额的描述

名称描述模式

limit_bytes
optional

允许机构的字节数

整数

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT "https://quay-server.example.com/api/v1/superuser/users/<username>/quota/<quota_id>" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "limit_bytes": <NEW_QUOTA_LIMIT>
  }'

21.13. deleteOrganizationQuotaSuperUser

DELETE /api/v1/superuser/users/{namespace}/quota/{quota_id}

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

namespace
必需

 

字符串

path

quota_id
required

 

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE "https://quay-server.example.com/api/v1/superuser/users/<username>/quota/<quota_id>" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"

21.14. createOrganizationQuotaSuperUser

POST /api/v1/superuser/users/{namespace}/quota

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

namespace
必需

 

字符串

请求正文模式(application/json)

新机构配额的描述

名称描述模式

limit_bytes
optional

允许机构的字节数

整数

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://quay-server.example.com/api/v1/superuser/users/<username>/quota" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
        "limit_bytes": <QUOTA_LIMIT>
      }'

21.15. listOrganizationQuotaSuperUser

GET /api/v1/superuser/users/{namespace}/quota

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

namespace
必需

 

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/superuser/users/<username>/quota" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"

21.16. changeOrganization

更新有关指定用户的信息。

PUT /api/v1/superuser/organizations/{name}

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

name
必需

受管机构的的名称

字符串

请求正文模式(application/json)

现有机构的更新描述

名称描述模式

email
可选

机构联系电子邮件

字符串

invoice_email
optional

机构是否希望接收发票的电子邮件

布尔值

invoice_email_address
optional

要接收发票的电子邮件地址

 

tag_expiration_s
optional

标签过期的秒数

整数

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Content-Type: application/json" \
  -d '{
        "email": "<contact_email>",
        "invoice_email": <boolean_value>,
        "invoice_email_address": "<invoice_email_address>",
        "tag_expiration_s": <expiration_seconds>
      }' \
  "https://<quay_server>/api/v1/superuser/organizations/<organization_name>"

21.17. deleteOrganization

删除指定的机构。

DELETE /api/v1/superuser/organizations/{name}

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

name
必需

受管机构的的名称

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE \
  -H "Authorization: Bearer <bearer_token>" \
  "https://<quay_server>/api/v1/superuser/organizations/<organization_name>"

21.18. approveServiceKey

POST /api/v1/superuser/approvedkeys/{kid}

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

kid
必需

服务密钥的唯一标识符

字符串

请求正文模式(application/json)

批准服务密钥的信息

名称描述模式

notes
可选

可选的批准备注

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Content-Type: application/json" \
  -d '{
        "notes": "<approval_notes>"
      }' \
  "https://<quay_server>/api/v1/superuser/approvedkeys/<kid>"

21.19. deleteServiceKey

DELETE /api/v1/superuser/keys/{kid}

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

kid
必需

服务密钥的唯一标识符

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE \
  -H "Authorization: Bearer <bearer_token>" \
  "https://<quay_server>/api/v1/superuser/keys/<kid>"

21.20. updateServiceKey

PUT /api/v1/superuser/keys/{kid}

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

kid
必需

服务密钥的唯一标识符

字符串

请求正文模式(application/json)

服务密钥更新的描述

名称描述模式

name
可选

服务密钥的友好名称

字符串

元数据
可选

此键元数据的键/值对

对象

过期
可选

过期日期为 unix 时间戳

 
响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Content-Type: application/json" \
  -d '{
        "name": "<service_key_name>",
        "metadata": {"<key>": "<value>"},
        "expiration": <unix_timestamp>
      }' \
  "https://<quay_server>/api/v1/superuser/keys/<kid>"

21.21. getServiceKey

GET /api/v1/superuser/keys/{kid}

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

kid
必需

服务密钥的唯一标识符

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  "https://<quay_server>/api/v1/superuser/keys/<kid>"

21.22. getRepoBuildStatusSuperUser

返回由 build uuids 指定的构建的状态。

GET /api/v1/superuser/{build_uuid}/status

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

build_uuid
required

构建的 UUID

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/superuser/<build_uuid>/status" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"

21.23. getRepoBuildSuperUser

返回有关构建的信息。

GET /api/v1/superuser/{build_uuid}/build

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

build_uuid
required

构建的 UUID

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/superuser/<build_uuid>/build" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"

21.24. getRepoBuildLogsSuperUser

返回由 build uuid 指定的构建的构建日志。

GET /api/v1/superuser/{build_uuid}/logs

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

build_uuid
required

构建的 UUID

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/superuser/<build_uuid>/logs" \
  -H "Authorization: Bearer <ACCESS_TOKEN>"

21.25. getRegistrySize

GET /api/v1/superuser/registrysize/

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

namespace
必需

 

string

镜像 registry 大小的描述

Name描述模式

size_bytes*
optional

允许机构的字节数

integer

last_ran

 

integer

Queued

 

布尔值

running

 

布尔值

响应
HTTP 代码描述模式

200

已创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  "https://<quay_server>/api/v1/superuser/registrysize/"

21.26. postRegistrySize

POST /api/v1/superuser/registrysize/

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

namespace
必需

 

字符串

请求正文模式(application/json)

镜像 registry 大小的描述

Name描述模式

last_ran

 

integer

Queued

 

布尔值

running

 

布尔值

响应
HTTP 代码描述模式

201

已创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://quay-server.example.com/api/v1/superuser/registrysize/" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "namespace": "<namespace>",
    "last_ran": 1700000000,
    "queued": true,
    "running": false
  }'

第 22 章 tag

管理存储库的标签。

22.1. restoreTag

将存储库标签恢复回存储库中以前的镜像。

POST /api/v1/repository/{repository}/tag/{tag}/restore

授权: oauth2_implicit (存储库:写)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

需要 标签

标签的名称

string

请求正文模式(application/json)

将标签恢复到特定镜像

名称描述模式

manifest_digest
required

如果指定,应使用的清单摘要

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Content-Type: application/json" \
  --data '{
    "manifest_digest": <manifest_digest>
  }' \
  quay-server.example.com/api/v1/repository/quayadmin/busybox/tag/test/restore

22.2. changeTag

更改标签指向或创建新标签的镜像。

PUT /api/v1/repository/{repository}/tag/{tag}

授权: oauth2_implicit (存储库:写)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

需要 标签

标签的名称

string

请求正文模式(application/json)

更改特定标签

名称描述模式

manifest_digest
optional

(如果指定)标签应指向的清单摘要

 

过期
可选

(如果指定)镜像的过期时间

 
响应
HTTP 代码描述模式

201

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Content-Type: application/json" \
  --data '{
    "manifest_digest": "<manifest_digest>"
  }' \
  https://<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>/tag/<tag>

22.3. deleteFullTag

删除指定的存储库标签。

DELETE /api/v1/repository/{repository}/tag/{tag}

授权: oauth2_implicit (存储库:写)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

path

需要 标签

标签的名称

string

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE "https://quay-server.example.com/api/v1/repository/<namespace>/<repo_name>/tag/<tag_name>" \
  -H "Authorization: Bearer <your_access_token>"

22.4. listRepoTags

GET /api/v1/repository/{repository}/tag/

授权: oauth2_implicit (存储库:read)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

查询参数
类型Name描述模式

query

onlyActiveTags
optional

过滤到仅活动标签。

布尔值

query


可选

结果页面索引。默认 1.

整数

query

限制
可选

限制为每个页面返回的结果数。最大 100。

整数

query

filter_tag_name
可选

语法:<op>:<name> 根据 operation.<op> 过滤标签名称,可以是 'like' 或 'eq'。

string

query

specificTag
可选

将标签过滤到特定标签。

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <bearer_token>" \
  -H "Accept: application/json" \
  https://<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>/tag/

第 23 章 team

创建、列出和管理组织的团队。

23.1. getOrganizationTeamPermissions

返回机构团队的存储库权限列表。

GET /api/v1/organization/{orgname}/team/{teamname}/permissions

授权: 

路径参数
类型Name描述模式

path

TeamName
必需

团队的名称

字符串

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <your_access_token>" \
  "<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/permissions"

23.2. updateOrganizationTeamMember

向现有团队添加或邀请成员。

PUT /api/v1/organization/{orgname}/team/{teamname}/members/{membername}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

TeamName
必需

团队的名称

字符串

path

需要 memberName

团队成员的用户名

string

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT \
  -H "Authorization: Bearer <your_access_token>" \
  "<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/members/<member_name>"

23.3. deleteOrganizationTeamMember

删除团队成员。

If the user is merely invited to join the team, then the invite is removed instead.
DELETE /api/v1/organization/{orgname}/team/{teamname}/members/{membername}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

TeamName
必需

团队的名称

字符串

path

需要 memberName

团队成员的用户名

string

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE \
  -H "Authorization: Bearer <your_access_token>" \
  "<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/members/<member_name>"

23.4. getOrganizationTeamMembers

检索指定团队的成员列表。

GET /api/v1/organization/{orgname}/team/{teamname}/members

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

TeamName
必需

团队的名称

字符串

path

需要OrgName

机构名称

字符串

查询参数
类型Name描述模式

query

包括Pending
可选

是否包含待处理的成员

布尔值

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET \
  -H "Authorization: Bearer <your_access_token>" \
  "<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/members"

23.5. inviteTeamMemberEmail

邀请现有团队的电子邮件地址。

PUT /api/v1/organization/{orgname}/team/{teamname}/invite/{email}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要 发送电子邮件

 

string

path

TeamName
必需

 

字符串

path

需要OrgName

 

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT \
  -H "Authorization: Bearer <your_access_token>" \
  "<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/invite/<email>"

23.6. deleteTeamMemberEmailInvite

删除电子邮件地址邀请您加入团队。

DELETE /api/v1/organization/{orgname}/team/{teamname}/invite/{email}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

需要 发送电子邮件

 

string

path

TeamName
必需

 

字符串

path

需要OrgName

 

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令

+

$ curl -X DELETE \
  -H "Authorization: Bearer <your_access_token>" \
  "<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/invite/<email>"

23.7. updateOrganizationTeam

为指定团队更新机构范围权限。

注意

此 API 也用于创建团队。

PUT /api/v1/organization/{orgname}/team/{teamname}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

TeamName
必需

团队的名称

字符串

path

需要OrgName

机构名称

字符串

请求正文模式(application/json)

团队的描述

名称描述模式

需要 角色

应用于团队的机构权限

字符串

description
可选

team 的 Markdown 描述

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -k -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H "Authorization: Bearer <bearer_token>"  --data '{"role": "creator"}' https://<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>

23.8. deleteOrganizationTeam

删除指定的团队。

DELETE /api/v1/organization/{orgname}/team/{teamname}

授权: oauth2_implicit (org:admin)

路径参数
类型Name描述模式

path

TeamName
必需

团队的名称

字符串

path

需要OrgName

机构名称

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE \
  -H "Authorization: Bearer <your_access_token>" \
  "<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>"

第 24 章 触发器

创建、列出和管理构建触发器。

24.1. activateBuildTrigger

激活指定的构建触发器。

POST /api/v1/repository/{repository}/trigger/{trigger_uuid}/activate

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

trigger_uuid
required

构建触发器的 UUID

字符串

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

请求正文模式(application/json)
名称描述模式

需要配置

任意 json。

对象

pull_robot
optional

用于拉取镜像的机器人名称。

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid/activate" \
  -H "Authorization: Bearer <your_access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "config": {
      "branch": "main"
    },
    "pull_robot": "example+robot"
  }'

24.2. listTriggerRecentBuilds

列出指定触发器启动的构建。

GET /api/v1/repository/{repository}/trigger/{trigger_uuid}/builds

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

trigger_uuid
required

构建触发器的 UUID

字符串

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

查询参数
类型Name描述模式

query

限制
可选

要返回的最大构建数

整数

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid/builds?limit=10" \
  -H "Authorization: Bearer <your_access_token>"

24.3. manuallyStartBuildTrigger

从指定的触发器手动启动构建。

POST /api/v1/repository/{repository}/trigger/{trigger_uuid}/start

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

trigger_uuid
required

构建触发器的 UUID

字符串

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

请求正文模式(application/json)

用于激活构建触发器的可选运行参数

名称描述模式

branch_name
可选

(仅SCM)如果指定,则构建的分支名称。

字符串

commit_sha
optional

(仅限客户)如果指定,用于签出 git 存储库的 ref/SHA1。

字符串

refs
可选

(仅SCM)如果指定,则要构建的 ref。

 
响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid/start" \
  -H "Authorization: Bearer <your_access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "branch_name": "main",
    "commit_sha": "abcdef1234567890",
    "refs": "refs/heads/main"
  }'

24.4. getBuildTrigger

获取指定构建触发器的信息。

GET /api/v1/repository/{repository}/trigger/{trigger_uuid}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

trigger_uuid
required

构建触发器的 UUID

字符串

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid" \
  -H "Authorization: Bearer <your_access_token>"

24.5. updateBuildTrigger

更新指定的构建触发器。

PUT /api/v1/repository/{repository}/trigger/{trigger_uuid}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

trigger_uuid
required

构建触发器的 UUID

字符串

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

请求正文模式(application/json)

更新构建触发器的选项

名称描述模式

需要启用

是否启用构建触发器

布尔值

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X PUT "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid" \
  -H "Authorization: Bearer <your_access_token>" \
  -H "Content-Type: application/json" \
  -d '{"enabled": true}'

24.6. deleteBuildTrigger

删除指定的构建触发器。

DELETE /api/v1/repository/{repository}/trigger/{trigger_uuid}

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

trigger_uuid
required

构建触发器的 UUID

字符串

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/example-trigger-uuid" \
  -H "Authorization: Bearer <your_access_token>"

24.7. listBuildTriggers

列出指定存储库的触发器。

GET /api/v1/repository/{repository}/trigger/

授权: oauth2_implicit (repo:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/" \
  -H "Authorization: Bearer <your_access_token>"

第 25 章 user

管理当前用户。

25.1. createStar

星级存储库.

POST /api/v1/user/starred

授权: oauth2_implicit (存储库:read)

请求正文模式(application/json)
名称描述模式

namespace
必需

存储库所属的命名空间

string

需要 仓库

仓库名称

字符串

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://quay-server.example.com/api/v1/user/starred" \
  -H "Authorization: Bearer <your_access_token>" \
  -H "Content-Type: application/json" \
  -d '{
        "namespace": "<namespace>",
        "repository": "<repository_name>"
      }'

25.2. listStarredRepos

列出所有星号的存储库。

GET /api/v1/user/starred

授权: oauth2_implicit (user:admin)

查询参数
类型Name描述模式

query

next_page
optional

下一页面的页面令牌

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/user/starred?next_page=<next_page_token>" \
  -H "Authorization: Bearer <your_access_token>"

25.3. getLoggedInUser

获取经过身份验证的用户的用户信息。

GET /api/v1/user/

授权: oauth2_implicit (user:read)

响应
HTTP 代码描述模式

200

成功调用

UserView

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/user/" \
  -H "Authorization: Bearer <your_access_token>"

25.4. deleteStar

从存储库中删除星形。

DELETE /api/v1/user/starred/{repository}

授权: oauth2_implicit (user:admin)

路径参数
类型Name描述模式

path

需要 仓库

存储库的完整路径。例如 namespace/name

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE "https://quay-server.example.com/api/v1/user/starred/namespace/repository-name" \
  -H "Authorization: Bearer <your_access_token>"

25.5. getUserInformation

获取指定用户的用户信息。

GET /api/v1/users/{username}

授权: 

路径参数
类型Name描述模式

path

需要 的用户名

 

字符串

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://quay-server.example.com/api/v1/users/example_user" \
  -H "Authorization: Bearer <your_access_token>"

第 26 章 定义

26.1. ApiError

名称描述模式

status
可选

响应的状态代码。

整数

type
可选

引用错误的类型。

字符串

详情
可选

有关错误的特定实例的详情。

字符串

title
可选

用于标识错误类型的唯一错误代码。

字符串

error_message
可选

弃用;详细信息的别名

字符串

error_type
optional

弃用;详细信息的别名

字符串

26.2. UserView

名称描述模式

验证
可选

是否验证用户的电子邮件地址

布尔值

匿名
可选

如果此用户数据代表一个客户机用户,则为 true

布尔值

email
可选

用户电子邮件地址

字符串

avatar
可选

代表用户的图标的 avatar 数据

对象

机构
可选

有关用户所属的机构的信息

对象数组

登录
可选

用户通过身份验证的外部登录供应商列表

对象数组

can_create_repo
optional

用户是否有创建存储库的权限

布尔值

preferred_namespace
optional

如果为 true,则用户的命名空间是要显示的首选命名空间

布尔值

26.3. ViewMirrorConfig

名称描述模式

is_enabled
optional

用于启用或禁用同步。

布尔值

external_reference
可选

外部存储库的位置。

字符串

external_registry_username
optional

用于与外部 registry 进行身份验证的用户名。

 

external_registry_password
optional

用于与外部 registry 进行身份验证的密码。

 

sync_start_date
optional

决定此存储库下次准备同步的时间。

字符串

sync_interval
optional

next_start_date 开始同步后的秒数。

整数

robot_username
optional

用于镜像推送的机器人的用户名。

字符串

root_rule
可选

用于决定应同步哪些标签的 glob-patterns 列表。

对象

external_registry_config
optional

 

对象

26.4. ApiErrorDescription

名称描述模式

type
可选

对错误类型资源的引用

字符串

title
可选

错误的标题。可用于唯一标识错误类型。

字符串

description
可选

有关错误的详细描述,其中包括修复此问题的帮助信息。

string

法律通告

Copyright © 2025 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.