5.6. Red Hat Quay API を使用したリポジトリの削除
Red Hat Quay API を使用してリポジトリーを削除するには、次の手順に従います。
前提条件
- OAuth アクセストークンを作成 している。
手順
次のコマンドを入力し、
DELETE /api/v1/repository/{repository}エンドポイントを使用してリポジトリーを削除します。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>"Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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>"
$ curl -X GET -H "Authorization: Bearer <bearer_token>" "<quay-server.example.com>/api/v1/repository/<namespace>/<repository_name>"Copy to Clipboard Copied! Toggle word wrap Toggle overflow 出力例
{"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}{"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}Copy to Clipboard Copied! Toggle word wrap Toggle overflow