Get Workflow History
The Luma Automation API ‘Workflow History’ is used to get the execution status for a Luma Automation workflow. Based on the Workflow Trigger ID, the web service gets the workflow execution history information from Luma Automation. The API accepts the trigger ID generated using API and returns the latest workflow execution status as a response. Use the following details to configure API:
Capture the tenant access token created during the Automation tenant provisioning. This token is sent as the Header to the API. Header → itas-api-access-key: <Tenant Access Token>.
You can also use Regenerate Tenant Access Token API to regenerate and fetch the tenant access token.URI: /gateway/api/v1/workflowhistory/<Trigger ID>
For Example: api/v1/workflowhistory/d9bf533e-cc29-4efe-a0e7-df4aef85cbc0HTTP Method for the operation: GET
As a response, the web service generates the latest workflow history information for the Automation Workflow. Response from the web service is received in the following format:
{ "status": "Success", "statusCode": 0, "statusLine": "Successfully retrieved workflow history record.", "errors": null, "resultData": { "initiatorContactId": 1, "initiatorApplicationId": 0, "inputParameters": "{\"inputParameters\": [{\"value\": \"sample_input_value1\", \"caption\": null, \"dataType\": \"TEXT\", \"parameter\": \"sample_workflow_input_parameter1\", \"description\": null}, {\"value\": \"sample_input_value2\", \"caption\": null, \"dataType\": \"TEXT\", \"parameter\": \"sample_workflow_input_parameter2\", \"description\": null}]}", "startTime": 1641823983772, "endTime": 1641823988914, "timeSpent": 5142, "status": "RUNNING | SUSPENDED | ACTIVATED | COMPLETED | FAILED | TERMINATED", "href": "/api/v1/workflowHistory/427", "id": 427 }, "warnings": [], "timestamp": 1641879020256, "reasonPhrase": null, "metaInfo": null }
‘status’ represents the execution status of the API call. Success represents that the web service operation was successfully executed.
‘statusCode’ represents the status code.
‘statusLine’ represents the response message received from the web service. The message "Successfully retrieved workflow history record." represents that the workflow is successfully executed.
‘errors’ indicate the error received in case the workflow execution fails.
‘resultData’ section contains the details in the matching workflows. The following workflow details are received from the web service:
‘initiatorContactId’ is the Luma Id of the user who initiated the Automation workflow.
‘initiatorApplicationId’ represents the Application ID used to initiate the workflow.
‘inputParameters’ are the parameters used as inputs to execute the workflow. The section contains:
‘value’ is the parameter passed to the workflow to execute the process.
‘caption’ indicates the display name or caption of the input field.
‘dataType’ is the type of data required for the parameter such as TEXT, INTEGER, DECIMAL, BOOLEAN, etc.
‘parameter’ is the parameter name
‘description’ represents the Description of the Workflow
‘startTime’ represents the Automation workflow initiation time (Epoch time).
‘endTime’ represents the Automation workflow execution completion time (Epoch time)
‘timeSpent’ is the time spent in completing the workflow execution.
‘status’ represents the current workflow execution status. For example, RUNNING, SUSPENDED, ACTIVATED, COMPLETED, FAILED, TERMINATED, etc.
‘href’ contains the link to the Workflow execution history record.
‘id’ is the Luma ID of the Automation Workflow execution history record.
'warnings’ field contains any warning received from web service execution.
‘timestamp’ represents the time (Epoch time) of web service execution.
‘reasonPhrase’ represents the error, in case web service execution fails.
The ‘Workflow History’ API returns the overall execution status of the workflow. Get Workflow Step History Records API is used to fetch status of individual workflow step.