Skip to content
On this page

Directus Cloud

Everything you need to start building. Provisioned in 90 seconds. Starting at $15/month.

Get Started

Operations

Operations are the building blocks of Data Flows within Directus.

The Operation Object

id uuid
Primary key of the operation.

name string
Name for the operation.

key string
Key for the operation. Must be unique within a given flow.

type string
Type of operation. One of log, mail, notification, create, read, request, sleep, transform, trigger, condition, or any type of custom operation extensions.

options json
Options depending on the type of the operation.

position_x integer
Position of the operation on the X axis within the flow workspace.

position_y integer
Position of the operation on the Y axis within the flow workspace.

date_created timestamp
Timestamp in ISO8601 when the operation was created.

user_created many-to-one
The user who created the operation. Many-to-one to users.

resolve uuid
The operation triggered when the current operation succeeds (or then logic of a condition operation). Primary key of an operation.

reject uuid
The operation triggered when the current operation fails (or otherwise logic of a condition operation). Primary key of an operation.

flow many-to-one
The flow containing this operation. Many-to-one to flows.

json
{
	"id": "585b04cd-2821-4dcc-a563-ae5d29ecace2",
	"name": "Log a Message",
	"key": "log_message",
	"type": "log",
	"position_x": 12,
	"position_y": 24,
	"date_created": "2022-05-11T13:14:52Z",
	"user_created": "12e62fd0-29c7-4fd3-b3d3-c7a39933e8af",
	"resolve": "bf4099c0-c54c-4736-ab4e-95e2487595e4",
	"reject": null,
	"flow": "22544db5-93f7-48e2-a028-7ae02c8fe49a"
}
{
	"id": "585b04cd-2821-4dcc-a563-ae5d29ecace2",
	"name": "Log a Message",
	"key": "log_message",
	"type": "log",
	"position_x": 12,
	"position_y": 24,
	"date_created": "2022-05-11T13:14:52Z",
	"user_created": "12e62fd0-29c7-4fd3-b3d3-c7a39933e8af",
	"resolve": "bf4099c0-c54c-4736-ab4e-95e2487595e4",
	"reject": null,
	"flow": "22544db5-93f7-48e2-a028-7ae02c8fe49a"
}

List Operations

List all operations that exist in Directus.

Request

Query Parameters

Supports all global query parameters.

Response

An array of up to limit operation objects. If no items are available, data will be an empty array.

Example

Retrieve an operation

List an existing operation by primary key.

Request

Query Parameters

Supports all global query parameters.

Response

Returns the requested operation object.

Example

Create an Operation

Create a new operation.

Request

Query Parameters

Supports all global query parameters.

Request Body

A partial operation object.

Response

Returns the operation object for the created operation.

Example

Create Multiple Operations

Create multiple new operations.

Request

Query Parameters

Supports all global query parameters.

Request Body

An array of partial operation objects.

Response

Returns the operation object for the created operation.

Example

Update an Operation

Update an existing operation.

Request

Query Parameters

Supports all global query parameters.

Request Body

A partial operation object.

Response

Returns the operation object for the updated operation.

Example

Update Multiple Operations

Update multiple existing operations.

Query Parameters

Supports all global query parameters.

Request Body

keys Required
Array of primary keys of the operations you'd like to update.

data Required
Any of the operation object's properties.

Response

Returns the operation objects for the updated operations.

Example

Delete an Operation

Delete an existing operation.

Request

Returns

Empty body.

Example

Delete Multiple Operations

Delete multiple existing operations.

Request

Request Body

An array of operations primary keys

Returns

Empty body.

Example

Triggering an operation

Trigger an operation based on primary key.

Request

Request Body

Payload for the operation, if needed.

Returns

Result of the operation, if any.

Example