2.5. Deleting domains

DELETE /v3/domains/{domain_id}

Delete a domain with the specified ID. You need to disable the domain first.

This call also deletes all entities owned by the domain, such as users, groups, and projects, and any credentials and granted roles that relate to those entities.

If you try to delete an enabled domain, this call returns the Forbidden (403) response code.

Source: https://docs.openstack.org/api-ref/identity/v3/index.html?expanded=#delete-domain

2.5.1. Request

2.5.1.1. Parameters

Name In Type Description
domain_id path string The domain ID.

2.5.1.2. Example

Disable a domain:

# curl -ks -X PATCH -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' -d '
{
  "domain": {
    "enabled": false
  }
}' https://<node_IP_addr>:5000/v3/domains/f2eeaaf15c254d4fa10255796122c8ec

Delete a domain:

# curl -ks -X DELETE -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://<node_IP_addr>:5000/v3/domains/f2eeaaf15c254d4fa10255796122c8ec

2.5.2. Response

2.5.2.1. Status codes

2.5.2.1.1. Success

Code Reason
204 - No Content The server has fulfilled the request.

2.5.2.1.2. Error

Code Reason
400 - Bad Request Some content in the request was invalid.
401 - Unauthorized User must authenticate before making a request.
403 - Forbidden Policy does not allow current user to do this operation.
404 - Not Found The requested resource could not be found.
405 - Method Not Allowed Method is not valid for this endpoint.
409 - Conflict This operation conflicted with another operation on this resource.
413 - Request Entity Too Large The request is larger than the server is willing or able to process.
415 - Unsupported Media Type The request entity has a media type which the server or resource does not support.
503 - Service Unavailable Service is not available. This is mostly caused by service configuration errors which prevents the service from successful start up.