For the complete documentation index, see llms.txt. This page is also available as Markdown.

Flows

Retrieve all flows

get

This will only return Flows that are either directly associated with the user, or that are associated with a tenant that the user is also a member of. Requires the 'flows.read' permissions.

Query parameters
page[size]integerOptional

Amount of flows per page returned. Default is 10.

page[number]integerOptional

Number of the page to be returned. Default is 1.

filter[status]stringOptional

Filter results by flow status. Accepts either string ('active' and 'inactive') or integer (1 or 0)

filter[type]stringOptional

Filter results by flow type (ordinary, long_running)

filter[user]stringOptional

Filter by user. Works for admin or users with same tenant.

sortstringOptional

Sort the result by one property. Supported: createdAt, updatedAt and name. Prefix field name with - for reversed sort order (DESC) i.e. sort=-updatedAt. Default sorting is by id ASC

searchstringOptional

Search flows by a word or a phrase contained in the flow description OR in the flow name (case-insensitive). Behavior is similar to operator LIKE in SQL but case insensitive.

Responses
200

A list of flows.

application/json
get/flows
GET /flows HTTP/1.1
Accept: */*
200

A list of flows.

{
  "data": [
    {
      "name": "SnazzyToCodeComponent",
      "description": "This flow polls for persons and posts them on webhoo.site.",
      "tenant": "text",
      "graph": {
        "nodes": [
          [
            {
              "id": "step_1",
              "componentId": "string",
              "name": "snazzy adapter for oih",
              "function": "getPersonsPolling",
              "description": "New description in progress"
            },
            {
              "id": "step_2",
              "componentId": "string",
              "name": "code_component",
              "function": "execute",
              "description": "",
              "fields": {
                "code": "function* run() {console.log('Calling external URL');yield request.post({uri: 'http://webhook.site/debc8244-3ca0-4449-af2b-e346c4f57b85', body: msg.body, json: true});}"
              }
            }
          ]
        ],
        "edges": [
          {
            "id": "text",
            "config": {
              "condition": "text",
              "mapper": {}
            },
            "source": "step_1",
            "target": "step_2"
          }
        ]
      },
      "type": "ordinary",
      "cron": "* /2 * * * *",
      "owners": [
        {
          "id": "text",
          "type": "text"
        }
      ],
      "id": "text",
      "status": "inactive",
      "createdAt": "2019-07-30T12:52:45.957Z",
      "updatedAt": "2019-07-30T12:52:45.957Z"
    }
  ],
  "meta": {
    "page": 1,
    "perPage": 1,
    "total": 1,
    "totalPages": 1
  }
}

Find Flow by ID

get

Returns a single Flow by its ID, if the user is authorized to see it. This requires the 'flows.read' permission

Path parameters
idstring · stringRequired

ID of flow to return

Responses
200

Returns the flow

application/json
metaobjectOptional
get/flows/{id}
GET /flows/{id} HTTP/1.1
Accept: */*
{
  "data": {
    "name": "SnazzyToCodeComponent",
    "description": "This flow polls for persons and posts them on webhoo.site.",
    "tenant": "text",
    "graph": {
      "nodes": [
        [
          {
            "id": "step_1",
            "componentId": "string",
            "name": "snazzy adapter for oih",
            "function": "getPersonsPolling",
            "description": "New description in progress"
          },
          {
            "id": "step_2",
            "componentId": "string",
            "name": "code_component",
            "function": "execute",
            "description": "",
            "fields": {
              "code": "function* run() {console.log('Calling external URL');yield request.post({uri: 'http://webhook.site/debc8244-3ca0-4449-af2b-e346c4f57b85', body: msg.body, json: true});}"
            }
          }
        ]
      ],
      "edges": [
        {
          "id": "text",
          "config": {
            "condition": "text",
            "mapper": {}
          },
          "source": "step_1",
          "target": "step_2"
        }
      ]
    },
    "type": "ordinary",
    "cron": "* /2 * * * *",
    "owners": [
      {
        "id": "text",
        "type": "text"
      }
    ],
    "id": "text",
    "status": "inactive",
    "createdAt": "2019-07-30T12:52:45.957Z",
    "updatedAt": "2019-07-30T12:52:45.957Z"
  },
  "meta": {}
}

Deletes a flow

delete

Entirely deletes a Flow from the repository. This cannot be reverted. Requires the 'flows.write' permission.

Path parameters
idstring · stringRequired

