2.2. Creating domains

POST /v3/domains

Create a domain with the specified name.

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

2.2.1. Request

2.2.1.1. Parameters

Name In Type Description
domain body object A domain object
enabled (Optional) body string

If set to true, domain is created enabled. If set to false, domain is created disabled. The default is true.

Users can only authorize against an enabled domain (and any of its projects). In addition, users can only authenticate if the domain that owns them is also enabled. Disabling a domain prevents both of these things.

description (Optional) body string The description of the domain.
name body string The name of the domain.
options (Optional) body object The resource options for the domain. Available resource options are immutable.

2.2.1.2. Example

# curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' -d '
{
    "domain": {
        "description": "Domain description",
        "name": "domain1"
    }
}' https://<node_IP_addr>:5000/v3/domains

2.2.2. Response

2.2.2.1. Parameters

Name In Type Description
domain body object A domain object
description body string The description of the domain.
enabled body string If set to true, domain is enabled. If set to false, domain is disabled.
id body string The ID of the domain.
links body object The links to the domain resource.
name body string The name of the domain.
options body object The resource options for the role. Available resource options are immutable.

2.2.2.2. Status codes

2.2.2.2.1. Success

Code Reason
201 - Created Resource was created and is ready to use.

2.2.2.2.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.

2.2.2.3. Example

{
  "domain": {
    "description": "Domain description",
    "links": {
      "self": "https://<node_IP_addr>:5000/v3/domains/f2eeaaf15c254d4fa10255796122c8ec"
    },
    "tags": [],
    "enabled": true,
    "id": "f2eeaaf15c254d4fa10255796122c8ec",
    "name": "domain1"
  }
}