The core element of the infrastructure, which allows one to build REST APIs in Integrator, is the HTTP listener. The HTTP listener is a special type of connector that is constantly listening to incoming HTTP requests, using a configurable PATH and METHOD.
Depending upon which side of the transformation (source or destination) the HTTP listener sits, it can either push payload to the flow or return a response to the client.
Read more about event-driven flows.
A user-defined API allows the developer to create custom endpoints, which can receive payloads from third-party applications, triggering execution of Integrator's flows.
/hl7/patient is a user-defined-path, defined when creating http listener.
- HEADER: Authorization:Bearer access-token.
- REQUEST BODY: a payload in any of the supported formats, such as CSV, XML or JSON. The payload is not required.
- REQUEST CONTENT TYPE: not required.
- RESPONSE (GET): a response defined by the developer, typically a JSON document.
- RESPONSE (PUSH and PUT): a pre-defined response or response defined by the developer, typically a JSON document.
- RESPONSE (DELETE): a pre-defined response.
- RESPONSE CODES: 200 for success, 401 and 403 for not authorized, and 500 for an internal error.
Below are the typical examples of the user-defined APIs.
PULL: expose a data source as an API endpoint
- The flow is configured and scheduled in Integrator to receive GET requests, pull the data from any source, transform, and save into the HTTP listener (response).
- The third-party application, for example, Tableau makes a call to the API endpoint created in Integrator to pull the enriched dataset.
PUSH: when API endpoint receives a payload it triggers the execution of a data integration flow
- The third-party application updates its own database.
- The update triggers an event, which sends a notification to Integrator and includes updated record(s) as part of the payload.
- There is an HTTP listener, configured in Integrator, which listens to the incoming HTTP requests.
- There is also a flow, which has the listener as the source (FROM) connection. The flow is scheduled and ready to receive a payload.
- Once the payload is received, Integrator automatically executes the flow and passes the payload as a source.
- The source data is transformed and placed into the destination. For example, information about an updated record(s) is sent to a data warehouse.
Read about PUSH API.