Understand and create custom flows
Contents
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. | |
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>/audit | GET | 200 | Get a log for a specific flow. |
Flow API examples
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 /v1/flows/598••••••••••••••••••d9a HTTP/1.1
Host: api.integrator.io
Authorization: Bearer my_api_token
Sample response
{ "_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" }
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"}}
Comments
0 comments
Please sign in to leave a comment.