Run Workflow API
Use this API to initiate the execution of a specific workflow. It allows triggering automated processes with input parameters.
Required Permissions
Following permissions are needed to run the workflow:
- EXECUTE ALL
- EXECUTE WF BY TAGS
- EXECUTE MY WF
Input ParametersInput Parameters
|
Parameter |
Mandatory/Optional |
Data Type |
Description |
|---|---|---|---|
|
workflowId |
Mandatory |
String |
Unique identifier of the workflow to run. |
| input | Optional | String | Workflow-specific input parameters. Example: {"buckets": ["test-bucket-1", "test-bucket-2"]} |
|
variables |
Optional |
String |
Key-value pairs to override workflow variables at runtime. See the table below for supported system and user-defined variables. |
Variables
These are the supported variables you can pass while running the Run Workflow API.
| Name | Connector Type | Type | Example Value | Description |
|---|---|---|---|---|
connectorId |
AWS, Azure, GCP, OCI | string (UUID) | aa70acae-xxxx-xxxx-xxxx-f327855b316a |
Connector used for authentication. |
region |
AWS | string | us-east-1 |
AWS region for deployment. |
resourceGroup |
Azure | string | DefaultResourceGroup-CIN |
Azure resource group name. |
project |
GCP | string | gcp-qualys-demo |
GCP project ID. |
oci_region |
OCI | string | ap-hyderabad-1 |
OCI region ID |
compartment |
OCI | string | ocid1.compartment.oc1..aaaaaaaadrxxxxxxxxx |
The OCI Compartment ID. |
You can generate the Connector UUID required for the workflow cloud Credentials by executing the Get Connector APIs (for each provider) in TotalCloud. Use the following APIs for your respective cloud provider.
AWS | Azure | GCP | OCI
You can also run any valid custom user-defined variable of types List, String, Boolean, JSON, or Integer in the variable parameter.
Sample: Initiate execution of a workflowSample: Initiate execution of a workflow
API Request
curl --location 'https://<qualys_base_url>.qualys.com/qflowapi/v1/workflows/6cad21c8-xxxx-xxxx-xxxx-7372feafb5b4/run' \
--header 'accept: application/json' \
--header 'Authorization: <Token>' \
--header 'Content-Type: application/json' \
--data '{
"input": {
"bucketName": "test-bucket-1",
"totalBucketCount": 4
},
"variables":{
"connectorId": "aa70acae-xxxx-xxxx-xxxx-f327855b316a",
"region": "us-east-1",
"name": "maha2"
}
}'
Response
{
"message": "Workflow execution started",
"executionId": "497d0fe7-xxxx-xxxx-xxxx-3d90e904d1c5"
}