- Startup
- Business
- Enterprise
- On-Premise
- Add-on
Basics
The core element of the infrastructure, which allows one to build REST APIs in Etlworks 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 the payload to the Flow or return a response to the client.
Read more about event-driven Flows.
User-defined API
A user-defined API allows the developer to create custom HTTP endpoints, which can receive requests from third-party applications, triggering execution of the Etlworks Integrator's Flows.
- PATH:
/rest/v1/httplistener/{user-defined-path}
.
EXAMPLE: https://app.etlworks.com/rest/v1/httplistener/hl7/patient
, where /hl7/patient
is a user-defined-path, defined when creating HTTP Listener.
- METHOD:
POST
,PUT
,GET
,DELETE
. - 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.
Pre-defined response (example)
{
"auditId": 106358,
"messageUuid": "caaa8347-063c-449b-a29b-12e68799c986",
"flowId": 3219,
"status": "success"
}
Examples
Below are the typical examples of user-defined APIs:
PULL: expose a data source as an API endpoint
- The Flow is configured and scheduled in the Etlworks Integrator to receive
GET
requests, pull the data from any source, transform, and save it into the HTTP Listener (response). - The third-party application, for example, Tableau makes a call to the API endpoint created in the Etlworks 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 the Etlworks Integrator and includes updated record(s) as part of the payload.
- There is an HTTP Listener configured in the Etlworks 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, the Etlworks 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.
Comments
0 comments
Please sign in to leave a comment.