Get list of workflows
The Luma Automation API ‘Get list of workflows’ is used to fetch workflow information. Based on the workflow name, the API fetches the details of the matching workflows such as Name, Description, and input Parameters. 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/workflowdefinition
HTTP Method for the operation: GET
Pass the following as Query Parameters to the Web Service:
filter - Use the Workflow name to filter the Workflow details. For example: You may use name=='*password*'.
orderBy - Use the orderby parameter to sort the resulting workflow list. Use the field name and sorting order. For Example, You may use ‘name asc’ where asc represents ascending order.
skip- 0
top - 10
As a response, the web service generates a list of Channel Account ids available in the tenant. Response from the web service is received in the following format:
{ "status": "Success", "statusCode": 0, "statusLine": "Successfully retrieved Workflow definition.", "errors": null, "resultData": [ { "identifier": "sample_workflow", "name": "Name of the Sample Workflow", "description": "Description of the Sample Workflow", "inputParameters": "{\"parameters\":[{\"parameter\":\"sample_workflow_input_parameter\",\"dataType\":\"TEXT | INTEGER | DECIMAL | BOOLEAN | URL | DATETIME | DATE | TIME | TIMESTAMP | STRING_LIST | LONG | GEOPOINT | YEAR | YEARMONTH | DURATION | IPADDRESS | JSON | XML\",\"required\":true,\"validations\":[{\"constraintType\":\"REQUIRED | MAXIMUM | MINIMUM | LENGTH | MAXIMUM_LENGTH | MINIMUM_LENGTH | PATTERN\",\"enforcementValue\":\"The value to enforce as per the constraint Type\",\"errorMessage\":\"The Sample Workflow Input Parameter validation error message\"}],\"layoutDefinition\":{\"caption\":\"Name or Caption for Sample Workflow Input Parameter\",\"control\":\"TEXT | MULTILINE_TEXT | NUMBER | DATE | DROPDOWN | CHECKBOX | RADIO_BUTTONS\",\"options\":[{\"key\":\"sample option1 key\",\"value\":\"sample option1 value\"},{\"key\":\"sample option2 key\",\"value\":\"sample option2 value\"}],\"description\":\"Description of Sample Workflow Input Parameter\"}}]}", "href": "/api/v1/workflowDefinition/26", "id": 26 } ], "warnings": [], "timestamp": 1641388353582, "reasonPhrase": null, "metaInfo": { "totalRecordCount": 27, "currentRecordCount": 10 } }
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 definition." 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:
identifier represents the workflow identifier
name represents the name of the Workflow
description represents the Description of the Workflow
inputParameters are the parameters required as input to execute the workflow. The section contains:
‘parameter’ is the parameter name
‘dataType’ is the type of data required for the parameter such as TEXT, INTEGER, DECIMAL, BOOLEAN, etc.
‘required’ represents if the parameter is mandatory for workflow execution. The parameter could either be true or false.
‘validations' represent the data validation applied to the parameter. Here you see:
‘constraintType’ indicates the type of constraint or validation applicable, such as Maximum length, Minimum length, Pattern, etc.
‘enforcementValue’ is the value or condition to be enforced based on the Constraint Type.
‘errorMessage’ is the validation error message displayed to the user.
‘layoutDefinition’ presents the display details for the Workflow input parameter such as name, description, type, etc. Here you can find:
‘caption’, which indicates the display name or caption of the input field.
‘control' indicates the input field type such as textbox, Dropdown, radio button, checkbox, etc.
‘options’ hold the options to be displayed in case of an input field is a selection control such as dropdown, radio button, checkbox.
‘Description’ represents the description of the Workflow input parameter.
‘href’ contains the link to the Workflow.
‘id’ contains the Luma ID of the Automation Workflow.
‘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.
‘metaInfo’ contains the result count. here we can see:
‘totalRecordCount’ is the total number of Workflows returned by the Web Service.
‘currentRecordCount’: In case, pagination is enabled, the API may not return all the records in the response. ‘currentRecordCount’ represents the count of workflows available in the response.