Articles in this section

Flow API endpoints

download.svg​​ Download Postman collection

Understand and create custom flows

Flow API endpoints

Relative URI

Method

Success code

Description

/flows

GET

200

Get all flows.

POST

201

Create a flow.

/flows/<_id>

GET

200

Get a specific flow.

PUT

200

Update a specific flow.

PATCH

204

Update part of a specific flow.

DELETE

204

Delete a specific flow.

/flows/<_id>/clone

POST

201

Clone a specific flow.

/flows/<_id>/run

POST

201

Run a specific flow on demand.

/flows/<_id>/replaceConnection

PUT

200

Replace a connection at the flow level.

/flows/<_id>/audit

GET

200

Get a log for a specific flow.

/flows/<_id>/template

GET

200

Download a flow.

/flows/<_id>/dependencies

GET

200

Get all resources using or used by this flow.

The following fields can be updated using PATCH. You must use the provided format to update the field:

[
    {
        "op": "replace",
        "path": "/fieldname",
        "value": "newvalue"
    }
]

Field

Sub-field

Data type

name

string

description

string

schedule

string

timezone

string

disabled

boolean

runPageGeneratorsInParallel

boolean

pageGenerators[*]

schedule

string

skipRetries

boolean

routers[*]

name

string

branches[*].name

string

branches[*].description

string

aliases

mixed

Flow API examples

Get a specific simple flow (with just a single export and import)

GET /v1/flows/55e••••••••••••••••••367 HTTP/1.1
Host: api.integrator.io
Authorization: Bearer my_api_token

Sample response

{
  "_id":"55e••••••••••••••••••367",
  "lastModified":"2017-06-19T21:27:09.945Z",
  "name":"Send GitHub Events to Slack",
  "disabled":false,
  "timezone":"America/Los_Angeles",
  "_exportId":"55e••••••••••••••••••366",
  "_importId":"55e••••••••••••••••••d14",
  "_integrationId":"58f••••••••••••••••••1bc",
  "skipRetries":false,
  "createdAt":"2017-06-19T21:27:09.900Z"
}

Get a specific flow (with multiple exports and imports)

GET /v1/flows/598••••••••••••••••••d9a HTTP/1.1
Host: api.integrator.io
Authorization: Bearer my_api_token

Sample response

Get a specific flow with multiple exports and imports linked together

{
  "_id":"598••••••••••••••••••d9a",
  "lastModified":"2017-08-19T17:04:54.005Z",
  "name":"Update Usage Stats for all Trialers",
  "disabled":false,
  "schedule":"? 0 2 ? * *",
  "timezone":"America/Los_Angeles",
  "_integrationId":"593••••••••••••••••••74e",
  "skipRetries":false,
  "pageProcessors":[
    {
      "type":"export",
      "_exportId":"598••••••••••••••••••428",
      "responseMapping":{
        "lists":[],
        "fields":[
          {
            "extract":"data",
            "generate":"numConnections"
          }
        ]
      }
    },
    {
      "type":"export",
      "_exportId":"598••••••••••••••••••d32",
      "responseMapping":{
        "lists":[],
        "fields":[
          {
            "extract":"data",
            "generate":"dlSuccessAndErrors"
          }
        ]
      }
    },
    {
      "type":"export",
      "_exportId":"598••••••••••••••••••6c6",
      "responseMapping":{
        "lists":[],
        "fields":[
          {
            "extract":"data",
            "generate":"lastSignIn"
          }
        ]
      }
    },
    {
      "type":"export",
      "_exportId":"598••••••••••••••••••638",
      "responseMapping":{
        "lists":[],
        "fields":[
          {
            "extract":"data",
            "generate":"numDataLoaders"
          }
        ]
      }
    },
    {
      "type":"export",
      "_exportId":"598e0c",
      "responseMapping":{
        "lists":[],
        "fields":[
          {
            "extract":"data",
            "generate":"numFlows"
          }
        ]
      }
    },
    {
      "type":"export",
      "_exportId":"598••••••••••••••••••54b",
      "responseMapping":{
        "lists":[],
        "fields":[
          {
             "extract":"data",
             "generate":"numPasswordChanges"
          }
        ]
      } 
    },
    {
      "type":"export",
      "_exportId":"598••••••••••••••••••e22",
      "responseMapping":{
        "lists":[],
        "fields":[
          { 
            "extract":"data",
            "generate":"numPasswordResets"
          }
        ]
      }
    },
    {
      "type":"export",
      "_exportId":"598e29",
      "responseMapping":{
        "lists":[],
        "fields":[
          {
            "extract":"data",
            "generate":"numSignIns"
          }
        ]
      }
    },
    {
      "type":"export",
      "_exportId":"598e37",
      "responseMapping":{
        "lists":[],
        "fields":[
          {
            "extract":"data",
            "generate":"successAndErrors"
          }
        ]
      }
    },
    {
      "type":"import",
      "_importId":"598••••••••••••••••••615",
      "proceedOnFailure":true,
      "responseMapping":{
        "lists":[],
        "fields":[]
      }
    },
    {
      "type":"import",
      "_importId":"598••••••••••••••••••9f9",
      "responseMapping":{
        "lists":[],
        "fields":[]
      }
    }
  ],
  "pageGenerators":[
    {
      "_exportId":"598••••••••••••••••••286",
      "_id":"599••••••••••••••••••b36"
    },
    {
      "_exportId":"598••••••••••••••••••6dd",
      "_id":"599••••••••••••••••••b35"
    }
  ],
  "createdAt":"2017-08-01T20:43:42.156Z"
}

