Batch parse workspace names

Batch resolves names by workspace ID and returns the IDs and names of resolvable items.

HTTP
POST $CLOUDSIGMA_API_BASE/data-share/workspaces/resolve-names

Before you call this API

Configure the regional API endpoint and authentication, and select the target workspace.

Set the operation-specific values used in the request:

  • $TARGET_WORKSPACE_ID: The workspace ID whose name is to be resolved.

Request

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/data-share/workspaces/resolve-names" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": ["'"$TARGET_WORKSPACE_ID"'"]
  }'

Request body

Parameter

Type

Required

Description

ids

string[]

Yes

A list of workspace IDs whose names are to be resolved.

[] after a type means an array. For example, string[] is an array of strings.

Successful response

Returns 200 and the resolvable workspace name on success.

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "workspaces": [
      {
        "id": "ws-02",
        "name": "分析工作区"
      }
    ]
  }
}

The response fields are as follows.

Field

Type

Description

data.workspaces

array

A list of resolvable workspaces.

data.workspaces[].id

string

Workspace ID.

data.workspaces[].name

string

Workspace name.

In field paths, [] means each item in an array. For example, data.workspaces[].id is the id field of each item in data.workspaces.

Error response

JSON
{
  "code": "ErrParamInvalid",
  "msg": "请求参数无效",
  "data": null
}

Common HTTP errors

HTTP status code

error code

Common causes

Recommended actions

400

ErrParamInvalid

Invalid request body format or workspace ID list.

Check ids.

403

ErrPermissionDenied

The current identity is not a valid member of the current workspace.

Use credentials that have workspace access.

500

ErrServer

The server failed to resolve the workspace name.

Try again later.

Last updated on