搜索

4.5. 使用 Red Hat Quay API 删除软件仓库

download PDF

使用以下步骤使用 Red Hat Quay API 删除存储库。

先决条件

  • 您已创建了 OAuth 访问令牌
  • 您已在 config.yaml 文件中设置了 BROWSER_API_CALLS_XHR_ONLY: false

流程

  1. 输入以下命令使用 DELETE /api/v1/repository/{repository} 端点删除存储库:

    $ curl -X DELETE   -H "Authorization: Bearer <bearer_token>" "quay-server.example.com/api/v1/repository/<namespace>/<repository_name>"
  2. 从 CLI 删除存储库时,CLI 不会返回信息。要确认删除操作,您可以检查 Red Hat Quay UI,或者您可以输入以下 GET /api/v1/repository/{repository} 命令来查看是否返回已删除存储库的详情:

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

    输出示例

    {"detail": "Not Found", "error_message": "Not Found", "error_type": "not_found", "title": "not_found", "type": "http://quay-server.example.com/api/v1/error/not_found", "status": 404}
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

© 2024 Red Hat, Inc.