Use the following procedure to delete an organization using the {productname} API.
Prerequisites
-
You have Created an OAuth access token.
-
You have set
BROWSER_API_CALLS_XHR_ONLY: false
in yourconfig.yaml
file.
Procedure
-
Enter the following command to delete an organization using the
DELETE /api/v1/organization/{orgname}
endpoint:$ curl -X DELETE \ -H "Authorization: Bearer <bearer_token>" \ "https://<quay-server.example.com>/api/v1/organization/<organization_name>"
-
The CLI does not return information when deleting an organization from the CLI. To confirm deletion, you can check the {productname} UI, or you can enter the
GET /api/v1/organization/{orgname}
command to see if details are returned for the deleted organization:$ curl -X GET \ -H "Authorization: Bearer <bearer_token>" \ "<quay-server.example.com>/api/v1/organization/<organization_name>"
Example output
{"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}