Flow id to delete

Responses
200

Flow was successfully deleted

application/json
objectOptional
delete/flows/{id}
DELETE /flows/{id} HTTP/1.1
Accept: */*
{}

Update an existing flow

patch

The id is used to match the existing Flow that will be updated. Requires the 'flows.write' permission.

Path parameters
idstring · stringRequired

ID of flow to update

Body
namestringRequiredExample: SnazzyToCodeComponent
descriptionstringOptionalExample: This flow polls for persons and posts them on webhoo.site.
tenantstringOptional
typestring · enumRequired

Flow type

Example: ordinaryPossible values:
cronstringOptional

A cron string describing the interval at which this flow is run. If unset, the flow uses webhooks instead

Example: * /2 * * * *
Responses
200

The updated Flow.

application/json
metaobjectOptional
patch/flows/{id}
PATCH /flows/{id} HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 762

{
  "name": "SnazzyToCodeComponent",
  "description": "This flow polls for persons and posts them on webhoo.site.",
  "tenant": "text",
  "graph": {
    "nodes": [
      [
        {
          "id": "step_1",
          "componentId": "string",
          "name": "snazzy adapter for oih",
          "function": "getPersonsPolling",
          "description": "New description in progress"
        },
        {
          "id": "step_2",
          "componentId": "string",
          "name": "code_component",
          "function": "execute",
          "description": "",
          "fields": {
            "code": "function* run() {console.log('Calling external URL');yield request.post({uri: 'http://webhook.site/debc8244-3ca0-4449-af2b-e346c4f57b85', body: msg.body, json: true});}"
          }
        }
      ]
    ],
    "edges": [
      {
        "id": "text",
        "config": {
          "condition": "text",
          "mapper": {}
        },
        "source": "step_1",
        "target": "step_2"
      }
    ]
  },
  "type": "ordinary",
  "cron": "* /2 * * * *",
  "owners": [
    {
      "id": "text",
      "type": "text"
    }
  ]
}
{
  "data": {
    "name": "SnazzyToCodeComponent",
    "description": "This flow polls for persons and posts them on webhoo.site.",
    "tenant": "text",
    "graph": {
      "nodes": [
        [
          {
            "id": "step_1",
            "componentId": "string",
            "name": "snazzy adapter for oih",
            "function": "getPersonsPolling",
            "description": "New description in progress"
          },
          {
            "id": "step_2",
            "componentId": "string",
            "name": "code_component",
            "function": "execute",
            "description": "",
            "fields": {
              "code": "function* run() {console.log('Calling external URL');yield request.post({uri: 'http://webhook.site/debc8244-3ca0-4449-af2b-e346c4f57b85', body: msg.body, json: true});}"
            }
          }
        ]
      ],
      "edges": [
        {
          "id": "text",
          "config": {
            "condition": "text",
            "mapper": {}
          },
          "source": "step_1",
          "target": "step_2"
        }
      ]
    },
    "type": "ordinary",
    "cron": "* /2 * * * *",
    "owners": [
      {
        "id": "text",
        "type": "text"
      }
    ],
    "id": "text",
    "status": "inactive",
    "createdAt": "2019-07-30T12:52:45.957Z",
    "updatedAt": "2019-07-30T12:52:45.957Z"
  },
  "meta": {}
}

Start a flow

post

Initiates the flow's integration process by publishing an appropriate event to the event bus. Requires the 'flows.control' permission.

Path parameters
idstring · stringRequired

ID of flow to start, must be a valid MongoDB ID.

Responses
200

Returns the id and new status of the flow

application/json
metaobjectOptional
post/flows/{id}/start
POST /flows/{id}/start HTTP/1.1
Accept: */*
{
  "data": {
    "id": "5c99ec7e5ed40d3e7512cffa",
    "status": "starting"
  },
  "meta": {}
}

Stop a flow

post

Stops the flow's integration process by publishing an appropriate event to the event bus. Requires the 'flows.control' permission.

Path parameters
idstring · stringRequired

ID of flow to stop, must be a valid MongoDB ID.

Responses
200

Returns id and new status of the stopped flow

application/json
metaobjectOptional
post/flows/{id}/stop
POST /flows/{id}/stop HTTP/1.1
Accept: */*
{
  "data": {
    "id": "5c99ec7e5ed40d3e7512cffa",
    "status": "stopping"
  },
  "meta": {}
}

Last updated