Articles in this section

How to invoke integrator.io externally

Sometimes, you may want to invoke integrator.io exports or imports from an external application, like invoking a step with or without custom logic, including error handling, passing a request payload, etc. These requests can be processed synchronously or asynchronously. There are three ways to invoke integrator.io externally:

Standard REST APIs

You can easily access standard REST API resources and invoke them from an external application.

To invoke an export or import configured in integrator.io and process the request synchronously, use the integrator.io invoke APIs to get results back immediately. In this case, the API response will contain any errors, if any exist. To invoke a flow configured in integrator.io that is not dependent on custom inputs, use the Flow invoke API.

Note: Invoking a flow via API doesn’t guarantee immediate execution of the flow. The API just puts the flow in the invocation queue. If you’re looking for an immediate response for the flow execution result, don’t use this API. You can, however, retrieve the errors and status of the flow execution through the APIs.

My APIs

My APIs are custom endpoints hosted on integrator.io. My APIs have more capabilities than standard REST APIs because they rely on scripts you write with your own custom logic. These scripts process the request and send the desired response back, including error handling. You can include the integrator.io module in your script to invoke exports, imports, and flows.

You can invoke multiple exports or imports within a script and control requests and responses through a single My API endpoint. Depending on your script’s logic, the performance of your My API endpoint will vary. You can use My API endpoints for synchronous processing if you invoke imports and exports. There are various examples of My API that contain multiple imports and exports.

Webhook listeners

Standard REST APIs and My APIs are useful when you want to invoke standalone exports or imports. Flow invocation is possible; however, you don’t get an immediate response, and it lacks the flexibility to provide real-time input data to the flow. To overcome this, use a webhook listener.

The webhook listener has a public URL you can invoke from an external application. Through this listener, you can pass the required input parameters for the flow to process. The flow starts processing as soon as it receives the event from the listener, which guarantees immediate execution. You can learn more about the flow’s status by adding a terminal bubble that sends the response back or relying on the job status REST API. You can also use EM 2.0 APIs to automate error handling.

Public URL
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.