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. | |||||||||||||||||||||
| String | 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 | An SQL-like filter 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:
[ { "first_match_only": false, "sequence": 1, "operations": [ { "duration": 0, "reset": false, "type": "delay" }, { "operation_name": "Stop Alert", "function_name": "stop", "forwarding_behavior": "stop all workflows", "type": "action" }], "moolet_name": "Alert Workflows", "workflow_name": "Closed Alerts Filter", "entry_filter": "state = 9", "active": true, "description": "You can optionally use this workflow to prevent closed alerts from processing.", "sweep_up_filter": "((agent = \"Test\") AND (significance = 0)) OR (severity = 0)", "id": 3 } ]