List workspaces¶
View the workspaces accessible by the current identity. Results can be filtered by name.
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.
curl --get "$CLOUDSIGMA_API_BASE/workspaces" \
--data-urlencode "name=$WORKSPACE_NAME" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY"
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
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 |
Successful response¶
{
"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 |
|---|---|---|
|
string |
|
|
string |
Descriptive text for request processing. |
|
object |
response data. |
|
array of object |
workspace list. Empty array if there are no matches. |
|
string |
Object ID. |
|
string |
Name. |
|
string |
Current status. Values: |
|
string |
The user ID of the workspace owner. |
|
string |
The name of the workspace owner. May be omitted if not set. |
|
string |
The email address of the workspace owner. May be omitted if not set. |
|
string |
Creation time, in RFC 3339 format. |
|
string |
Current access status, |
|
integer |
The number of workspaces returned. |
Error response¶
{
"code": "ErrServer",
"msg": "查询工作区失败",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Readable error message. |
|
null |
The error response is |
An error is returned when the identity is invalid or the workspace service fails. Service failure usually returns ErrServer.