younifyd
Menu

Get Permission Resource

Get a permission resource

GET/projects/{projectId}/permissionResources/{resourceId}

Use it in a workflow

  1. Add a step and choose the Sanity connector.
  2. Pick the Get Permission Resource action (under Roles).
  3. Fill in the fields below, then reference the result from later steps as {{getPermissionResource.response.data}}.

Request

Path parameters

projectIdstringrequired

The ID of the project

resourceIdstringrequired

The ID or name of the permission resource. Values that start with `res-` are treated as IDs.

Response

Returns 200 with an object. Read it in later steps with {{getPermissionResource.response.data.<field>}}.

idstring

The ID of the permission resource

namestring

The name of the permission resource

titlestring

The title of the permission resource

descriptionstring

A description of the permission resource

configobject

The resource configuration. For `sanity.document.filter` resources, `filter` is a GROQ filter.

isCustomboolean

Whether the resource was created by a user rather than by Sanity

permissionResourceTypestring

The name of the permission resource schema the resource is based on

json
{
  "id": "res-k2d8fj3a",
  "name": "articles",
  "title": "Articles",
  "description": "Documents of type article",
  "config": {
    "filter": "_type == \"article\""
  },
  "isCustom": true,
  "permissionResourceType": "sanity.document.filter"
}

Need more? See the Sanity guide for connection setup and behaviour shared by every action.