younifyd
Menu

Get Notifications

List notifications

GET/notifications

Use it in a workflow

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

Request

Query parameters

fieldsarray<string>

Control what fields are being returned in the object.

limitinteger

A limit on the number of objects that are returned.

offsetinteger

How many items to skip when fetching data.

metastring

What metadata to return in the response.

sortarray<string>

How to sort the returned items. `sort` is a CSV of fields used to sort the fetched items. Sorting defaults to ascending (ASC) order but a minus sign (` - `) can be used to reverse this to descending (DESC) order. Fields are prioritized by their order in the CSV.

filterany

Select items in collection by given conditions.

searchstring

Filter by items that contain the given search query in one of their fields.

pageinteger

Cursor for use in pagination. Often used in combination with limit.

Response

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

dataarray<object>
idinteger

Primary key of the revision.

timestampstring (date-time)

Timestamp in ISO8601 when the notification was created.

statusstring

Current status of the notification. One of "inbox", "archived"

recipientoneOf

User that received the notification.

senderoneOf

User that sent the notification, if any.

subjectstring

Subject line of the message.

messagestring

Subject line of the message.

collectionstring

Collection this notification references.

itemstring

Primary key of the item this notification references.

metaobject
total_countinteger

Returns the total item count of the collection you're querying.

filter_countinteger

Returns the item count of the collection you're querying, taking the current filter/search parameters into account.

json
{
  "data": [
    {
      "id": 2,
      "timestamp": "2021-11-24T13:57:35Z",
      "status": "inbox",
      "recipient": "3EE34828-B43C-4FB2-A721-5151579B08EA",
      "sender": "497a495e-5529-4e46-8feb-2f35e9b85601",
      "subject": "inbox",
      "message": "\\nHello admin@example.com,\\n\\rijk@directus.io has mentioned you in a comment:\\n\\n> Hello <em>admin@example.com</em>!\\n\\n<a href=\\\"http://localhost:8080/admin/content/articles/1\\\">Click here to view.</a>\\n",
      "collection": "articles",
      "item": "1"
    }
  ],
  "meta": {
    "total_count": 0,
    "filter_count": 0
  }
}

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

Get Notifications — Directus — Documentation