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 authentication endpoint and receive an access token.
Step 2. Use the access token received in Step 1 to call the Etlworks API endpoints. The access token must be submitted as a header parameter, as in: Authorization:Bearer access-token
.
Access tokens in Etlworks 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.
Alternatively, you can generate the non-expiring API key and use it as an access token in step 2. In this case, you can skip step 1 altogether.
Call Etlworks API from Postman using JWT token
JWT token will expire in approximately 10 minutes.
Step 1. Get the JWT token received by calling the Authentication API.
Step 2. In Postram set the Method and enter URL of the endpoint the the format https://host:port/api_endpoint, for example for Run flow by ID API it can be https://app.etlworks.com/rest/v1/flows/1234/run
Step 3. If the API endpoint requires a payload select Body|raw|JSON and enter the payload:
Step 4. Go to Headers tab and make sure that Content-Type is set to application/json
Step 5. Go to Authorization tab, select Bearer token and enter token:
Step 6. Click Send
.
Call Etlworks API from Postman using API key
It is possible to generate the API key, which is a non-expiring JWT token that can be used to authenticate the user when making a call to the Etlworks API.
Step 1. Generate API key for your account.
Step 2-4. Same as above.
Step 5. Same as above. Enter API key generated for your account in Token field.
Step 6. Click Send
.
Call built-in API from Etlworks
Step 1. Create an Etlworks API Connection.
If you need to capture the response from API call
Step 2. Create a source-to-destination Flow, where the source is a web service and the destination is anything. The source Connection needs to be the Etlworks API Connection created in Step 1.
If you don't need to capture the response from API call
Step 2. Use Call HTTP endpoint flow type to call Etlworks API. Use connection created in Step 1.
Use Explorer to call Etlworks API endpoint
Step 1. Navigate to Etlworks API connection. Assign JSON format.
Step 2. Expand the connection and select the endpoint.
Step 3. Click Raw Data button.
Comments
0 comments
Please sign in to leave a comment.