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.
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.
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 |
|---|---|---|---|
|
string |
Yes |
Target workspace ID. |
Request body
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
The resource type to view. Values: |
|
array of string |
Yes |
Resource ID list, including 1~100 items and cannot be repeated. |
|
string |
Yes |
The operation ID to evaluate. Cannot be empty. |
|
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¶
{
"code": "OK",
"msg": "OK",
"data": {
"items": [],
"capability_status": "ready",
"reason_code": "",
"request_id": "req-001",
"trace_id": "trace-001"
}
}
Field |
Type |
Description |
|---|---|---|
|
array of object |
Visible and parsable resources. |
|
string |
Resource ID. |
|
string |
Display name. |
|
string |
Description. |
|
string |
Parent object ID. |
|
array of string or null |
path. |
|
string |
life cycle status. |
|
boolean |
Is it optional? |
|
string |
Reason for deactivation. |
|
string |
Owner role ID. |
|
integer |
Ownership version. |
|
string |
Resource query status. This interface always returns |
|
string |
Reason code when a resource query is unavailable or unsupported. This interface always returns an empty string. |
|
string |
Request association ID. |
|
string |
Link tracking ID. |
Error response¶
{
"code": "ErrParamInvalid",
"msg": "请求参数无效",
"data": null
}
Field |
Type |
Description |
|---|---|---|
code |
string |
error code. |
msg |
string |
error message. |
data |
null |
—。 |