List Flows

List all flows that exist in Directus.

Query Parameters

fields
array

Control what fields are being returned in the object.

limit
integer

A limit on the number of objects that are returned.

offset
integer

How many items to skip when fetching data.

sort
array

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.

filter

Select items in collection by given conditions.

search
string

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

meta
string

What metadata to return in the response.

Response

Successful request

data
array
meta
object
GET /flows
Response Example
{
  "data": [
    {
      "id": "2f24211d-d928-469a-aea3-3c8f53d4e426",
      "name": "Update Articles Flow",
      "icon": "bolt",
      "color": null,
      "status": "active",
      "trigger": "manual",
      "accountability": "$trigger",
      "options": null,
      "operation": "92e82998-e421-412f-a513-13701e83e4ce",
      "date_created": "2022-05-11T13:14:52Z",
      "user_created": "63716273-0f29-4648-8a2a-2af2948f6f78",
      "operations": []
    }
  ],
  "meta": {}
}

Create Multiple Flows

Create multiple new flows.

Query Parameters

fields
array

Control what fields are being returned in the object.

limit
integer

A limit on the number of objects that are returned.

meta
string

What metadata to return in the response.

offset
integer

How many items to skip when fetching data.

sort
array

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.

filter

Select items in collection by given conditions.

search
string

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

Request Body

data
array

Response

Successful request

data
array
meta
object
POST /flows
Response Example
{
  "data": [
    {
      "id": "2f24211d-d928-469a-aea3-3c8f53d4e426",
      "name": "Update Articles Flow",
      "icon": "bolt",
      "color": null,
      "status": "active",
      "trigger": "manual",
      "accountability": "$trigger",
      "options": null,
      "operation": "92e82998-e421-412f-a513-13701e83e4ce",
      "date_created": "2022-05-11T13:14:52Z",
      "user_created": "63716273-0f29-4648-8a2a-2af2948f6f78",
      "operations": []
    }
  ],
  "meta": {}
}

Delete Multiple Flows

Delete multiple existing flows.

Request Body

An array of flows primary keys.

[array]
array
DELETE /flows

Update Multiple Flows

Update multiple flows at the same time.

Query Parameters

fields
array

Control what fields are being returned in the object.

limit
integer

A limit on the number of objects that are returned.

meta
string

What metadata to return in the response.

offset
integer

How many items to skip when fetching data.

sort
array

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.

filter

Select items in collection by given conditions.

search
string

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

Request Body

data
keys
array

Response

Successful request

data
array
meta
object
PATCH /flows
Response Example
{
  "data": [
    {
      "id": "2f24211d-d928-469a-aea3-3c8f53d4e426",
      "name": "Update Articles Flow",
      "icon": "bolt",
      "color": null,
      "status": "active",
      "trigger": "manual",
      "accountability": "$trigger",
      "options": null,
      "operation": "92e82998-e421-412f-a513-13701e83e4ce",
      "date_created": "2022-05-11T13:14:52Z",
      "user_created": "63716273-0f29-4648-8a2a-2af2948f6f78",
      "operations": []
    }
  ],
  "meta": {}
}

Create a Flow

Create a new flow.

Query Parameters

fields
array

Control what fields are being returned in the object.

meta
string

What metadata to return in the response.

Request Body

[object]
object

Response

Successful request

data
object
POST /flows‎
Response Example
{
  "data": {
    "id": "2f24211d-d928-469a-aea3-3c8f53d4e426",
    "name": "Update Articles Flow",
    "icon": "bolt",
    "color": null,
    "status": "active",
    "trigger": "manual",
    "accountability": "$trigger",
    "options": null,
    "operation": "92e82998-e421-412f-a513-13701e83e4ce",
    "date_created": "2022-05-11T13:14:52Z",
    "user_created": "63716273-0f29-4648-8a2a-2af2948f6f78",
    "operations": []
  }
}

Retrieve a Flow

Retrieve a single flow by primary key.

Query Parameters

id
string

Unique identifier for the object.

Response

Successful request

data
object
GET /flows/{id}
Response Example
{
  "data": {
    "id": "2f24211d-d928-469a-aea3-3c8f53d4e426",
    "name": "Update Articles Flow",
    "icon": "bolt",
    "color": null,
    "status": "active",
    "trigger": "manual",
    "accountability": "$trigger",
    "options": null,
    "operation": "92e82998-e421-412f-a513-13701e83e4ce",
    "date_created": "2022-05-11T13:14:52Z",
    "user_created": "63716273-0f29-4648-8a2a-2af2948f6f78",
    "operations": []
  }
}

Delete a Flow

Delete an existing flow

Query Parameters

id
string

Unique identifier for the object.

DELETE /flows/{id}

Update a Flow

Update an existing flow.

Query Parameters

id
string

Unique identifier for the object.

fields
array

Control what fields are being returned in the object.

meta
string

What metadata to return in the response.

Request Body

[object]
object

Response

Successful request

data
object
PATCH /flows/{id}
Response Example
{
  "data": {
    "id": "2f24211d-d928-469a-aea3-3c8f53d4e426",
    "name": "Update Articles Flow",
    "icon": "bolt",
    "color": null,
    "status": "active",
    "trigger": "manual",
    "accountability": "$trigger",
    "options": null,
    "operation": "92e82998-e421-412f-a513-13701e83e4ce",
    "date_created": "2022-05-11T13:14:52Z",
    "user_created": "63716273-0f29-4648-8a2a-2af2948f6f78",
    "operations": []
  }
}

Flow with GET webhook trigger

Start a flow with GET webhook trigger.

Query Parameters

id
integer

Identifier for the object.

fields
array

Control what fields are being returned in the object.

meta
string

What metadata to return in the response.

Response

Result of the flow, if any.

data
GET /flows/trigger/{id}
Response Example
{}

Flow with POST webhook trigger

Start a flow with POST webhook trigger.

Query Parameters

id
integer

Identifier for the object.

fields
array

Control what fields are being returned in the object.

meta
string

What metadata to return in the response.

Request Body

Payload for the POST request.

data

Response

Result of the flow, if any.

data
POST /flows/trigger/{id}
Response Example
{}