Operations
List Operations
List all operations 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 /operations
{
"data": [
{
"id": "2f24211d-d928-469a-aea3-3c8f53d4e426",
"name": "Log to Console",
"key": "log_console",
"type": "log",
"position_x": 12,
"position_y": 12,
"options": null,
"resolve": "63716273-0f29-4648-8a2a-2af2948f6f78",
"reject": "63716273-0f29-4648-8a2a-2af2948f6f78",
"date_created": "2022-05-11T13:14:52Z",
"user_created": "63716273-0f29-4648-8a2a-2af2948f6f78"
}
],
"meta": {}
}
Create Multiple Operations
Create multiple new operations.
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 /operations
{
"data": [
{
"id": "2f24211d-d928-469a-aea3-3c8f53d4e426",
"name": "Log to Console",
"key": "log_console",
"type": "log",
"position_x": 12,
"position_y": 12,
"options": null,
"resolve": "63716273-0f29-4648-8a2a-2af2948f6f78",
"reject": "63716273-0f29-4648-8a2a-2af2948f6f78",
"date_created": "2022-05-11T13:14:52Z",
"user_created": "63716273-0f29-4648-8a2a-2af2948f6f78"
}
],
"meta": {}
}
Delete Multiple Operations
Delete multiple existing operations.
DELETE /operations
Update Multiple Operations
Update multiple operations 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 /operations
{
"data": [
{
"id": "2f24211d-d928-469a-aea3-3c8f53d4e426",
"name": "Log to Console",
"key": "log_console",
"type": "log",
"position_x": 12,
"position_y": 12,
"options": null,
"resolve": "63716273-0f29-4648-8a2a-2af2948f6f78",
"reject": "63716273-0f29-4648-8a2a-2af2948f6f78",
"date_created": "2022-05-11T13:14:52Z",
"user_created": "63716273-0f29-4648-8a2a-2af2948f6f78"
}
],
"meta": {}
}
Create an Operation
Create a new operation.
Query Parameters
Control what fields are being returned in the object.
What metadata to return in the response.
Request Body
POST /operations
{
"data": {
"id": "2f24211d-d928-469a-aea3-3c8f53d4e426",
"name": "Log to Console",
"key": "log_console",
"type": "log",
"position_x": 12,
"position_y": 12,
"options": null,
"resolve": "63716273-0f29-4648-8a2a-2af2948f6f78",
"reject": "63716273-0f29-4648-8a2a-2af2948f6f78",
"date_created": "2022-05-11T13:14:52Z",
"user_created": "63716273-0f29-4648-8a2a-2af2948f6f78"
}
}
Retrieve an Operation
Retrieve a single operation by primary key.
Query Parameters
Unique identifier for the object.
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.
GET /operations/{id}
{
"data": {
"id": "2f24211d-d928-469a-aea3-3c8f53d4e426",
"name": "Log to Console",
"key": "log_console",
"type": "log",
"position_x": 12,
"position_y": 12,
"options": null,
"resolve": "63716273-0f29-4648-8a2a-2af2948f6f78",
"reject": "63716273-0f29-4648-8a2a-2af2948f6f78",
"date_created": "2022-05-11T13:14:52Z",
"user_created": "63716273-0f29-4648-8a2a-2af2948f6f78"
}
}
Triggering an Operation
Trigger an operation based on primary key.
Query Parameters
Identifier for the object.
Request Body
Payload for the operation, if needed.
POST /operations/{id}
{}
Delete an Operation
Delete an existing operation
Query Parameters
Unique identifier for the object.
DELETE /operations/{id}
Update an Operation
Update an existing operation.
Query Parameters
Unique identifier for the object.
Control what fields are being returned in the object.
What metadata to return in the response.
Request Body
PATCH /operations/{id}
{
"data": {
"id": "2f24211d-d928-469a-aea3-3c8f53d4e426",
"name": "Log to Console",
"key": "log_console",
"type": "log",
"position_x": 12,
"position_y": 12,
"options": null,
"resolve": "63716273-0f29-4648-8a2a-2af2948f6f78",
"reject": "63716273-0f29-4648-8a2a-2af2948f6f78",
"date_created": "2022-05-11T13:14:52Z",
"user_created": "63716273-0f29-4648-8a2a-2af2948f6f78"
}
}