Get flow status API
This API endpoint is used to retrieve the current status of the flow, even when the flow is currently running.
To access this API, any Executer
, Editor
, or Administrator
user must make the authorization request.
The API endpoint parameters
- PATH:
/rest/v1/executions/{flowid}?optional_parameters
- LEGACY PATH (we keep it for backward compatibility):
/plugins/dashboard/rest/v1/flows/{flowid}?optional_parameters
EXAMPLE: https://app.etlworks.com/rest/v1/executions/1234
flowId=long
. The flow ID can be found in the Flows.
- METHOD:
GET
- HEADER: Authorization:Bearer access-token
- PARAMETERS:
messageId=UUID
. Example: https://app.etlworks.com/rest/v1/executions/1234?messageId=15a20488-0224-4ae1-a52c-9ee65a69f2c5
. If the value of the optional parameter messageId
is not empty, the response will contain a status of the flow execution, associated with the particular message ID. The message ID is returned as a part of the response when the flow is executed by sending payload to the custom endpoint.
auditId=long
. Example: https://app.etlworks.com/rest/v1/executions/1234?auditId=1234567
. If the value of the optional parameter auditId
is not empty, the response will contain a status of the flow execution, associated with the particular audit ID. The audit ID is returned as a part of the response when the flow is executed by name.
- REQUEST BODY: none
- REQUEST CONTENT TYPE: none
Response
The response is a JSON document in the following format:
{
"auditId": long, // unique audit ID
"parentAuditId": long, // parent audit ID if there were auto-retry attempts when executing the flow. Null if there were no auto-retry attempts
"retries": integer,// number of retries or null
"flowId": long, // flow ID
"flowName": "string", // flow name
"eventId": long, // scheduled event ID
"eventName": "string", // name of the scheduled event or null if flow has not been scheduled
"messageId": "UUID", // message ID when flow has been executed by sending payload to the custom endpoint, otherwise null
"tenantId": long, // tenant id if flow was executed by super-admin user, otherwise null
"status": "string", // status of the flow execution: success, warning, error, running
"triggerType": "string", // flow.execution.scheduler or flow.execution.on.demand or null
"startedBy": "string", // who triggered the flow: scheduler, or user login name
"started": long, // start time in milliseconds
"ended": 1531158790495, // end time in milliseconds. Only available if flow has been already executed
"duration": "string", // human readable duration of the flow. Only available if flow has been already executed
"code": "string", // last executed SQL statement in case of error, or null. Only available if flow has been already executed
"exception": "string", // exception stack-trace or/end messages logged by the user using etlConfig.log(message). Only available if flow has been already executed
"warnings": "string", // warnings or null. Only available if flow has been already executed
"metrics": [metrics], // flow metrics or null. Only available if flow has been already executed
"fileMetrics": [file metrics], // file metrics or null. Only available if flow has been already executed
"errorLocationInSql": integer, // line number in last executed SQL in case of error, or null. Only available if flow has been already executed
"fileName": null, // currently not used
"records": 1 // currently not used
}
Response Codes
200 for success, 401 and 403 for not authorized, and 500 for an internal error.
Comments
0 comments
Please sign in to leave a comment.