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-detail#create-domain

Request

Parameters

Name In Type Description
domain body object A domain object.
description (Optional) body string The description of the domain.
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.

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

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

Response

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.

Status codes

Success

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

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.

Example

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