# View object permission view

View the current grants, grant sources, and editability for a specified role on a specified object.

```text
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/iam/permissions/objects/{resource_type}/{resource_id}/permission-view
```

## Before you call this API

Configure the [regional API endpoint and authentication](https://omnifabric.cloudsigma.com/docs/developer/endpoints-and-authentication.html.md), and select the target workspace.

Select the object and role to view.

## Request parameters

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

```bash
curl -X GET "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/iam/permissions/objects/$RESOURCE_TYPE/$RESOURCE_ID/permission-view" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"
```

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

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `workspace_id` | string | Yes | Target workspace ID. |
| `resource_type` | string | Yes | Target resource type. |
| `resource_id` | string | Yes | Target resource ID. |

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

## Successful response

On success, returns the object's owner, direct grants, all-scope grants, and the capability sources included in this view. A `false` capability flag means that source is not included in this view; it does not mean that the corresponding grants are empty.

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

```json
{"code":"OK","msg":"OK","data":{"workspace_id":"workspace-001","resource_type":"workflow","resource_id":"workflow-001","owner":{"role_id":"role-owner"},"capabilities":{"owner_included":true,"direct_specific_grants_included":true,"all_scope_grants_included":true},"direct_grants":[],"all_scope_grants":[],"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.workspace_id` | string | Workspace ID that contains the object. |
| `data.resource_type` | string | Object resource type. |
| `data.resource_id` | string | Object resource ID. |
| `data.owner` | object | Object's direct owner and ownership version. |
| `data.capabilities` | object | Flags for data sources included in this permission view. |
| `data.direct_grants` | object array | Grants that directly apply to this object. |
| `data.all_scope_grants` | object array | All-scope grants that cover this object. |
| `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 | — |

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

## Next steps

### Confirm object grant state

Before validating or applying object grants, confirm the current grant state for the object and role, and prepare changes based on the editability information returned by this page.
