Updated on 2023-06-12 GMT+08:00

Domain for Creating a Project

Function

Querying the Domain List of a Project

URI

POST /v4/projects/{project_id}/domain

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the 32-bit ID of the devcloud project.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

domain_name

Yes

String

Domain Name

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

domain_name

String

Domain Name

domain_id

String

Identifies a domain.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Description

error_code

String

Error Codes

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_msg

String

Description

error_code

String

Error Codes

Example Requests

Post https://{endpoint}/v4/projects/0792b7d26cb74bd799cbae80063dc74a/domains

{
  "domain_name" : "demo"
}

Example Responses

Status code: 200

OK

{
  "domain_name" : "demo",
  "domain_id" : "123cefde62004de2b62b5e8dd2c2b3af"
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

Error Codes

See Error Codes.