List workspaces

View the workspaces accessible by the current identity. Results can be filtered by name.

HTTP
GET $CLOUDSIGMA_API_BASE/workspaces

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 personal access token.

Query parameters

Replace $CLOUDSIGMA_API_KEY with the actual value. When filtering by name is not required, remove the name query parameter.

Shell
curl --get "$CLOUDSIGMA_API_BASE/workspaces" \
  --data-urlencode "name=$WORKSPACE_NAME" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY"

Parameter

Type

Required

Description

name

string

No

Searches for workspaces whose names contain the specified text, case-insensitively. When omitted, all accessible workspaces are returned. This interface does not paginate, and data.total is the number of workspaces returned.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "workspaces": [
      {
        "id": "ws_01",
        "name": "分析工作区",
        "status": "ACTIVE",
        "owner_id": "user_01",
        "owner_name": "张三",
        "owner_email": "zhangsan@example.com",
        "created_at": "2026-10-14T00:00:00Z",
        "access_status": "accepted"
      }
    ],
    "total": 1
  }
}

Field

Type

Description

code

string

OK when the request is processed successfully.

msg

string

Descriptive text for request processing.

data

object

response data.

data.workspaces

array of object

workspace list. Empty array if there are no matches.

data.workspaces[].id

string

Object ID.

data.workspaces[].name

string

Name.

data.workspaces[].status

string

Current status. Values: ACTIVE, TERMINATED, INITIALIZING, FAILED.

data.workspaces[].owner_id

string

The user ID of the workspace owner.

data.workspaces[].owner_name

string

The name of the workspace owner. May be omitted if not set.

data.workspaces[].owner_email

string

The email address of the workspace owner. May be omitted if not set.

data.workspaces[].created_at

string

Creation time, in RFC 3339 format.

data.workspaces[].access_status

string

Current access status, accepted in the list.

data.total

integer

The number of workspaces returned.

Error response

JSON
{
  "code": "ErrServer",
  "msg": "查询工作区失败",
  "data": null
}

Field

Type

Description

code

string

error code.

msg

string

Readable error message.

data

null

The error response is null.

An error is returned when the identity is invalid or the workspace service fails. Service failure usually returns ErrServer.

Last updated on