Claim a workspace¶
Check whether the current user has joined the specified workspace. This interface does not create a workspace, add members, or transfer workspace ownership.
POST $CLOUDSIGMA_API_BASE/workspaces/claim
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 confirm that the current identity is a member of the target workspace. Prepare personal access token and target workspace ID. The claimed object can only be the current calling identity, and other users cannot be specified.
Request body¶
Replace $CLOUDSIGMA_API_KEY and $WORKSPACE_ID with actual values.
curl -X POST "$CLOUDSIGMA_API_BASE/workspaces/claim" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "'"$WORKSPACE_ID"'"
}'
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The workspace ID to be claimed. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"workspace_id": "ws_01",
"claimed": false,
"already_claimed": true
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
|
|
string |
|
|
string |
The workspace ID whose membership has been checked. |
|
boolean |
Fixed to |
|
boolean |
Fixed to |
Error response¶
{
"code": "ErrWorkspaceNotFound",
"msg": "工作区不存在",
"data": null
}
Field |
Type |
Description |
|---|---|---|
|
string |
error code. |
|
string |
Readable error message. |
|
null |
The error response is |