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)
新令牌的描述。
| 名称 | 描述 | 模式 |
|---|---|---|
|
标题 | 有助于识别令牌的友好名称 | 字符串 |
响应
示例命令
2.2. listAppTokens 复制链接链接已复制到粘贴板!
列出用户的特定应用令牌。
GET /api/v1/user/apptoken
授权: oauth2_implicit (user:admin)
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| query |
过期 | 如果为 true,则只返回这些令牌过期 | 布尔值 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <access_token>" \ "http://quay-server.example.com/api/v1/user/apptoken"
$ 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 | 特定于应用程序的 uuid | 字符串 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <access_token>" \ "http://quay-server.example.com/api/v1/user/apptoken/<token_uuid>"
$ 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 | 特定于应用程序的 uuid | 字符串 |
响应
示例命令
curl -X DELETE \ -H "Authorization: Bearer <access_token>" \ "http://quay-server.example.com/api/v1/user/apptoken/<token_uuid>"
$ 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 | 构建的 UUID | 字符串 |
响应
3.2. getRepoBuildLogs 复制链接链接已复制到粘贴板!
返回由 build uuid 指定的构建的构建日志。
GET /api/v1/repository/{repository}/build/{build_uuid}/logs
授权: oauth2_implicit (存储库:read)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
| path |
build_uuid | 构建的 UUID | 字符串 |
响应
3.3. getRepoBuild 复制链接链接已复制到粘贴板!
返回有关构建的信息。
GET /api/v1/repository/{repository}/build/{build_uuid}
授权: oauth2_implicit (存储库:read)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
| path |
build_uuid | 构建的 UUID | 字符串 |
响应
3.4. cancelRepoBuild 复制链接链接已复制到粘贴板!
取消存储库构建。
DELETE /api/v1/repository/{repository}/build/{build_uuid}
授权: oauth2_implicit (repo:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
| path |
build_uuid | 构建的 UUID | 字符串 |
响应
3.5. requestRepoBuild 复制链接链接已复制到粘贴板!
请求构建存储库并从指定的输入推送。
POST /api/v1/repository/{repository}/build/
授权: oauth2_implicit (存储库:写)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
请求正文模式(application/json)
新存储库构建的描述。
| 名称 | 描述 | 模式 |
|---|---|---|
|
file_id | 上传构建 spec 时生成的文件 ID | 字符串 |
|
archive_url | 要构建的 .tar.gz 的 URL。必须以 "http" 或 "https" 开头。 | 字符串 |
|
子目录 | 可在其中找到 Dockerfile 的子目录。您只能指定这个或 dockerfile_path | 字符串 |
|
dockerfile_path | 到 dockerfile 的路径。您只能指定此或子目录。 | 字符串 |
|
上下文 | 传递 dockerfile 的上下文。这是可选的。 | 字符串 |
|
pull_robot | 用作拉取凭证的 Quay 机器人帐户的用户名 | string |
|
标签 | 构建的镜像要推送到的标签。如果没有指定,则使用 "latest"。 |
string 数组 |
响应
3.6. getRepoBuilds 复制链接链接已复制到粘贴板!
获取存储库构建列表。
GET /api/v1/repository/{repository}/build/
授权: oauth2_implicit (存储库:read)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| query |
从 | 返回自给定的 unix 时间码后的所有构建 | 整数 |
| query |
限制 | 要返回的最大构建数 | 整数 |
响应
第 4 章 discovery 复制链接链接已复制到粘贴板!
API 发现信息。
4.1. discovery 复制链接链接已复制到粘贴板!
列出 swagger API 格式提供的所有 API 端点。
GET /api/v1/discovery
授权:
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| query |
内部 | 是否包含内部 API。 | 布尔值 |
响应
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/discovery?query=true" \
-H "Authorization: Bearer <access_token>"
$ 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 | 标识错误类型的错误代码。 | 字符串 |
响应
| HTTP 代码 | 描述 | 模式 |
|---|---|---|
| 200 | 成功调用 | |
| 400 | 错误请求 | |
| 401 | 需要会话 | |
| 403 | 未授权访问 | |
| 404 | 未找到 |
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/error/<error_type>" \
-H "Authorization: Bearer <access_token>"
$ 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 | 单个消息 | 对象 |
响应
示例命令
6.2. getGlobalMessages 复制链接链接已复制到粘贴板!
返回超级用户消息。
GET /api/v1/messages
授权:
响应
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/messages" \
-H "Authorization: Bearer <access_token>"
$ 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 | 字符串 |
响应
示例命令
curl -X DELETE "https://<quay-server.example.com>/api/v1/message/<uuid>" \
-H "Authorization: Bearer <access_token>"
$ 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"。 | 字符串 |
响应
示例命令
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>"
$ 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 | 使用到导出日志的链接调用的回调 URL | 字符串 |
|
callback_email | 通过电子邮件发送到导出日志的链接的电子邮件地址 | 字符串 |
响应
示例命令
7.3. listUserLogs 复制链接链接已复制到粘贴板!
列出当前用户的日志。
GET /api/v1/user/logs
授权: oauth2_implicit (user:admin)
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| query |
next_page | 下一页面的页面令牌 | 字符串 |
| query |
执行 | 过滤日志的用户名。 | 字符串 |
| query |
ENDTIME | 日志的最新时间。格式: UTC 为 "%m/%d/%Y"。 | 字符串 |
| query |
startTime | 日志的最早时间。格式: UTC 为 "%m/%d/%Y"。 | 字符串 |
响应
示例命令
curl -X GET -H "Authorization: Bearer <bearer_token>" -H "Accept: application/json" "<quay-server.example.com>/api/v1/user/logs"
$ 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"。 | 字符串 |
响应
示例命令
curl -X GET \
-H "Authorization: Bearer <bearer_token>" \
-H "Accept: application/json" \
"<quay-server.example.com>/api/v1/organization/{orgname}/aggregatelogs"
$ 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 | 使用到导出日志的链接调用的回调 URL | 字符串 |
|
callback_email | 通过电子邮件发送到导出日志的链接的电子邮件地址 | 字符串 |
响应
示例命令
7.6. listOrgLogs 复制链接链接已复制到粘贴板!
列出指定机构的日志。
GET /api/v1/organization/{orgname}/logs
授权: oauth2_implicit (org:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要OrgName | 机构名称 | 字符串 |
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| query |
next_page | 下一页面的页面令牌 | 字符串 |
| query |
执行 | 过滤日志的用户名。 | 字符串 |
| query |
ENDTIME | 日志的最新时间。格式: UTC 为 "%m/%d/%Y"。 | 字符串 |
| query |
startTime | 日志的最早时间。格式: UTC 为 "%m/%d/%Y"。 | 字符串 |
响应
示例命令
curl -X GET \
-H "Authorization: Bearer <bearer_token>" \
-H "Accept: application/json" \
"http://<quay-server.example.com>/api/v1/organization/{orgname}/logs"
$ 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"。 | 字符串 |
响应
示例命令
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""
$ 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 | 使用到导出日志的链接调用的回调 URL | 字符串 |
|
callback_email | 通过电子邮件发送到导出日志的链接的电子邮件地址 | 字符串 |
响应
示例命令
7.9. listRepoLogs 复制链接链接已复制到粘贴板!
列出指定存储库的日志。
GET /api/v1/repository/{repository}/logs
授权: oauth2_implicit (repo:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| query |
next_page | 下一页面的页面令牌 | 字符串 |
| query |
ENDTIME | 日志的最新时间。格式: UTC 为 "%m/%d/%Y"。 | 字符串 |
| query |
startTime | 日志的最早时间。格式: UTC 为 "%m/%d/%Y"。 | 字符串 |
响应
示例命令
curl -X GET \
-H "Authorization: Bearer <bearer_token>" \
-H "Accept: application/json" \
"http://<quay-server.example.com>/api/v1/repository/{repository}/logs"
$ 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 | 标签的 ID | string |
响应
示例命令
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>
$ 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 | 标签的 ID | string |
响应
示例命令
curl -X DELETE \ -H "Authorization: Bearer <bearer_token>" \ https://<quay-server.example.com>/api/v1/repository/<repository>/manifest/<manifestref>/labels/<labelid>
$ 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 | 此标签的介质类型 |
响应
示例命令
8.4. listManifestLabels 复制链接链接已复制到粘贴板!
GET /api/v1/repository/{repository}/manifest/{manifestref}/labels
授权: oauth2_implicit (存储库:read)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
| path |
manifestref | 清单摘要 | string |
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| query |
过滤 | 如果指定,则仅返回与给定前缀匹配的标签 | 字符串 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ -H "Accept: application/json" \ https://<quay-server.example.com>/api/v1/repository/<repository>/manifest/<manifestref>/labels
$ 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 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ -H "Accept: application/json" \ https://<quay-server.example.com>/api/v1/repository/<repository>/manifest/<manifestref>
$ 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 | 字符串 |
响应
示例命令
curl -X POST "https://<quay-server.example.com>/api/v1/repository/<namespace>/<repo>/mirror/sync-cancel" \
$ 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 | 字符串 |
响应
示例命令
curl -X POST "https://<quay-server.example.com>/api/v1/repository/<namespace>/<repo>/mirror/sync-now" \
-H "Authorization: Bearer <access_token>"
$ 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 | 成功调用 | |
| 400 | 错误请求 | |
| 401 | 需要会话 | |
| 403 | 未授权访问 | |
| 404 | 未找到 |
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/repository/<namespace>/<repo>/mirror" \
-H "Authorization: Bearer <access_token>"
$ 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 | 用于启用或禁用同步。 | 布尔值 |
|
external_reference | 外部存储库的位置。 | 字符串 |
|
external_registry_username | 用于与外部 registry 进行身份验证的用户名。 | |
|
external_registry_password | 用于与外部 registry 进行身份验证的密码。 | |
|
sync_start_date | 决定此存储库下次准备同步的时间。 | 字符串 |
|
sync_interval | next_start_date 开始同步后的秒数。 | 整数 |
|
robot_username | 用于镜像推送的机器人的用户名。 | 字符串 |
|
root_rule | 用于决定应同步哪些标签的 glob-patterns 列表。 | 对象 |
|
external_registry_config | object | |
|
skopeo_timeout_interval | 在超时前运行镜像任务的秒数。 | 整数 |
响应
示例命令
- 1
- 禁用自动同步。
9.5. createRepoMirrorConfig 复制链接链接已复制到粘贴板!
为给定存储库创建一个 RepoMirrorConfig。
POST /api/v1/repository/{repository}/mirror
授权: oauth2_implicit (repo:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
请求正文模式(application/json)
创建存储库镜像配置。
| 名称 | 描述 | 模式 |
|---|---|---|
|
is_enabled | 用于启用或禁用同步。 | 布尔值 |
|
external_reference | 外部存储库的位置。 | 字符串 |
|
external_registry_username | 用于与外部 registry 进行身份验证的用户名。 | |
|
external_registry_password | 用于与外部 registry 进行身份验证的密码。 | |
|
sync_start_date | 决定此存储库下次准备同步的时间。 | 字符串 |
|
sync_interval | next_start_date 开始同步后的秒数。 | 整数 |
|
robot_username | 用于镜像推送的机器人的用户名。 | 字符串 |
|
root_rule | 用于决定应同步哪些标签的 glob-patterns 列表。 | 对象 |
|
external_registry_config | object | |
|
skopeo_timeout_interval | 在超时前运行镜像任务的秒数。 | 整数 |
响应
示例命令
第 10 章 namespacequota 复制链接链接已复制到粘贴板!
10.1. listUserQuota 复制链接链接已复制到粘贴板!
GET /api/v1/user/quota
授权: oauth2_implicit (user:admin)
响应
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/user/quota" \ -H "Authorization: Bearer <access_token>"
$ 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 | 字符串 | |
| path |
limit_id | 字符串 | |
| path |
需要OrgName | 字符串 |
响应
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/organization/<orgname>/quota/<quota_id>/limit/<limit_id>" \
-H "Authorization: Bearer <access_token>"
$ 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 | 字符串 | |
| path |
limit_id | 字符串 | |
| path |
需要OrgName | 字符串 |
请求正文模式(application/json)
更改机构配额限制的描述
| 名称 | 描述 | 模式 |
|---|---|---|
|
type | 配额限制类型:"Warning"或"Reject" | 字符串 |
|
threshold_percent | 配额阈值,以百分比为单位 | 整数 |
响应
示例命令
10.4. deleteOrganizationQuotaLimit 复制链接链接已复制到粘贴板!
DELETE /api/v1/organization/{orgname}/quota/{quota_id}/limit/{limit_id}
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
quota_id | 字符串 | |
| path |
limit_id | 字符串 | |
| path |
需要OrgName | 字符串 |
响应
示例命令
curl -X DELETE "https://<quay-server.example.com>/api/v1/organization/<orgname>/quota/<quota_id>/limit/<limit_id>" \
-H "Authorization: Bearer <access_token>"
$ 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 | 字符串 | |
| path |
需要OrgName | 字符串 |
请求正文模式(application/json)
新机构配额限制的描述
| 名称 | 描述 | 模式 |
|---|---|---|
|
type | 配额限制类型:"Warning"或"Reject" | string |
|
threshold_percent | 配额阈值,以百分比为单位 | 整数 |
响应
示例命令
10.6. listOrganizationQuotaLimit 复制链接链接已复制到粘贴板!
GET /api/v1/organization/{orgname}/quota/{quota_id}/limit
授权:
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
quota_id | 字符串 | |
| path |
需要OrgName | 字符串 |
响应
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/organization/<orgname>/quota/<quota_id>/limit" \
-H "Authorization: Bearer <access_token>"
$ 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 | 字符串 | |
| path |
limit_id | 字符串 |
响应
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/user/quota/{quota_id}/limit/{limit_id}" \
-H "Authorization: Bearer <access_token>"
$ 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 | 字符串 |
响应
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/user/quota/{quota_id}/limit" \
-H "Authorization: Bearer <access_token>"
$ 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 | 字符串 | |
| path |
需要OrgName | 字符串 |
响应
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/organization/<orgname>/quota/<quota_id>" \
-H "Authorization: Bearer <access_token>"S
$ 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 | 字符串 | |
| path |
需要OrgName | 字符串 |
请求正文模式(application/json)
新机构配额的描述
| 名称 | 描述 | 模式 |
|---|---|---|
|
limit_bytes | 允许机构的字节数 | 整数 |
|
限制 |
组织的人类可读存储容量。接受 SI 单位,如 Mi、Gi 或 Ti,以及非标准单位(如 GB 或 MB)。必须使用 | string |
响应
示例命令
10.11. deleteOrganizationQuota 复制链接链接已复制到粘贴板!
DELETE /api/v1/organization/{orgname}/quota/{quota_id}
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
quota_id | 字符串 | |
| path |
需要OrgName | 字符串 |
响应
示例命令
curl -X DELETE "https://<quay-server.example.com>/api/v1/organization/<orgname>/quota/<quota_id>" \
-H "Authorization: Bearer <access_token>"
$ 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 | 允许机构的字节数 | 整数 |
|
限制 |
组织的人类可读存储容量。接受 SI 单位,如 Mi、Gi 或 Ti,以及非标准单位(如 GB 或 MB)。必须使用 | string |
响应
示例命令
10.13. listOrganizationQuota 复制链接链接已复制到粘贴板!
GET /api/v1/organization/{orgname}/quota
授权:
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要OrgName | 字符串 |
响应
示例命令
curl -k -X GET -H "Authorization: Bearer <token>" -H 'Content-Type: application/json' https://<quay-server.example.com>/api/v1/organization/<organization_name>/quota
$ 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 | 字符串 |
响应
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/user/quota/{quota_id}" \
-H "Authorization: Bearer <access_token>"
$ 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 | (可以禁用)recaptcha 响应代码进行验证 | 字符串 |
响应
示例命令
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/"
$ 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 | 要缓存的上游 registry 的名称 | 字符串 |
响应
示例命令
11.3. getOrganizationCollaborators 复制链接链接已复制到粘贴板!
列出指定机构的外部协作者。
GET /api/v1/organization/{orgname}/collaborators
授权: oauth2_implicit (org:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要OrgName | 机构名称 | 字符串 |
响应
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/organization/{orgname}/collaborators" \
-H "Authorization: Bearer <access_token>"
$ 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 | OAuth 客户端 ID | 字符串 |
| path |
需要OrgName | 机构名称 | 字符串 |
响应
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/organization/<orgname>/applications/<client_id>" \ -H "Authorization: Bearer <access_token>"
$ 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 | OAuth 客户端 ID | 字符串 |
| path |
需要OrgName | 机构名称 | 字符串 |
请求正文模式(application/json)
更新的应用程序的描述。
| 名称 | 描述 | 模式 |
|---|---|---|
|
name | 应用程序的名称 | 字符串 |
|
redirect_uri | 应用程序的 OAuth 重定向的 URI | 字符串 |
|
application_uri | 应用程序主页的 URI | 字符串 |
|
description | 应用程序的人类可读描述 | 字符串 |
|
avatar_email | 用于应用程序的 avatar 电子邮件地址 | 字符串 |
响应
示例命令
11.6. deleteOrganizationApplication 复制链接链接已复制到粘贴板!
删除此机构下的应用程序。
DELETE /api/v1/organization/{orgname}/applications/{client_id}
授权: oauth2_implicit (org:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
client_id | OAuth 客户端 ID | 字符串 |
| path |
需要OrgName | 机构名称 | 字符串 |
响应
示例命令
curl -X DELETE "https://<quay-server.example.com>/api/v1/organization/{orgname}/applications/{client_id}" \
-H "Authorization: Bearer <access_token>"
$ 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 | 应用程序的 OAuth 重定向的 URI | 字符串 |
|
application_uri | 应用程序主页的 URI | 字符串 |
|
description | 应用程序的人类可读描述 | 字符串 |
|
avatar_email | 用于应用程序的 avatar 电子邮件地址 | 字符串 |
响应
示例命令
11.8. getOrganizationApplications 复制链接链接已复制到粘贴板!
列出指定机构的应用程序。
GET /api/v1/organization/{orgname}/applications
授权: oauth2_implicit (org:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要OrgName | 机构名称 | 字符串 |
响应
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/organization/<orgname>/applications" \ -H "Authorization: Bearer <access_token>"
$ 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 | 机构名称 | 字符串 |
响应
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/organization/{orgname}/proxycache" \
-H "Authorization: Bearer <access_token>"
$ 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 | 机构名称 | 字符串 |
响应
示例命令
curl -X DELETE "https://<quay-server.example.com>/api/v1/organization/{orgname}/proxycache" \
-H "Authorization: Bearer <access_token>"
$ 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 | 要缓存的上游 registry 的名称 | 字符串 |
响应
示例命令
11.12. getOrganizationMember 复制链接链接已复制到粘贴板!
检索组织成员的详细信息。
GET /api/v1/organization/{orgname}/members/{membername}
授权: oauth2_implicit (org:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 memberName | 机构成员的用户名 | string |
| path |
需要OrgName | 机构名称 | 字符串 |
响应
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/organization/<orgname>/members/<membername>" \ -H "Authorization: Bearer <access_token>"
$ 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 | 机构名称 | 字符串 |
响应
示例命令
curl -X DELETE "https://<quay-server.example.com>/api/v1/organization/<orgname>/members/<membername>" \ -H "Authorization: Bearer <access_token>"
$ 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 | 机构名称 | 字符串 |
响应
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/organization/<orgname>/members" \ -H "Authorization: Bearer <access_token>"
$ 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 | 机构名称 | 字符串 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ "<quay-server.example.com>/api/v1/organization/<organization_name>"
$ 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 | 机构是否希望接收发票的电子邮件 | 布尔值 |
|
invoice_email_address | 要接收发票的电子邮件地址 | |
|
tag_expiration_s | 标签过期的秒数 | 整数 |
响应
示例命令
curl -X PUT \ -H "Authorization: Bearer <bearer_token>" \ "<quay-server.example.com>/api/v1/organization/<organization_name>"
$ 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 | 机构名称 | 字符串 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ "<quay-server.example.com>/api/v1/organization/<organization_name>"
$ 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 | OAuth 客户端 ID | 字符串 |
响应
示例命令
curl -X GET "https://<quay-server.example.com>/api/v1/app/<client_id>" \ -H "Authorization: Bearer <access_token>"
$ 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 | 字符串 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <access_token>" \ "https://quay-server.example.com/api/v1/repository/<repository_path>/permissions/user/<username>/transitive"
$ 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 | 字符串 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <access_token>" \ "https://quay-server.example.com/api/v1/repository/<repository_path>/permissions/user/<username>"
$ 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)
用户权限的描述。
| 名称 | 描述 | 模式 |
|---|---|---|
|
需要 角色 | 用户使用的角色 | 字符串 |
响应
示例命令
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>
$ 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 | 字符串 |
响应
示例命令
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>
$ 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 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <access_token>" \ "https://quay-server.example.com/api/v1/repository/<namespace>/<repository>/permissions/team/<teamname>"
$ 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)
团队权限的描述。
| 名称 | 描述 | 模式 |
|---|---|---|
|
需要 角色 | 用于团队的角色 | 字符串 |
响应
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>"
$ 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 |
响应
示例命令
curl -X DELETE \ -H "Authorization: Bearer <access_token>" \ "https://quay-server.example.com/api/v1/repository/<namespace>/<repository>/permissions/team/<teamname>"
$ 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 | 字符串 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <access_token>" \ "https://quay-server.example.com/api/v1/repository/<namespace>/<repository>/permissions/team/"
$ 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 | 字符串 |
响应
示例命令
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>/
$ 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 | 仅与此模式匹配的标签将被修剪 | string |
|
tagPatternMatches | 确定修剪的标签是否应该与 tagPattern 匹配 | 布尔值 |
响应
示例命令
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/
$ 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 | 机构名称 | 字符串 |
响应
示例命令
curl -X GET "https://quay-server.example.com/api/v1/organization/example_org/autoprunepolicy/" \ -H "Authorization: Bearer <your_access_token>"
$ 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 | 策略的唯一 ID | string |
| path |
需要OrgName | 机构名称 | 字符串 |
响应
示例命令
curl -X GET -H "Authorization: Bearer <access_token>" http://<quay-server.example.com>/api/v1/organization/<organization_name>/autoprunepolicy/<policy_uuid>
$ 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 | 策略的唯一 ID | string |
| path |
需要OrgName | 机构名称 | 字符串 |
响应
示例命令
curl -X DELETE "https://quay-server.example.com/api/v1/organization/example_org/autoprunepolicy/example_policy_uuid" \ -H "Authorization: Bearer <your_access_token>"
$ 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 | 策略的唯一 ID | string |
| path |
需要OrgName | 机构名称 | 字符串 |
请求正文模式(application/json)
要应用到用户命名空间的策略配置
| Name | 描述 | 模式 |
|---|---|---|
|
所需 方法 | 用于修剪标签的方法(number_of_tags、create_date) | string |
|
需要 的值 | 用于修剪方法的值(标签数量(如 10 个,时间 delta,如 7d (7 天)) | |
|
tagPattern | 仅与此模式匹配的标签将被修剪 | string |
|
tagPatternMatches | 确定修剪的标签是否应该与 tagPattern 匹配 | 布尔值 |
响应
示例命令
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 | 仅与此模式匹配的标签将被修剪 | string |
|
tagPatternMatches | 确定修剪的标签是否应该与 tagPattern 匹配 | 布尔值 |
响应
示例命令
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/
$ 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 | 字符串 |
响应
示例命令
curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/autoprunepolicy/" \ -H "Authorization: Bearer <your_access_token>"
$ 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 | 策略的唯一 ID | string |
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
响应
示例命令
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>"
$ 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 | 策略的唯一 ID | string |
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
响应
示例命令
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>"
$ 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 | 策略的唯一 ID | string |
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
请求正文模式(application/json)
要应用到用户命名空间的策略配置
| Name | 描述 | 模式 |
|---|---|---|
|
所需 方法 | 用于修剪标签的方法(number_of_tags、create_date) | string |
|
需要 的值 | 用于修剪方法的值(标签数量(如 10 个,时间 delta,如 7d (7 天)) | |
|
tagPattern | 仅与此模式匹配的标签将被修剪 | string |
|
tagPatternMatches | 确定修剪的标签是否应该与 tagPattern 匹配 | 布尔值 |
响应
示例命令
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 | 仅与此模式匹配的标签将被修剪 | string |
|
tagPatternMatches | 确定修剪的标签是否应该与 tagPattern 匹配 | 布尔值 |
响应
示例命令
13.12. listUserAutoPrunePolicies 复制链接链接已复制到粘贴板!
列出当前登录用户的自动修剪策略
GET /api/v1/user/autoprunepolicy/
授权: oauth2_implicit (user:admin)
响应
示例命令
curl -X GET "https://quay-server.example.com/api/v1/user/autoprunepolicy/" \ -H "Authorization: Bearer <your_access_token>"
$ 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 | 策略的唯一 ID | string |
响应
示例命令
curl -X GET "https://quay-server.example.com/api/v1/user/autoprunepolicy/{policy_uuid}" \
-H "Authorization: Bearer <your_access_token>"
$ 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 | 策略的唯一 ID | string |
响应
示例命令
curl -X DELETE "https://quay-server.example.com/api/v1/user/autoprunepolicy/<policy_uuid>" \ -H "Authorization: Bearer <your_access_token>"
$ 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 | 策略的唯一 ID | string |
请求正文模式(application/json)
要应用到用户命名空间的策略配置
| Name | 描述 | 模式 |
|---|---|---|
|
所需 方法 | 用于修剪标签的方法(number_of_tags、create_date) | string |
|
需要 的值 | 用于修剪方法的值(标签数量(如 10 个,时间 delta,如 7d (7 天)) | |
|
tagPattern | 仅与此模式匹配的标签将被修剪 | string |
|
tagPatternMatches | 确定修剪的标签是否应该与 tagPattern 匹配 | 布尔值 |
响应
示例命令
第 14 章 prototype 复制链接链接已复制到粘贴板!
管理添加到存储库的默认权限。
14.1. updateOrganizationPrototypePermission 复制链接链接已复制到粘贴板!
更新现有权限原型的角色。
PUT /api/v1/organization/{orgname}/prototypes/{prototypeid}
授权: oauth2_implicit (org:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
必要设计 | 原型的 ID | string |
| path |
需要OrgName | 机构名称 | 字符串 |
请求正文模式(application/json)
新原型角色的描述
| 名称 | 描述 | 模式 |
|---|---|---|
|
角色 | 应该应用到权限的角色 | 字符串 |
响应
示例命令
14.2. deleteOrganizationPrototypePermission 复制链接链接已复制到粘贴板!
删除现有权限设计模型。
DELETE /api/v1/organization/{orgname}/prototypes/{prototypeid}
授权: oauth2_implicit (org:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
必要设计 | 原型的 ID | string |
| path |
需要OrgName | 机构名称 | 字符串 |
响应
示例命令
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>
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 | 创建规则应该应用的用户的存储库 | object |
|
需要 委托 | 有关规则授予访问权限的用户或团队的信息 | 对象 |
响应
示例命令
14.4. getOrganizationPrototypePermissions 复制链接链接已复制到粘贴板!
列出此组织的现有原型。
GET /api/v1/organization/{orgname}/prototypes
授权: oauth2_implicit (org:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要OrgName | 机构名称 | 字符串 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ -H "Accept: application/json" \ https://<quay-server.example.com>/api/v1/organization/<organization_name>/prototypes
$ 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 | 存储库类型 |
响应
示例命令
16.2. listRepos 复制链接链接已复制到粘贴板!
在各种情况下,获取当前用户对当前用户可见的存储库列表。
GET /api/v1/repository
授权: oauth2_implicit (存储库:read)
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| query |
next_page | 下一页面的页面令牌 | 字符串 |
| query |
repo_kind | 要返回的仓库类型 | 字符串 |
| query |
popularity | 是否包含存储库的流行度指标。 | 布尔值 |
| query |
last_modified | 是否包含存储库最后一次修改的时间。 | 布尔值 |
| query |
需要 公共 | 通过 virtue public 来添加用户可见的任何软件仓库 | 布尔值 |
| query |
需要不足 | 过滤用户返回到这些存储库的存储库 | 布尔值 |
| query |
namespace | 过滤返回到此命名空间的存储库 | 字符串 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <ACCESS_TOKEN>" \ "https://quay-server.example.com/api/v1/repository?public=true&starred=false&namespace=<NAMESPACE>"
$ 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)
更改存储库的可见性。
| 名称 | 描述 | 模式 |
|---|---|---|
|
需要 可见性 | 存储库开始的可见性 | 字符串 |
响应
命令示例
16.4. changeRepoState 复制链接链接已复制到粘贴板!
更改存储库的状态。
PUT /api/v1/repository/{repository}/changestate
授权: oauth2_implicit (repo:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
请求正文模式(application/json)
更改存储库的状态。
| 名称 | 描述 | 模式 |
|---|---|---|
|
需要 状态 | 确定是否允许推送。 | 字符串 |
响应
示例命令
16.5. getRepo 复制链接链接已复制到粘贴板!
获取指定的存储库。
GET /api/v1/repository/{repository}
授权: oauth2_implicit (存储库:read)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| query |
IncludeTags | 是否包含存储库标签 | 布尔值 |
| query |
includeStats | 是否包含操作统计信息 | 布尔值 |
响应
示例命令
curl -X GET -H "Authorization: Bearer <bearer_token>" "<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>"
$ 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 编码的仓库描述 | 字符串 |
响应
示例命令
16.7. deleteRepository 复制链接链接已复制到粘贴板!
删除存储库。
DELETE /api/v1/repository/{repository}
授权: oauth2_implicit (repo:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
响应
示例命令
curl -X DELETE -H "Authorization: Bearer <bearer_token>" "<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>"
$ 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 |
响应
示例命令
curl -X POST \ -H "Authorization: Bearer <bearer_token>" \ https://<quay-server.example.com>/api/v1/repository/<repository>/notification/<uuid>/test
$ 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 |
响应
示例命令
curl -X POST \ -H "Authorization: Bearer <bearer_token>" \ https://<quay-server.example.com>/api/v1/repository/<repository>/notification/<uuid>
$ 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 |
响应
示例命令
curl -X DELETE \ -H "Authorization: Bearer <bearer_token>" \ https://<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>/notification/<uuid>
$ 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 |
响应
示例命令
curl -X POST \ -H "Authorization: Bearer <bearer_token>" \ https://<quay-server.example.com>/api/v1/repository/<repository>/notification/<uuid>
$ 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 | 通知的人类可读标题 | 字符串 |
响应
示例命令
17.6. listRepoNotifications 复制链接链接已复制到粘贴板!
列出指定存储库的通知。
GET /api/v1/repository/{repository}/notification/
授权: oauth2_implicit (repo:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
响应
示例命令
curl -X GET -H "Authorization: Bearer <bearer_token>" -H "Accept: application/json" https://<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>/notification
$ 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 |
权限 | 是否包括机器人具有权限的存储库和团队。 | 布尔值 |
响应
示例命令
curl -X GET "https://quay-server.example.com/api/v1/user/robots?limit=10&token=false&permissions=true" \ -H "Authorization: Bearer <your_access_token>"
$ 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 | 机器人的短名称,没有任何用户或机构前缀 | string |
| path |
需要OrgName | 机构名称 | 字符串 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ "https://quay-server.example.com/api/v1/organization/<ORGNAME>/robots/<ROBOT_SHORTNAME>/permissions"
$ 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 | 机器人的短名称,没有任何用户或机构前缀 | string |
| path |
需要OrgName | 机构名称 | 字符串 |
响应
示例命令
curl -X POST \ -H "Authorization: Bearer <bearer_token>" \ "<quay-server.example.com>/api/v1/organization/<orgname>/robots/<robot_shortname>/regenerate"
$ 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 | 机器人的短名称,没有任何用户或机构前缀 | 字符串 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ "https://quay-server.example.com/api/v1/user/robots/<ROBOT_SHORTNAME>/permissions"
$ 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 | 机器人的短名称,没有任何用户或机构前缀 | 字符串 |
响应
示例命令
curl -X POST \ -H "Authorization: Bearer <bearer_token>" \ "<quay-server.example.com>/api/v1/user/robots/<robot_shortname>/regenerate"
$ 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 | 机器人的短名称,没有任何用户或机构前缀 | string |
| path |
需要OrgName | 机构名称 | 字符串 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ "https://quay-server.example.com/api/v1/organization/<ORGNAME>/robots/<ROBOT_SHORTNAME>"
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 | 机器人的短名称,没有任何用户或机构前缀 | string |
| path |
需要OrgName | 机构名称 | 字符串 |
请求正文模式(application/json)
创建机器人的可选数据
| 名称 | 描述 | 模式 |
|---|---|---|
|
description | 机器人的可选文本描述 | 字符串 |
|
unstructured_metadata | 机器人的可选非结构化元数据 | 对象 |
响应
示例命令
curl -X PUT -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/organization/<organization_name>/robots/<robot_name>"
$ 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 | 机器人的短名称,没有任何用户或机构前缀 | string |
| path |
需要OrgName | 机构名称 | 字符串 |
响应
示例命令
curl -X DELETE \ -H "Authorization: Bearer <bearer_token>" \ "<quay-server.example.com>/api/v1/organization/<organization_name>/robots/<robot_shortname>"
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 |
权限 | 是否包括机器人具有权限的存储库和团队。 | 布尔值 |
响应
示例命令
curl -X GET -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/organization/<organization_name>/robots"
$ 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 | 机器人的短名称,没有任何用户或机构前缀 | 字符串 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ "<quay-server.example.com>/api/v1/user/robots/<robot_shortname>"
$ 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 | 机器人的短名称,没有任何用户或机构前缀 | 字符串 |
请求正文模式(application/json)
创建机器人的可选数据
| 名称 | 描述 | 模式 |
|---|---|---|
|
description | 机器人的可选文本描述 | 字符串 |
|
unstructured_metadata | 机器人的可选非结构化元数据 | 对象 |
响应
示例命令
curl -X PUT -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/user/robots/<robot_name>"
$ 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 | 机器人的短名称,没有任何用户或机构前缀 | 字符串 |
响应
示例命令
curl -X DELETE \ -H "Authorization: Bearer <bearer_token>" \ "<quay-server.example.com>/api/v1/user/robots/<robot_shortname>"
$ 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>"
$ 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_shortnamerequired | 机器人的机构名称和短名称,没有任何用户或机构前缀 | string |
响应
示例命令
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"
$ 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"
第 19 章 search 复制链接链接已复制到粘贴板!
对所有 registry 上下文执行搜索。
19.1. conductRepoSearch 复制链接链接已复制到粘贴板!
获取与指定查询匹配的应用程序和存储库列表。
GET /api/v1/find/repositories
授权:
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| query |
includeUsage | 是否包含使用元数据 | 布尔值 |
| query |
页 | 该页面。 | 整数 |
| query |
query | 搜索查询。 | 字符串 |
响应
示例命令
curl -X GET "https://quay-server.example.com/api/v1/find/repositories?query=<repo_name>&page=1&includeUsage=true" \ -H "Authorization: Bearer <bearer_token>"
$ curl -X GET "https://quay-server.example.com/api/v1/find/repositories?query=<repo_name>&page=1&includeUsage=true" \
-H "Authorization: Bearer <bearer_token>"
19.2. conductSearch 复制链接链接已复制到粘贴板!
获取与指定查询匹配的实体和资源列表。
GET /api/v1/find/all
授权: oauth2_implicit (存储库:read)
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| query |
query | 搜索查询。 | 字符串 |
响应
示例命令
curl -X GET "https://quay-server.example.com/api/v1/find/all?query=<mysearchterm>" \ -H "Authorization: Bearer <bearer_token>"
$ curl -X GET "https://quay-server.example.com/api/v1/find/all?query=<mysearchterm>" \
-H "Authorization: Bearer <bearer_token>"
19.3. getMatchingEntities 复制链接链接已复制到粘贴板!
获取与指定前缀匹配的实体列表。
GET /api/v1/entities/{prefix}
授权:
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
所需 前缀 | 字符串 |
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| query |
includeOrgs | 是否包含机构名称。 | 布尔值 |
| query |
includeTeams | 是否包含团队名称。 | 布尔值 |
| query |
namespace | 在查询机构实体时要使用的命名空间。 | 字符串 |
响应
示例命令
curl -X GET "https://quay-server.example.com/api/v1/entities/<prefix>?includeOrgs=<true_or_false>&includeTeams=<true_or_false>&namespace=<namespace>" \ -H "Authorization: Bearer <bearer_token>"
$ curl -X GET "https://quay-server.example.com/api/v1/entities/<prefix>?includeOrgs=<true_or_false>&includeTeams=<true_or_false>&namespace=<namespace>" \
-H "Authorization: Bearer <bearer_token>"
第 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 |
漏洞 | 包括漏洞信息 | 布尔值 |
响应
示例命令
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>"
$ 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 章 superuser 复制链接链接已复制到粘贴板!
超级用户 API。
21.1. getConfigDump 复制链接链接已复制到粘贴板!
返回 Quay 实例的完整配置转储。
GET /api/v1/superuser/config
授权: oauth2_implicit (super:user)
响应
响应结构
JSON 响应包括以下顶级键:
| Name | 描述 | 模式 |
|---|---|---|
| Flask 应用程序使用的所有 config.yaml 和默认参数作为定义的 schema。 | object | |
| 在 schema 中没有定义 config.yaml 或 defaults 中的任何参数。 | object | |
| Flask 应用程序可用的所有环境变量。 | object | |
| 定义预期密钥和类型的完整配置架构(CONFIG_SCHEMA)。 | object |
示例命令
curl -X GET -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/superuser/config" | jq -r .config
$ curl -X GET -H "Authorization: Bearer <bearer_token>"
"https://<quay-server.example.com>/api/v1/superuser/config" | jq -r .config
21.2. createInstallUser 复制链接链接已复制到粘贴板!
创建新用户。
POST /api/v1/superuser/users/
授权: oauth2_implicit (超级:user)
请求正文模式(application/json)
创建用户的数据
| 名称 | 描述 | 模式 |
|---|---|---|
|
需要 的用户名 | 正在创建的用户的用户名 | 字符串 |
|
email | 正在创建的用户的电子邮件地址 | 字符串 |
响应
示例命令
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/"
$ 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.3. changeInstallUser 复制链接链接已复制到粘贴板!
更新有关指定用户的信息。
PUT /api/v1/superuser/users/{username}
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 的用户名 | 受管用户的用户名 | string |
请求正文模式(application/json)
用户的更新描述
| Name | 描述 | 模式 |
|---|---|---|
|
password | 用户的新密码 | string |
|
email | 用户的新电子邮件地址 | string |
|
启用 | 是否启用用户 | 布尔值 |
响应
示例命令
21.4. deleteInstallUser 复制链接链接已复制到粘贴板!
删除用户。
DELETE /api/v1/superuser/users/{username}
授权: oauth2_implicit (超级:user)
请求正文模式(application/json)
删除用户的数据
| Name | 描述 | 模式 |
|---|---|---|
|
需要 的用户名 | 要删除的用户的用户名 | string |
响应
示例命令
curl -X DELETE -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/superuser/users/{username}"
$ curl -X DELETE -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/superuser/users/{username}"
21.5. listAllUsers 复制链接链接已复制到粘贴板!
返回系统中所有用户的列表。
GET /api/v1/superuser/users/
授权: oauth2_implicit (超级:user)
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| query |
next_page | 下一页面的页面令牌 | 字符串 |
| query |
限制 | 限制为每个页面返回的结果数。最大 100。 | 整数 |
| query |
禁用 | 如果为 false,则仅返回启用的用户。 | 布尔值 |
响应
示例命令
curl -X GET -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/superuser/users/"
$ curl -X GET -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/superuser/users/"
21.6. listAllLogs 复制链接链接已复制到粘贴板!
列出当前系统的使用日志。
GET /api/v1/superuser/logs
授权: oauth2_implicit (超级:user)
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| query |
next_page | 下一页面的页面令牌 | 字符串 |
| query |
页 | 日志的页面号 | 整数 |
| query |
ENDTIME | 获取日志的最新时间(%m/%d/%Y %Z) | 字符串 |
| query |
startTime | 从中获取日志的最早时间(%m/%d/%Y %Z) | 字符串 |
响应
示例命令
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>"
$ 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.7. listAllOrganizations 复制链接链接已复制到粘贴板!
列出当前系统的机构。
GET /api/v1/superuser/organizations
授权: oauth2_implicit (超级:user)
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
name | 受管机构的名称 | string |
响应
示例命令
curl -X GET -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/superuser/organizations/"
$ curl -X GET -H "Authorization: Bearer <bearer_token>" "https://<quay-server.example.com>/api/v1/superuser/organizations/"
21.8. createServiceKey 复制链接链接已复制到粘贴板!
POST /api/v1/superuser/keys
授权: oauth2_implicit (超级:user)
请求正文模式(application/json)
创建服务密钥的描述
| 名称 | 描述 | 模式 |
|---|---|---|
|
需要 服务 | 使用这个密钥验证的服务 | string |
|
name | 服务密钥的友好名称 | string |
|
元数据 | 此键元数据的键/值对 | 对象 |
|
notes | 如果指定,键的额外备注 | string |
|
过期 | 过期日期为 unix 时间戳 |
响应
示例命令
21.9. listServiceKeys 复制链接链接已复制到粘贴板!
GET /api/v1/superuser/keys
授权: oauth2_implicit (超级:user)
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ "https://<quay_server>/api/v1/superuser/keys"
$ curl -X GET \
-H "Authorization: Bearer <bearer_token>" \
"https://<quay_server>/api/v1/superuser/keys"
21.10. changeUserQuotaSuperUser 复制链接链接已复制到粘贴板!
PUT /api/v1/superuser/organization/{namespace}/quota/{quota_id}
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
namespace | 字符串 | |
| path |
quota_id | 字符串 |
请求正文模式(application/json)
新机构配额的描述
| 名称 | 描述 | 模式 |
|---|---|---|
|
limit_bytes | 允许机构的字节数 | 整数 |
响应
示例命令
21.11. deleteUserQuotaSuperUser 复制链接链接已复制到粘贴板!
DELETE /api/v1/superuser/organization/{namespace}/quota/{quota_id}
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
namespace | 字符串 | |
| path |
quota_id | 字符串 |
响应
示例命令
curl -X DELETE "https://quay-server.example.com/api/v1/superuser/organization/<namespace>/quota/<quota_id>" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
$ curl -X DELETE "https://quay-server.example.com/api/v1/superuser/organization/<namespace>/quota/<quota_id>" \
-H "Authorization: Bearer <ACCESS_TOKEN>"
21.12. createUserQuotaSuperUser 复制链接链接已复制到粘贴板!
POST /api/v1/superuser/organization/{namespace}/quota
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
namespace | 字符串 |
请求正文模式(application/json)
新机构配额的描述
| 名称 | 描述 | 模式 |
|---|---|---|
|
limit_bytes | 允许机构的字节数 | 整数 |
响应
示例命令
21.13. listUserQuotaSuperUser 复制链接链接已复制到粘贴板!
GET /api/v1/superuser/organization/{namespace}/quota
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
namespace | 字符串 |
响应
示例命令
curl -X GET "https://quay-server.example.com/api/v1/superuser/organization/<namespace>/quota" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
$ curl -X GET "https://quay-server.example.com/api/v1/superuser/organization/<namespace>/quota" \
-H "Authorization: Bearer <ACCESS_TOKEN>"
21.14. changeOrganizationQuotaSuperUser 复制链接链接已复制到粘贴板!
PUT /api/v1/superuser/users/{namespace}/quota/{quota_id}
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
namespace | 字符串 | |
| path |
quota_id | 字符串 |
请求正文模式(application/json)
新机构配额的描述
| 名称 | 描述 | 模式 |
|---|---|---|
|
limit_bytes | 允许机构的字节数 | 整数 |
响应
示例命令
21.15. deleteOrganizationQuotaSuperUser 复制链接链接已复制到粘贴板!
DELETE /api/v1/superuser/users/{namespace}/quota/{quota_id}
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
namespace | 字符串 | |
| path |
quota_id | 字符串 |
响应
示例命令
curl -X DELETE "https://quay-server.example.com/api/v1/superuser/users/<username>/quota/<quota_id>" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
$ curl -X DELETE "https://quay-server.example.com/api/v1/superuser/users/<username>/quota/<quota_id>" \
-H "Authorization: Bearer <ACCESS_TOKEN>"
21.16. createOrganizationQuotaSuperUser 复制链接链接已复制到粘贴板!
POST /api/v1/superuser/users/{namespace}/quota
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
namespace | 字符串 |
请求正文模式(application/json)
新机构配额的描述
| 名称 | 描述 | 模式 |
|---|---|---|
|
limit_bytes | 允许机构的字节数 | 整数 |
响应
示例命令
21.17. listOrganizationQuotaSuperUser 复制链接链接已复制到粘贴板!
GET /api/v1/superuser/users/{namespace}/quota
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
namespace | 字符串 |
响应
示例命令
curl -X GET "https://quay-server.example.com/api/v1/superuser/users/<username>/quota" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
$ curl -X GET "https://quay-server.example.com/api/v1/superuser/users/<username>/quota" \
-H "Authorization: Bearer <ACCESS_TOKEN>"
21.18. changeOrganization 复制链接链接已复制到粘贴板!
更新有关指定用户的信息。
PUT /api/v1/superuser/organizations/{name}
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
name | 受管机构的的名称 | 字符串 |
请求正文模式(application/json)
现有机构的更新描述
| 名称 | 描述 | 模式 |
|---|---|---|
|
email | 机构联系电子邮件 | 字符串 |
|
invoice_email | 机构是否希望接收发票的电子邮件 | 布尔值 |
|
invoice_email_address | 要接收发票的电子邮件地址 | |
|
tag_expiration_s | 标签过期的秒数 | 整数 |
响应
示例命令
21.19. deleteOrganization 复制链接链接已复制到粘贴板!
删除指定的机构。
DELETE /api/v1/superuser/organizations/{name}
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
name | 受管机构的的名称 | 字符串 |
响应
示例命令
curl -X DELETE \ -H "Authorization: Bearer <bearer_token>" \ "https://<quay_server>/api/v1/superuser/organizations/<organization_name>"
$ curl -X DELETE \
-H "Authorization: Bearer <bearer_token>" \
"https://<quay_server>/api/v1/superuser/organizations/<organization_name>"
21.20. approveServiceKey 复制链接链接已复制到粘贴板!
POST /api/v1/superuser/approvedkeys/{kid}
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
kid | 服务密钥的唯一标识符 | 字符串 |
请求正文模式(application/json)
批准服务密钥的信息
| 名称 | 描述 | 模式 |
|---|---|---|
|
notes | 可选的批准备注 | 字符串 |
响应
示例命令
21.21. deleteServiceKey 复制链接链接已复制到粘贴板!
DELETE /api/v1/superuser/keys/{kid}
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
kid | 服务密钥的唯一标识符 | 字符串 |
响应
示例命令
curl -X DELETE \ -H "Authorization: Bearer <bearer_token>" \ "https://<quay_server>/api/v1/superuser/keys/<kid>"
$ curl -X DELETE \
-H "Authorization: Bearer <bearer_token>" \
"https://<quay_server>/api/v1/superuser/keys/<kid>"
21.22. updateServiceKey 复制链接链接已复制到粘贴板!
PUT /api/v1/superuser/keys/{kid}
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
kid | 服务密钥的唯一标识符 | 字符串 |
请求正文模式(application/json)
服务密钥更新的描述
| 名称 | 描述 | 模式 |
|---|---|---|
|
name | 服务密钥的友好名称 | 字符串 |
|
元数据 | 此键元数据的键/值对 | 对象 |
|
过期 | 过期日期为 unix 时间戳 |
响应
示例命令
21.23. getServiceKey 复制链接链接已复制到粘贴板!
GET /api/v1/superuser/keys/{kid}
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
kid | 服务密钥的唯一标识符 | 字符串 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ "https://<quay_server>/api/v1/superuser/keys/<kid>"
$ curl -X GET \
-H "Authorization: Bearer <bearer_token>" \
"https://<quay_server>/api/v1/superuser/keys/<kid>"
21.24. getRepoBuildStatusSuperUser 复制链接链接已复制到粘贴板!
返回由 build uuids 指定的构建的状态。
GET /api/v1/superuser/{build_uuid}/status
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
build_uuid | 构建的 UUID | 字符串 |
响应
示例命令
curl -X GET "https://quay-server.example.com/api/v1/superuser/<build_uuid>/status" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
$ curl -X GET "https://quay-server.example.com/api/v1/superuser/<build_uuid>/status" \
-H "Authorization: Bearer <ACCESS_TOKEN>"
21.25. getRepoBuildSuperUser 复制链接链接已复制到粘贴板!
返回有关构建的信息。
GET /api/v1/superuser/{build_uuid}/build
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
build_uuid | 构建的 UUID | 字符串 |
响应
示例命令
curl -X GET "https://quay-server.example.com/api/v1/superuser/<build_uuid>/build" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
$ curl -X GET "https://quay-server.example.com/api/v1/superuser/<build_uuid>/build" \
-H "Authorization: Bearer <ACCESS_TOKEN>"
21.26. getRepoBuildLogsSuperUser 复制链接链接已复制到粘贴板!
返回由 build uuid 指定的构建的构建日志。
GET /api/v1/superuser/{build_uuid}/logs
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
build_uuid | 构建的 UUID | 字符串 |
响应
示例命令
curl -X GET "https://quay-server.example.com/api/v1/superuser/<build_uuid>/logs" \ -H "Authorization: Bearer <ACCESS_TOKEN>"
$ curl -X GET "https://quay-server.example.com/api/v1/superuser/<build_uuid>/logs" \
-H "Authorization: Bearer <ACCESS_TOKEN>"
21.27. getRegistrySize 复制链接链接已复制到粘贴板!
GET /api/v1/superuser/registrysize/
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
namespace | string |
镜像 registry 大小的描述
| Name | 描述 | 模式 |
|---|---|---|
|
size_bytes* | 允许机构的字节数 | 整数 |
| last_ran | 整数 | |
| Queued | 布尔值 | |
| running | 布尔值 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ "https://<quay_server>/api/v1/superuser/registrysize/"
$ curl -X GET \
-H "Authorization: Bearer <bearer_token>" \
"https://<quay_server>/api/v1/superuser/registrysize/"
21.28. postRegistrySize 复制链接链接已复制到粘贴板!
POST /api/v1/superuser/registrysize/
授权: oauth2_implicit (超级:user)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
namespace | 字符串 |
请求正文模式(application/json)
镜像 registry 大小的描述
| Name | 描述 | 模式 |
|---|---|---|
| last_ran | 整数 | |
| Queued | 布尔值 | |
| running | 布尔值 |
响应
示例命令
第 22 章 tag 复制链接链接已复制到粘贴板!
管理存储库的标签。
22.1. restoreTag 复制链接链接已复制到粘贴板!
将存储库标签恢复回存储库中以前的镜像。
POST /api/v1/repository/{repository}/tag/{tag}/restore
授权: oauth2_implicit (存储库:写)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | string |
| path |
需要 标签 | 标签的名称 | string |
请求正文模式(application/json)
将标签恢复到特定镜像
| 名称 | 描述 | 模式 |
|---|---|---|
|
manifest_digest | 如果指定,应使用的清单摘要 | 字符串 |
响应
示例命令
22.2. changeTag 复制链接链接已复制到粘贴板!
更改标签指向或创建新标签的镜像。
PUT /api/v1/repository/{repository}/tag/{tag}
授权: oauth2_implicit (存储库:写)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | string |
| path |
需要 标签 | 标签的名称 | string |
请求正文模式(application/json)
更改特定标签
| 名称 | 描述 | 模式 |
|---|---|---|
|
manifest_digest | (如果指定)标签应指向的清单摘要 | |
|
过期 | (如果指定)镜像的过期时间 |
响应
示例命令
22.3. deleteFullTag 复制链接链接已复制到粘贴板!
删除指定的存储库标签。
DELETE /api/v1/repository/{repository}/tag/{tag}
授权: oauth2_implicit (存储库:写)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | string |
| path |
需要 标签 | 标签的名称 | string |
响应
示例命令
curl -X DELETE "https://quay-server.example.com/api/v1/repository/<namespace>/<repo_name>/tag/<tag_name>" \ -H "Authorization: Bearer <your_access_token>"
$ 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 | 过滤到仅活动标签。 | 布尔值 |
| query |
页 | 结果页面索引。默认 1. | 整数 |
| query |
限制 | 限制为每个页面返回的结果数。最大 100。 | 整数 |
| query |
filter_tag_name | 语法:<op>:<name> 根据 operation.<op> 过滤标签名称,可以是 'like' 或 'eq'。 | 字符串 |
| query |
specificTag | 将标签过滤到特定标签。 | 字符串 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ -H "Accept: application/json" \ https://<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>/tag/
$ 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 | 机构名称 | 字符串 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <your_access_token>" \ "<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/permissions"
$ 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 | 团队成员的用户名 | 字符串 |
| path |
需要OrgName | 机构名称 | 字符串 |
响应
示例命令
curl -X PUT \ -H "Authorization: Bearer <your_access_token>" \ "<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/members/<member_name>"
$ 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.
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 | 团队成员的用户名 | 字符串 |
| path |
需要OrgName | 机构名称 | 字符串 |
响应
示例命令
curl -X DELETE \ -H "Authorization: Bearer <your_access_token>" \ "<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/members/<member_name>"
$ 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 | 是否包含待处理的成员 | 布尔值 |
响应
示例命令
curl -X GET \ -H "Authorization: Bearer <your_access_token>" \ "<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/members"
$ 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 |
需要 发送电子邮件 | 字符串 | |
| path |
TeamName | 字符串 | |
| path |
需要OrgName | 字符串 |
响应
示例命令
curl -X PUT \ -H "Authorization: Bearer <your_access_token>" \ "<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/invite/<email>"
$ 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 |
需要 发送电子邮件 | 字符串 | |
| path |
TeamName | 字符串 | |
| path |
需要OrgName | 字符串 |
响应
示例命令
+
curl -X DELETE \ -H "Authorization: Bearer <your_access_token>" \ "<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>/invite/<email>"
$ 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 描述 | 字符串 |
响应
示例命令
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>
$ 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 | 机构名称 | 字符串 |
响应
示例命令
curl -X DELETE \ -H "Authorization: Bearer <your_access_token>" \ "<quay-server.example.com>/api/v1/organization/<organization_name>/team/<team_name>"
$ 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 | 构建触发器的 UUID | 字符串 |
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
请求正文模式(application/json)
| 名称 | 描述 | 模式 |
|---|---|---|
|
需要配置 | 任意 json。 | 对象 |
|
pull_robot | 用于拉取镜像的机器人名称。 | 字符串 |
响应
示例命令
24.2. listTriggerRecentBuilds 复制链接链接已复制到粘贴板!
列出指定触发器启动的构建。
GET /api/v1/repository/{repository}/trigger/{trigger_uuid}/builds
授权: oauth2_implicit (repo:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
trigger_uuid | 构建触发器的 UUID | 字符串 |
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| query |
限制 | 要返回的最大构建数 | 整数 |
响应
示例命令
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>"
$ 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 | 构建触发器的 UUID | 字符串 |
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
请求正文模式(application/json)
用于激活构建触发器的可选运行参数
| 名称 | 描述 | 模式 |
|---|---|---|
|
branch_name | (仅SCM)如果指定,则构建的分支名称。 | 字符串 |
|
commit_sha | (仅限客户)如果指定,用于签出 git 存储库的 ref/SHA1。 | 字符串 |
|
refs | (仅SCM)如果指定,则要构建的 ref。 |
响应
示例命令
24.4. getBuildTrigger 复制链接链接已复制到粘贴板!
获取指定构建触发器的信息。
GET /api/v1/repository/{repository}/trigger/{trigger_uuid}
授权: oauth2_implicit (repo:admin)
路径参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| path |
trigger_uuid | 构建触发器的 UUID | 字符串 |
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
响应
示例命令
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>"
$ 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 | 构建触发器的 UUID | 字符串 |
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
请求正文模式(application/json)
更新构建触发器的选项
| 名称 | 描述 | 模式 |
|---|---|---|
|
需要启用 | 是否启用构建触发器 | 布尔值 |
响应
示例命令
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}'
$ 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 | 构建触发器的 UUID | 字符串 |
| path |
需要 仓库 | 存储库的完整路径。例如 namespace/name | 字符串 |
响应
示例命令
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>"
$ 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 | 字符串 |
响应
示例命令
curl -X GET "https://quay-server.example.com/api/v1/repository/example_namespace/example_repo/trigger/" \ -H "Authorization: Bearer <your_access_token>"
$ 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 | 存储库所属的命名空间 | 字符串 |
|
需要 仓库 | 仓库名称 | 字符串 |
响应
示例命令
25.2. listStarredRepos 复制链接链接已复制到粘贴板!
列出所有星号的存储库。
GET /api/v1/user/starred
授权: oauth2_implicit (user:admin)
查询参数
| 类型 | Name | 描述 | 模式 |
|---|---|---|---|
| query |
next_page | 下一页面的页面令牌 | 字符串 |
响应
示例命令
curl -X GET "https://quay-server.example.com/api/v1/user/starred?next_page=<next_page_token>" \ -H "Authorization: Bearer <your_access_token>"
$ 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 | 成功调用 | |
| 400 | 错误请求 | |
| 401 | 需要会话 | |
| 403 | 未授权访问 | |
| 404 | 未找到 |
示例命令
curl -X GET "https://quay-server.example.com/api/v1/user/" \ -H "Authorization: Bearer <your_access_token>"
$ 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 | 字符串 |
响应
示例命令
curl -X DELETE "https://quay-server.example.com/api/v1/user/starred/namespace/repository-name" \ -H "Authorization: Bearer <your_access_token>"
$ 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 |
需要 的用户名 | 字符串 |
响应
示例命令
curl -X GET "https://quay-server.example.com/api/v1/users/example_user" \ -H "Authorization: Bearer <your_access_token>"
$ 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 | 弃用;详细信息的别名 | 字符串 |
26.2. UserView 复制链接链接已复制到粘贴板!
| 名称 | 描述 | 模式 |
|---|---|---|
|
验证 | 是否验证用户的电子邮件地址 | 布尔值 |
|
匿名 | 如果此用户数据代表一个客户机用户,则为 true | 布尔值 |
|
email | 用户电子邮件地址 | 字符串 |
|
avatar | 代表用户的图标的 avatar 数据 | 对象 |
|
机构 | 有关用户所属的机构的信息 |
对象数组 |
|
登录 | 用户通过身份验证的外部登录供应商列表 |
对象数组 |
|
can_create_repo | 用户是否有创建存储库的权限 | 布尔值 |
|
preferred_namespace | 如果为 true,则用户的命名空间是要显示的首选命名空间 | 布尔值 |
26.3. ViewMirrorConfig 复制链接链接已复制到粘贴板!
| 名称 | 描述 | 模式 |
|---|---|---|
|
is_enabled | 用于启用或禁用同步。 | 布尔值 |
|
external_reference | 外部存储库的位置。 | 字符串 |
|
external_registry_username | 用于与外部 registry 进行身份验证的用户名。 | |
|
external_registry_password | 用于与外部 registry 进行身份验证的密码。 | |
|
sync_start_date | 决定此存储库下次准备同步的时间。 | 字符串 |
|
sync_interval | next_start_date 开始同步后的秒数。 | 整数 |
|
robot_username | 用于镜像推送的机器人的用户名。 | 字符串 |
|
root_rule | 用于决定应同步哪些标签的 glob-patterns 列表。 | 对象 |
|
external_registry_config | 对象 |
26.4. ApiErrorDescription 复制链接链接已复制到粘贴板!
| 名称 | 描述 | 模式 |
|---|---|---|
|
type | 对错误类型资源的引用 | string |
|
title | 错误的标题。可用于唯一标识错误类型。 | string |
|
description | 有关错误的详细描述,其中包括修复此问题的帮助信息。 | string |