Notifications
List notifications
List all notifications that exist in Directus.
Query Parameters
Control what fields are being returned in the object.
A limit on the number of objects that are returned.
How many items to skip when fetching data.
What metadata to return in the response.
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. You can also use a ?
to sort randomly.
Select items in collection by given conditions.
Filter by items that contain the given search query in one of their fields.
Cursor for use in pagination. Often used in combination with limit.
GET /notifications
{
"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": {}
}
Create Multiple notifications
Create multiple new notifications.
Query Parameters
Control what fields are being returned in the object.
A limit on the number of objects that are returned.
What metadata to return in the response.
How many items to skip when fetching data.
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. You can also use a ?
to sort randomly.
Select items in collection by given conditions.
Filter by items that contain the given search query in one of their fields.
Request Body
POST /notifications
{
"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": {}
}
Delete Multiple notifications
Delete multiple existing notifications.
Query Parameters
Control what fields are being returned in the object.
A limit on the number of objects that are returned.
What metadata to return in the response.
How many items to skip when fetching data.
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. You can also use a ?
to sort randomly.
Select items in collection by given conditions.
Filter by items that contain the given search query in one of their fields.
DELETE /notifications
Update Multiple notifications
Update multiple notifications at the same time.
Query Parameters
Control what fields are being returned in the object.
A limit on the number of objects that are returned.
What metadata to return in the response.
How many items to skip when fetching data.
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. You can also use a ?
to sort randomly.
Select items in collection by given conditions.
Filter by items that contain the given search query in one of their fields.
Request Body
PATCH /notifications
{
"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": {}
}
Create a Notification
Create a new notification.
Query Parameters
Control what fields are being returned in the object.
What metadata to return in the response.
Request Body
POST /notifications‎
{
"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"
}
}
Retrieve a notification
List an existing notification by primary key.
Query Parameters
Unique identifier of the notification.
Control what fields are being returned in the object.
What metadata to return in the response.
GET /notifications/{id}
{
"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"
}
}
Delete an notification
Delete an existing notification.
Query Parameters
Unique identifier of the notification.
DELETE /notifications/{id}
Update a Notification
Update an existing notification.
Query Parameters
Unique identifier of the notification.
Control what fields are being returned in the object.
What metadata to return in the response.
Request Body
PATCH /notifications/{id}
{
"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"
}
}