Batch view grantable resources

Confirms the authorization information of specified resources in batches and returns only the resources whose current identity is visible to the selected operation.

HTTP
POST $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/iam/permissions/resources:batchDescribe

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. Organize the resources that need to be confirmed and their authorization operations.

Prepare personal access token and target workspace ID with corresponding permissions for the target workspace.

Request body

Replace $WORKSPACE_ID, $CLOUDSIGMA_API_KEY in the example with actual values.

Shell
curl -X POST "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/iam/permissions/resources:batchDescribe" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "resource_type": "catalog",
  "resource_ids": [
    "catalog-001"
  ],
  "action_id": "catalog.read",
  "purpose": "role_configuration"
}'

Parameter

Type

Required

Description

workspace_id

string

Yes

Target workspace ID.

Request body

Field

Type

Required

Description

resource_type

string

Yes

The resource type to view. Values: catalog, database, table, volume, workflow, folder, file.

resource_ids

array of string

Yes

Resource ID list, including 1~100 items and cannot be repeated.

action_id

string

Yes

The operation ID to evaluate. Cannot be empty.

purpose

string

No

The purpose of this review.

catalog, database, table, and volume use the positive decimal int64 ID returned by the resource selection interface. workflow uses the actual workflow ID. file and folder are filtered by the Catalog root volume they belong to.

Submit 1 to 100 different IDs each time. Results are deduplicated and filtered by permissions, some inputs may be missing, or the order may be changed. Batch results do not return next_cursor.

Successful response

JSON
{
  "code": "OK",
  "msg": "OK",
  "data": {
    "items": [],
    "capability_status": "ready",
    "reason_code": "",
    "request_id": "req-001",
    "trace_id": "trace-001"
  }
}

Field

Type

Description

data.items

array of object

Visible and parsable resources.

data.items[].resource_id

string

Resource ID.

data.items[].display_name

string

Display name.

data.items[].description

string

Description.

data.items[].parent_id

string

Parent object ID.

data.items[].path

array of string or null

path.

data.items[].lifecycle_state

string

life cycle status.

data.items[].selectable

boolean

Is it optional?

data.items[].disabled_reason

string

Reason for deactivation.

data.items[].owner_role_id

string

Owner role ID.

data.items[].ownership_version

integer

Ownership version.

data.capability_status

string

Resource query status. This interface always returns ready.

data.reason_code

string

Reason code when a resource query is unavailable or unsupported. This interface always returns an empty string.

data.request_id

string

Request association ID.

data.trace_id

string

Link tracking ID.

Error response

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

Field

Type

Description

code

string

error code.

msg

string

error message.

data

null

—。

Last updated on