younifyd
Menu

Get Permission

Retrieve a Permission Rule

GET/permissions/{id}

Use it in a workflow

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

Request

Path parameters

idintegerrequired

Identifier for the object.

Query parameters

fieldsarray<string>

Control what fields are being returned in the object.

metastring

What metadata to return in the response.

Response

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

dataobject
idinteger

Unique identifier for the permission.

collectionstring

What collection this permission applies to.

actionstring

What action this permission applies to.

One ofcreatereadupdatedelete

permissionsobject

JSON structure containing the permissions checks for this permission.

validationobject

JSON structure containing the validation checks for this permission.

presetsobject

JSON structure containing the preset value for created/updated items.

fieldsarray<string>

CSV of fields that the user is allowed to interact with.

policystring (uuid)

Policy this permission applies to. Many-to-one to policies.

json
{
  "data": {
    "id": 1,
    "collection": "customers",
    "action": "create",
    "permissions": {},
    "validation": {},
    "presets": {},
    "fields": [
      "string"
    ],
    "policy": "00000000-0000-0000-0000-000000000000"
  }
}

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

Get Permission — Directus — Documentation