# Batch view grantable resources

```{raw} html
<div class="mo-api-page-show-toc" aria-hidden="true"></div>
```

Confirm grant information for specified resources in a batch. Only resources visible to the current identity for the selected action are returned.

```text
POST https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/iam/permissions/resources:batchDescribe
```

## Preparation before calling

Collect the resources and grant action to confirm. Prepare a [personal access token](../../../../../guides/genesis/api-keys.md) with required workspace permissions and the [target workspace ID](../../../../../guides/ai-studio/resource-center/workspace.md#copy-a-workspace-id).

## Request parameters

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Input example

```bash
curl -X POST "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/iam/permissions/resources:batchDescribe" -H "X-API-Key: $AI_STUDIO_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"}'
```

:::::
:::::{tab-item} Parameter description

### Path parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace_id` | string | Yes | Target workspace ID. |

### Request body

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `resource_ids` | string array | Yes | Resource IDs; contains 1–100 items. |
| `resource_type` | string | Yes | Resource type to view. |
| `action_id` | string | Yes | Action identifier to evaluate. |
| `purpose` | string | No | Purpose of this lookup. |

:::::
::::::
:::::::

## Successful response

Returns visible, resolvable resources after permission filtering. If multiple inputs map to the same root resource, the results are deduplicated.

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

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

:::::
:::::{tab-item} Field details

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | `OK` on success. |
| `msg` | string | `OK` on success. |
| `data.items` | object array | Visible, resolvable resources. |
| `data.capability_status` | string | Resource-adapter state: `ready`, `unsupported`, or `unavailable`. |
| `data.reason_code` | string | Reason code when the adapter is unavailable or unsupported. |
| `data.request_id` | string | Request correlation ID. |
| `data.trace_id` | string | Trace ID. |

:::::
::::::
:::::::

## Error response

:::::::{div} mo-api-tabs mo-api-response-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{"code":"ErrParamInvalid","msg":"Invalid request parameters","data":null}
```

:::::
:::::{tab-item} Field details

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | Error code. |
| `msg` | string | Error message. |
| `data` | null | — |

:::::
::::::
:::::::
