Updated on 2025-10-29 GMT+08:00

Creating a Dictionary

Function

This API is used to create dictionary data.

Calling Method

For details, see Calling APIs.

URI

POST /v1/{project_id}/configurations/dictionaries

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID, which is used to specify the project that a resource belongs to. You can query the resources of a project by project ID. You can obtain the project ID from the API or console. Obtaining the Project ID

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

You can obtain it by calling the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the user token.

X-Language

Yes

String

Current language.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

dict_list

No

Array of DictionaryCreate objects

Dictionary list.

is_built_in

No

Boolean

Whether to create a built-in dictionary.

Table 4 DictionaryCreate

Parameter

Mandatory

Type

Description

version

No

String

Version number.

dict_id

No

String

Dictionary ID.

dict_key

No

String

Dictionary key.

dict_code

No

String

Dictionary code.

dict_val

No

String

Dictionary value.

dict_pkey

No

String

Dictionary key.

dict_pcode

No

String

Parent code associated with the dictionary.

scope

No

String

Domain the dictionary belongs to.

description

No

String

Dictionary description.

extend_field

No

Object

Additional field.

project_id

No

String

Definition

Project ID, which is used to specify the project that a resource belongs to. You can query the resources of a project by project ID. You can obtain the project ID from the API or console. Obtaining the Project ID

Constraints

N/A

Range

N/A

Default Value

N/A

language

No

String

Current language.

Response Parameters

Status code: 200

Table 5 Response body parameters

Parameter

Type

Description

success_list

Array of Dictionary objects

Normal dictionary list.

failed_list

Array of Dictionary objects

Abnormal dictionary list

Table 6 Dictionary

Parameter

Type

Description

id

String

uuid

version

String

Version number.

dict_id

String

Dictionary ID.

dict_key

String

Dictionary key.

dict_code

String

Dictionary code.

dict_val

String

Dictionary value.

dict_pkey

String

Parent key associated with the dictionary.

dict_pcode

String

Parent code associated with the dictionary.

create_time

String

Creation time.

update_time

String

Update time.

publish_time

String

Release time.

scope

String

Domain the dictionary belongs to.

description

String

Dictionary description.

extension_field

Object

Additional field.

project_id

String

Definition

Project ID, which is used to specify the project that a resource belongs to. You can query the resources of a project by project ID. You can obtain the project ID from the API or console. Obtaining the Project ID

Constraints

N/A

Range

N/A

Default Value

N/A

language

String

Current language.

Example Requests

None

Example Responses

None

Status Codes

Status Code

Description

200

Dictionary list.

Error Codes

See Error Codes.