Help Center/ CodeArts Req/ API Reference/ APIs/ Project Information/ Check whether the project name exists.
Updated on 2023-06-12 GMT+08:00

Check whether the project name exists.

Function

Check whether the project name exists.

URI

POST /v4/projects/check-name

Request Parameters

Table 1 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.

Minimum: 10

Maximum: 32768

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

project_name

Yes

String

Project name

Minimum: 1

Maximum: 128

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

exist

Boolean

Indicates whether the same project name exists. true: yes; false: no

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_msg

String

Description

error_code

String

Error Codes

Status code: 401

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Description

error_code

String

Error Codes

Example Requests

Post https://{endpoint}/v4/projects/check-name

{
  "project_name" : "testDemo"
}

Example Responses

Status code: 200

OK

{
  "exist" : true
}

Status Codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

Error Codes

See Error Codes.