Workflow Execution List API
Use the API to get a list of executions for a specified workflow. This API is useful for viewing the execution history of a workflow, including status, time stamps, and execution IDs. It helps in tracking workflow runs and identifying trends or anomalies in performance.
Required Permissions
The following permissions are needed to get the workflow execution list.
- READ ALL
- READ WF BY TAGS
- READ MY
- LIST ALL
- LIST WF BY TAGS
- LIST MY
Input ParametersInput Parameters
Parameter |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
pageSize |
Mandatory |
Integer |
The number of records per page to be included in the response. |
pageNumber |
Mandatory |
Integer |
The page to be returned. Starts from 1. |
query |
Optional |
String |
QQL Query to filter the response as per query.
The response displays all the executions that match the criteria in the query. |
startAt |
Optional |
Date |
Filters workflows to show only those created on or after a specific start date. For example, The response displays all the workflows that were created after |
endAt |
Optional |
Date |
Filters workflows to show only those created on or before a specific end date. For example, The response displays all the workflows that were created before |
order |
Optional |
String |
Specifies the field to sort the results. Use the field name as is for ascending order, or prefix it with a hyphen (-) to sort in descending order. |
Authorization |
Mandatory |
String |
Authorization token to authenticate to the Qualys Cloud Platform. Prepend token with 'Bearer' and one space. For example - Bearer <authToken> |
Sample 1: Retrieve a list of executions for a specified workflowSample 1: Retrieve a list of executions for a specified workflow
API Request
curl -X GET '<qualys_base_url>/qflowapi/v1/workflows/f516bcf4-f6fb-46ac-a54f-ddbcf2a2d24a/executions?pageSize=2&pageNumber=1' -H "Content-Type: application/json" -H "Authorization: Bearer <jwt token>"
Response
{ "total":"17", "items":[ { "execution":"7f7f2949-3086-4298-83f8-7bf029710bb7", "workflow":"f516bcf4-f6fb-46ac-a54f-ddbcf2a2d24a", "endDate":1744787192041, "parDateKey":"2025-04-16T00:00:00.000Z", "executionType":"Simple", "source":"UI", "parentExecutionId":null, "tags":[ "created_by=0ffaf046-768b-79fc-83f6-aa25be52c2a1" ], "createdAt":1744787146983, "customerId":"54f50897-26f3-c9af-83f9-e71459be70d9", "details":{ "executionEndDate":1744787192041, "message":"Task c2bcbbb8-c591-400e-9e5c-6735d34c547a failed with status: FAILED and reason: '{\"failed\":[{\"error\":\"You are not authorized to perform this operation. User: arn:aws:sts::993493008830:assumed-role/QFLOW_1/qualys is not authorized to perform: ec2:StopInstances on resource: arn:aws:ec2:us-east-1:993493008830:instance/i-0663d3f3e572608d5 because no identity-based policy allows the ec2:StopInstances action. Encoded authorization failure message: 9OV9AWBXa9QNCb4YFYstSlf25JmzjRpg2S25YPhhChOZayxjDhGWoEhadj0hDDr1_M8tLLFBpd7Fu2RzsWlZ1Ipy8zoWf6uVMuP_uzLKKRU4scCmknWfpHEnrsOVDiNZldAbVyc'" }, "id":"7f7f2949-3086-4298-83f8-7bf029710bb7", "categories":{ "regions":[ "us-east-1" ], "projects":[ null ], "solutions":[ "AWS Best Practices" ], "cloud_providers":[ "AWS" ], "services":[ ], "accounts":[ "@aa70acae-6ea8-3acf-b504-f327855b316a" ], "resource_groups":[ ], "apps":[ ] }, "startDate":1744787146983, "linkedExecutionIds":null, "updatedAt":1744787192082, "status":"Error" }, { "execution":"a9dc8a16-53c4-4876-bbc9-d68b76884f38", "workflow":"f516bcf4-f6fb-46ac-a54f-ddbcf2a2d24a", "endDate":1744786996372, "parDateKey":"2025-04-16T00:00:00.000Z", "executionType":"Simple", "source":"UI", "parentExecutionId":null, "tags":[ "created_by=0ffaf046-768b-79fc-83f6-aa25be52c2a1" ], "createdAt":1744786993708, "customerId":"54f50897-26f3-c9af-83f9-e71459be70d9", "details":{ "executionEndDate":1744786996372 }, "id":"a9dc8a16-53c4-4876-bbc9-d68b76884f38", "categories":{ "regions":[ "us-east-1" ], "projects":[ null ], "solutions":[ "AWS Best Practices" ], "cloud_providers":[ "AWS" ], "services":[ ], "accounts":[ "@aa70acae-6ea8-3acf-b504-f327855b316a" ], "resource_groups":[ ], "apps":[ ] }, "startDate":1744786993707, "linkedExecutionIds":null, "updatedAt":1744786996398, "status":"Success" } ] }
Sample 2: Get the list of executions for the specified workflow created after the start dateSample 2: Get the list of executions for the specified workflow created after the start date
API Request
curl -X GET '<qualys_base_url>/qflowapi/v1/workflows/workflows/f516bcf4-f6fb-46ac-a54f-ddbcf2a2d24a/executions?limit=2&page=1&endAt=2025-05-12T01%3A45%3A36.220Z&startAt=2025-04-20T01%3A45%3A36.220Z&order=createdAt' -H "Content-Type: application/json" -H "Authorization: Bearer <jwt token>"
Response
{ "total":"9", "items":[ { "execution":"e5d57d53-79db-4840-a7a0-10d0cb1d8020", "workflow":"f516bcf4-f6fb-46ac-a54f-ddbcf2a2d24a", "endDate":1745233995144, "parDateKey":"2025-04-21T00:00:00.000Z", "executionType":"Simple", "source":"UI", "parentExecutionId":null, "tags":[ "created_by=0ffaf046-768b-79fc-83f6-aa25be52c2a1" ], "createdAt":1745233971431, "customerId":"54f50897-26f3-c9af-83f9-e71459be70d9", "details":{ "executionEndDate":1745233995144 }, "id":"e5d57d53-79db-4840-a7a0-10d0cb1d8020", "categories":{ "regions":[ "us-east-1" ], "projects":[ null ], "solutions":[ "AWS Best Practices" ], "cloud_providers":[ "AWS" ], "services":[ ], "accounts":[ "@aa70acae-6ea8-3acf-b504-f327855b316a" ], "resource_groups":[ ], "apps":[ ] }, "startDate":1745233971431, "linkedExecutionIds":null, "updatedAt":1745233995210, "status":"Success" }, { "execution":"6ad5f333-c4ad-4008-b0d3-caab170d130b", "workflow":"f516bcf4-f6fb-46ac-a54f-ddbcf2a2d24a", "endDate":1745234580143, "parDateKey":"2025-04-21T00:00:00.000Z", "executionType":"Simple", "source":"UI", "parentExecutionId":null, "tags":[ "created_by=0ffaf046-768b-79fc-83f6-aa25be52c2a1" ], "createdAt":1745234555690, "customerId":"54f50897-26f3-c9af-83f9-e71459be70d9", "details":{ "executionEndDate":1745234580143 }, "id":"6ad5f333-c4ad-4008-b0d3-caab170d130b", "categories":{ "regions":[ "us-east-1" ], "projects":[ null ], "solutions":[ "AWS Best Practices" ], "cloud_providers":[ "AWS" ], "services":[ ], "accounts":[ "@aa70acae-6ea8-3acf-b504-f327855b316a" ], "resource_groups":[ ], "apps":[ ] }, "startDate":1745234555690, "linkedExecutionIds":null, "updatedAt":1745234580184, "status":"Success" } ] }