Call built-in API from the third-party application
Before making a call to the built-in API, the user must receive a JWT token from the authentication API.
Step 1. Use the appropriate user to call an Etlworks Integrator authentication endpoint and receive an access token.
Step 2. Use the access token received in Step 1 to call the the Etlworks Integrator API endpoints. The access token must be submitted as a header parameter, as in: Authorization:Bearer access-token
.
Access tokens in the Etlworks Integrator are short-lived and self-expiring. An access token gives you access to the APIs for approximately 10 minutes. It is recommended that you refresh the access token before each call to the API.
Call built-in API from the Etlworks Integrator
Step 1. Create an HTTP Connection for the caller Flow with the following parameters:
URL
: the URL for the Etlworks Integrator API endpoint (refer to the API docs)Method
: the method for the Etlworks Integrator API endpoint (refer to the API docs)Authentication
:token
Authentication URL
:https://etlworkshost/rest/v1/token-auth/issue
HTTP Method for token Authentication
:POST
Access token attribute
:token
Access token prefix
:Bearer
Authentication Request Payload
:{"login":"{user}","password":"{password}"}
Authentication Request Content Type
:application/json
User
: user ID of the user with the appropriate permissions to the call particular API (refer to the API docs)Password
: password of the user with the appropriate permissions to the call particular API (refer to the API docs)
Step 2. Create a caller source-to-destination Flow, where the source is a web service and the destination is a Memory Connection. The source Connection is going to be an HTTP Connection pointed to the Connection created in step 1.
Step 3. Optionally, add JavaScript to handle the response from the API.
Comments
0 comments
Please sign in to leave a comment.