updateWorkflow
A Graze API POST request that updates an existing workflow in the Workflow Engine.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint updateWorkflow
takes the following request arguments:
Name | Type | Required | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| String | Yes | A valid | ||||||||||||||||||||||||||||||||
| String | Yes | ID of the workflow that you want to update. | ||||||||||||||||||||||||||||||||
| String | No | Name of the workflow. | ||||||||||||||||||||||||||||||||
| Boolean | No | Determines whether the workflow is active or not. If | ||||||||||||||||||||||||||||||||
| String | No | Description of the workflow. | ||||||||||||||||||||||||||||||||
| String | No | An SQL-like filter to determine which events, alerts or Situations can enter the workflow. If empty, the workflow accepts all events, alerts or Situations. See Filter Search Data for more information on creating SQL-like filters. | ||||||||||||||||||||||||||||||||
| String | No | An SQL-like filter to intake any additional events, alerts or Situations from the database. See Filter Search Data for more information on creating SQL-like filters. | ||||||||||||||||||||||||||||||||
| Boolean | No | If enabled, events, alerts, and Situations only pass through actions on the first time they enter the Workflow Engine. | ||||||||||||||||||||||||||||||||
| JSON Array | No | List of properties relating to each operation:
|
Response
Endpoint updateWorkflow
returns the following response:
Examples
The following examples demonstrate typical use of endpoint updateWorkflow
:
Request examples
Example cURL request to deactivate workflow ID 14:
curl -X POST -u graze:graze -k \ -v "https://localhost/graze/v1/updateWorkflow" \ -H "Content-Type: application/json; charset=UTF-8" \ --data '{ "id" : 14,"active" :false }'
Example cURL request to rename workflow ID 14:
curl -X POST -u graze:graze -k \ -v "https://localhost/graze/v1/updateWorkflow" \ -H "Content-Type: application/json; charset=UTF-8" \ --data '{ "id" : 14, "workflow_name" : "Deactivated Example" }'
Example cURL request to update the entry filter and sweep-up filter for workflow ID 3:
curl -X POST -u graze:graze -k \ -v "https://localhost/graze/v1/updateWorkflow" \ -H "Content-Type: application/json; charset=UTF-8" \ --data '{ \ "id" : 3, \ "entry_filter": "state = 8", \ "sweep_up_filter": "state = 8" }'