Calling 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 Integrator authentication endpoint and receive an access token.
Step 2. Use the access token, received in Step 1, to call Integrator API endpoints. The access token must be submitted as a header parameter, as in: Authorization:Bearer access-token
, or query parameter, as in: ?Authorization=Bearer%20access-token
.
Access tokens in 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.
Calling built-in API from Etlworks Integrator
Step 1. Create an HTTP connection for the "caller" flow with the following parameters:
- URL - the URL for the Etlworks API endpoint (refer to the API docs)
- Method - the method for the Etlworks 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.