getWorkflows
A Graze API GET request that returns workflows for a Workflow Engine Moolet.
Back to Graze API EndPoint Reference.
Request arguments
Endpoint getWorkflows
takes the following request arguments:
Name |
Type |
Required |
Description |
---|---|---|---|
|
String |
Yes |
A valid |
|
String |
Yes |
Name of the Workflow Engine Moolet that you want to return the workflows for. |
Response
Endpoint getWorkflows
returns the following response:
Successful requests return a JSON object containing the following:
Name |
Type |
Description |
|||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Integer |
Unique ID of the workflow. |
|||||||||||||||||||||
|
String |
Name of the Workflow Engine Moolet. |
|||||||||||||||||||||
|
String |
Name of the workflow. |
|||||||||||||||||||||
|
String |
Description of the workflow. |
|||||||||||||||||||||
|
Integer |
Sequence number of the workflow. |
|||||||||||||||||||||
|
Boolean |
Indicates whether or not the Moolet's associated Workflow Engine is active. |
|||||||||||||||||||||
|
JSON Object |
Filter in SQL-like or JSON format 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. |
|||||||||||||||||||||
|
JSON Object |
Filter in SQL-like or JSON format to intake any additional alerts or Situations from the database. Not relevant for event workflows. See Filter Search Data for more information on creating SQL-like filters. |
|||||||||||||||||||||
|
Boolean |
If enabled, alerts and Situations only pass through actions on the first time they enter the Workflow Engine. Not relevant for event workflows. |
|||||||||||||||||||||
|
JSON List |
List of properties relating to each operation:
|
Examples
The following examples demonstrate typical use of endpoint getWorkflows
:
Request example
Example cURL request to return workflows associated with the "Alert Workflows" Moolet:
curl -G -u graze:graze -k -v "https://localhost/graze/v1/getWorkflows" \ -H "Content-Type: application/json; charset=UTF-8" \ --data-urlencode "moolet_name=Alert Workflows"
Response example
Example response returning information on the workflows associated with the "Alert Workflows" Moolet:
[ { "id": 1, "moolet_name": "Alert Workflows", "workflow_name": "ChangeInfoWorkflow", "sequence": 1, "active": true, "description": "Changingthealertinformation", "entry_filter": { "column": "severity", "op": 5, "value": 3, "type": "LEAF" }, "sweep_up_filter": { "column": "description", "op": 4, "value": "description", "type": "LEAF" }, "first_match_only": true, "operations": [ { "type": "action", "function_name": "functionA", "operation_name": "Name of operation", "function_args": { "admin": 2 } },{ "type": "delay", "delay": 30, "reset": false } ] } ]