Create Catalog¶
Create a Catalog in the current workspace.
HTTP
POST $CLOUDSIGMA_API_BASE/catalog/create
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region. Prepare a personal access token and target workspace ID that can access the target workspace.
Request body¶
Shell
curl -X POST "$CLOUDSIGMA_API_BASE/catalog/create" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"name": "<CATALOG_NAME>",
"description": "<CATALOG_DESCRIPTION>"
}'
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Catalog name, must be a valid identifier. |
|
string |
No |
Catalog description. |
Successful response¶
JSON
{
"code": "OK",
"msg": "OK",
"data": {
"id": 1
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
integer or null |
Create the ID of the new Catalog. When not provided by the server, it is |
Error response¶
JSON
{
"code": "ErrAlreadyExists",
"msg": "Catalog 名称已存在"
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
error message. |
Last updated on