Submit a workspace-creation task

Submit the workspace creation task. After the request is accepted, the task record is returned and the workspace is created in the background.

HTTP
POST $CLOUDSIGMA_API_BASE/workspaces/creations

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. First determine the name of the new workspace. Prepare personal access token.

Request body

Replace $CLOUDSIGMA_API_KEY and $WORKSPACE_NAME with actual values.

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/workspaces/creations" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "'"$WORKSPACE_NAME"'"
  }'

Parameter

Type

Required

Description

name

string

Yes

The name of the workspace to be created. It cannot be empty after removing leading and trailing blanks.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "id": "creation_01",
    "name": "分析工作区",
    "status": "pending",
    "created_at": "2026-08-28T09:00:00Z",
    "updated_at": "2026-08-28T09:00:00Z"
  }
}

Field

Type

Description

code

string

OK on success.

msg

string

OK on success.

data.id

string

Create a task ID.

data.name

string

The name of the workspace to be created.

data.status

string

Task status: pending, running, succeeded, failed or cleanup_pending.

data.workspace_id

string

Created workspace ID. Omit if it has not been successfully created.

data.error_code

string

Error code on failure. Omitted if not failed.

data.created_at

string

Task creation time.

data.updated_at

string

Task update time.

data.error_reason

string

Description of failure reason. Omitted if not set.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "名称不能为空",
  "data": null
}

Field

Type

Description

code

string

error code.

msg

string

Readable error message.

data

null

The error response is null.

Last updated on