younifyd
Menu

Get Share

Retrieve a Share

GET/shares/{id}

Use it in a workflow

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

Request

Path parameters

idstringrequired

Unique identifier of the share.

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 {{getShare.response.data.<field>}}.

dataobject
idstring (uuid)

Primary key of the share;

namestring

Custom (optional) name for the share.

collectionstring

Collection in which the current item is shared. Many-to-one to Collections.

itemstring

Primary key of the item that's shared.

rolestring (uuid)

Role of which the share will inherit the permissions. Many-to-one to shares.

passwordstring (hash)

Optional password that's required to view this shared item.

user_createdstring (uuid)

Reference to the user who created this share. Many-to-one to Users.

date_createdstring (date-time)

When the share was created.

date_startstring (date-time)

Optional timestamp that controls from what date/time the shared item can be viewed.

date_endstring (date-time)

Optional timestamp that controls until what date/time the shared item can be viewed.

times_usedinteger

The number of times the shared item has been viewed.

max_usesinteger

The maximum number of times the shared item can be viewed.

json
{
  "data": {
    "id": "3a606c3e-9d4d-4556-b7bb-f00860613da3",
    "name": "My Share",
    "collection": "articles",
    "item": "1",
    "role": "2b34fba4-a6cb-49f4-a070-2daee7ac44f0",
    "password": "**********",
    "user_created": "b13072b7-73e9-4904-89e0-34aaf4403766",
    "date_created": "2023-01-25T19:16:49.009Z",
    "date_start": "2023-01-26T17:00:00.000Z",
    "date_end": "2023-01-28T17:00:00.000Z",
    "times_used": 0,
    "max_uses": 15
  }
}

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

Was this page helpful?