Run a delta flow and specify the delta start date

POST /v1/flows/55e••••••••••••••••••367 HTTP/1.1
Host: api.integrator.io
Authorization: Bearer my_api_token

Sample body

Send a JSON body payload and the POST /run command in the following syntax. In this example, the delta startDate would be January 1st, 2019.

{"export": {"startDate": "2019-01-01T00:00:00.000"}}
    

Replace a connection at the flow level

Send a JSON body payload that replaces existing connection details with new ones.

PUT /v1/flows/55e••••••••••••••••••367/replaceConnection HTTP/1.1
Host: api.integrator.io
Authorization: Bearer my_api_token

Sample body

Send a JSON body payload that replaces existing connection details with new ones.

          {
   "_connectionId": "<_existingConnectionId>",
   "_newConnectionId": "<_newConnectionId>"
}
        

Replace an import at the flow level

Use the GET /flows/<_id> endpoint to retrieve the JSON representation of the flow you wish to modify. In the retrieved JSON, locate the existing import you want to replace and update it with the new import information. Send the modified JSON as the body of a request to the PUT /flows/<_id> endpoint.

PUT /v1/flows/55e••••••••••••••••••367 HTTP/1.1
Host: api.integrator.io
Authorization: Bearer my_api_token

Sample body

{
    "_id": "55e••••••••••••••••••367",
    "lastModified": "2021-12-14T12:39:24.138Z",
    "name": "Send list of all integrations",
    "disabled": true,
    "_integrationId": "61b••••••••••••••••a6c",
    "pageGenerators": [
        {
            "_exportId": "61b•••••••••••8adb",
            "skipRetries": false
        }
    ],
    "pageProcessors": [
        {
            "responseMapping": {
                "fields": [],
                "lists": []
            },
            "type": "import",
            "_importId": "61b8••••••••••8ae0"
        }
    ],
    "createdAt": "2021-12-14T12:39:24.021Z",
    "free": false,
    "_templateId": "602c••••••••••••••7eb8",
    "_sourceId": "603•••••••••••••83d",
    "autoResolveMatchingTraceKeys": true
}

Run multiple exports from the same flow

POST /v1/flows/55e••••••••••••••••••367/run HTTP/1.1
Host: api.integrator.io
Authorization: Bearer my_api_token

Sample body

Send a JSON body payload that runs the specified exports in a flow. If no JSON body is provided, all exports on the flow will run.

      {
   "_exportIds": [
       "655bd•••••••••••••1bf2",
       "54gfa••••••••••••7bf94"
   ]
} 

Clone a specific flow and map the connection IDs

POST /v1/flows/55e••••••••••••••••••367/clone HTTP/1.1
Host: api.integrator.io
Authorization: Bearer my_api_token

Sample body

Send a JSON body payload that maps existing connection IDs to the connection IDs in the new flow. You can map to the same connection ID if you don’t want to change it. The connectionMap must map every connection in the existing flow. For example, if you have 5 connections in your flow, you need to map each connection, even if the connections don’t all change.

      {
  "connectionMap": {
      "<existingConnectionId #1>": "<newConnectionId #1>",
      "<existingConnectionId #2>": "<newConnectionId #2>", 
      ……
  },
  "sandbox": false,
  "name": "<Name Flow Here>",
  "_integrationId": "<integration id where the cloned flow should go>",
  "_flowGroupingId": "<flow grouping id where the cloned flow should go - optional>"
}

    

Download a flow

POST /v1/flows/55e••••••••••••••••••367/template HTTP/1.1
Host: api.integrator.io
Authorization: Bearer my_api_token

Sample body

{
"signedURL":"https://integrator-templates.s3.amazonaws.com/55e••••••••••••••••••367.zip?AWSAccessKeyId=XXXXXXX&Expires=1707272837&Signature=XXXXXXXXX",
"key":"<flowId>.zip"
}