Overview
These API endpoints are used to add, edit, or delete Flow Schedules.
Authentication
Before making a call to the built-in API, the user must receive a JWT token from the authentication API.
Step 1. Use any user with the Editor
or Administrator
role in calling Etlworks authentication endpoint and receiving an access token.
Step 2. Use the access token received in Step 1 to call Etlworks API endpoints. The access token must be submitted as a header parameter, as in: Authorization:Bearer access-token
.
Access tokens in the 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.
Get All Schedules
The API endpoint parameters
-
PATH:
/rest/v1/schedules
EXAMPLE: https://app.etlworks.com/rest/v1/schedules
-
METHOD:
GET
- HEADER: Authorization:Bearer access-token
Response
The response is a JSON document with array of schedules in the following format:
[
{
"id": number, the ID
"name": string, the name
"tags": array, the list of tags
"description": string, the description
"flowId": number, the flow ID
"enabled": boolean, the enabled flag
"schedule": string, the schedule value (cron or minutes)
"emailSuccess": boolean, send email on success flag
"emailFailure": boolean, send email on failure flag
"emails": string, the whitespace separated list of emails
"retries": number, the number of retries on error
"delayBetweenRetries": number, the delay between the retries in minutes
"expectedTime": number, the expected flow execution time in minutes
"debug": boolean, the record debug log flag
"logStep": number, the extra log step
"keepMessage": boolean, keep listener message flag
"keepEmptyAudit": boolean, keep empty flow execution audit record flag
}
]
Response Codes
- 200 for success
- 401 for not authorized
- 403 for forbidden
- 500 for an internal error
Add new schedule
The API endpoint parameters
-
PATH:
/rest/v1/schedules
EXAMPLE: https://app.etlworks.com/rest/v1/schedules
-
METHOD:
POST
-
HEADER:
Authorization:Bearer access-token
- REQUEST BODY: JSON document in the following Format:
-
{
}
-
REQUEST CONTENT TYPE:
application/json
Response
The response is a JSON document in the following Format:
{
"id": number, the ID
"name": string, the name
"tags": array, the list of tags
"description": string, the description
"flowId": number, the flow ID
"enabled": boolean, the enabled flag
"schedule": string, the schedule value (cron or minutes)
"emailSuccess": boolean, send email on success flag
"emailFailure": boolean, send email on failure flag
"emails": string, the whitespace separated list of emails
"retries": number, the number of retries on error
"delayBetweenRetries": number, the delay between the retries in minutes
"expectedTime": number, the expected flow execution time in minutes
"debug": boolean, the record debug log flag
"logStep": number, the extra log step
"keepMessage": boolean, keep listener message flag
"keepEmptyAudit": boolean, keep empty flow execution audit record flag
}
Response Codes
- 200 for success,
- 400 for not valid request body
- 401 for not authorized
- 403 for forbidden
- 500 for an internal error
Edit schedule
The API endpoint parameters
-
PATH:
/rest/v1/schedules/{scheduleId}
EXAMPLE: https://app.etlworks.com/rest/v1/schedules/1
-
METHOD:
PUT
-
HEADER:
Authorization:Bearer access-token
- REQUEST BODY: JSON document in the following Format:
-
{
}
-
REQUEST CONTENT TYPE:
application/json
Response
The response is a JSON document in the following Format:
{
"id": number, the ID
"name": string, the name
"tags": array, the list of tags
"description": string, the description
"flowId": number, the flow ID
"enabled": boolean, the enabled flag
"schedule": string, the schedule value (cron or minutes)
"emailSuccess": boolean, send email on success flag
"emailFailure": boolean, send email on failure flag
"emails": string, the whitespace separated list of emails
"retries": number, the number of retries on error
"delayBetweenRetries": number, the delay between the retries in minutes
"expectedTime": number, the expected flow execution time in minutes
"debug": boolean, the record debug log flag
"logStep": number, the extra log step
"keepMessage": boolean, keep listener message flag
"keepEmptyAudit": boolean, keep empty flow execution audit record flag
}
Response Codes
- 200 for success
- 400 for not valid request body
- 401 for not authorized
- 403 for forbidden
- 500 for an internal error
Delete schedule
The API endpoint parameters
-
PATH:
/rest/v1/schedules/{scheduleId}
EXAMPLE: https://app.etlworks.com/rest/v1/schedules/1
-
METHOD:
DELETE
-
HEADER:
Authorization:Bearer access-token
- REQUEST BODY: none
- REQUEST CONTENT TYPE: none
- RESPONSE: none
Response Codes
- 204 for success
- 401 for not authorized
- 403 for forbidden
- 500 for an internal error
Enable schedule
The API endpoint parameters
-
PATH:
/rest/v1/schedules/{scheduleId}/enable
EXAMPLE: https://app.etlworks.com/rest/v1/schedules/1/enable
-
METHOD:
POST
-
HEADER:
Authorization:Bearer access-token
- REQUEST BODY: none
- REQUEST CONTENT TYPE: none
- RESPONSE: none
Response Codes
- 200 for success
- 401 for not authorized
- 403 for forbidden
- 500 for an internal error
Disable schedule
The API endpoint parameters
-
PATH:
/rest/v1/schedules/{scheduleId}/disable
EXAMPLE: https://app.etlworks.com/rest/v1/schedules/1/disable
-
METHOD:
POST
-
HEADER:
Authorization:Bearer access-token
- REQUEST BODY: none
- REQUEST CONTENT TYPE: none
- RESPONSE: none
Response Codes
- 200 for success
- 401 for not authorized
- 403 for forbidden
- 500 for an internal error
Comments
0 comments
Please sign in to leave a comment.