getWorkflowEngineMoolets
A MoogDb v2 method that returns a list of Workflow Engine Moolets and the functions available in each. This endpoint returns an empty list if Moogfarmd is not running.
Back to MoogDb V2 API Method Reference.
Request arguments
Method getWorkflowEngineMoolets
takes no request arguments.
Response
Method getWorkflowEngineMoolets
returns a JSON array of Workflow Engine Moolet objects. Each object has the following:
Name | Type | Description |
---|---|---|
| String | Workflow Engine Moolet name. |
| ENUM/String | Workflow Engine Moolet type: event, alert, or Situation. |
| Boolean | Whether or not the workflow engine that the Moolet represents is active. |
| JSON | The available functions in the Workflow Engine Moobot - each key is the function name and the values are:
|
| Number | Time when the Workflow Engine Moolet was last updated, in Unix Epoch time. |
Examples
The following examples demonstrate typical use of method getWorkflowEngineMoolets
:
Request example
Example request to return information on all of the Workflow Engine Moolets in Moogsoft Onprem:
var workflowEngineMoolets = moogdb.getWorkflowEngineMoolets;
Response example
Example response returning information on all of the Workflow Engine Moolets in Moogsoft Onprem:
[{ "active": true, "last_updated": 1567420771, "moolet_name": "Alert Workflows", "functions": { "alertInSituation": { "decision": true, "validators": null, "name": "alertInSituation", "description": "Check if the alert is in an active Situation.", "arguments": [], "actionOnAssociated": true, "type": ["alert"] }, "alertNotInSituation": { "decision": true, "validators": null, "name": "alertNotInSituation", "description": "Check if the alert is not in an active Situation.", "arguments": [], "actionOnAssociated": true, "type": ["alert"] }, "between": { "decision": true, "validators": null, "name": "between", "description": "Check to see if the trigger falls between two times, and optionally on specific days.", "arguments": [ { "name": "from", "validator": { "regex": "^[0-9]{2}:[0-9]{2}:[0-9]{2}$" }, "description": "The 'from' time in hh:mm:ss 24hr format", "type": "string", "required": true }, { "name": "to", "validator": { "regex": "^[0-9]{2}:[0-9]{2}:[0-9]{2}$" }, "description": "The 'to' time in hh:mm:ss 24hr format", "type": "string", "required": true }, { "name": "days", "description": "The optional list of days in short form (Mon,Tue,Wed...), for all days use a blank list []", "type": "object", "required": true } ], "actionOnAssociated": false, "type": ["alert","situation"] }, "contains": { "decision": true, "validators": null, "name": "contains", "description": "Check whether the specified object field contains any of the listed values. Define values as an array, for example [ a ] or [ a, b, c ].", "arguments": [ { "name": "field", "description": "The name of the object field to check values in (including custom_info).", "type": "string", "required": true }, { "name": "values", "description": "The list of values to check for, any intersection is valid.", "type": "object", "required": true } ], "actionOnAssociated": true, "type": ["event","alert","situation"] }, "containsAll": { "decision": true, "validators": null, "name": "containsAll", "description": "Check whether the specified object field contains all of the listed values. Define values as an array, for example [ a ] or [ a, b, c ].", "arguments": [ { "name": "field", "description": "The name of the object field to check values in (including custom_info).", "type": "string", "required": true }, { "name": "values", "description": "The list of values to check for, all must be included to be valid.", "type": "object", "required": true } ], "actionOnAssociated": true, "type": ["event","alert","situation"] }, "doesNotContain": { "decision": true, "validators": null, "name": "doesNotContain", "description": "Check whether the specified object field does not contain any of the listed values. Define values as an array, for example [ a ] or [ a, b, c ].", "arguments": [ { "name": "field", "description": "The name of the object field to check values in (including custom_info).", "type": "string", "required": true }, { "name": "values", "description": "The list of values to check for, any intersection will count.", "type": "object", "required": true } ], "actionOnAssociated": true, "type": ["event","alert","situation"] } }, "moolet_type": "alert" }, { "active": true, "last_updated": 1567420777, "moolet_name": "Enrichment Workflows", "functions": { "alertInSituation": { "decision": true, "validators": null, "name": "alertInSituation", "description": "Check if the alert is in an active Situation.", "arguments": [], "actionOnAssociated": true, "type": ["alert"] }, "alertNotInSituation": { "decision": true, "validators": null, "name": "alertNotInSituation", "description": "Check if the alert is not in an active Situation.", "arguments": [], "actionOnAssociated": true, "type": ["alert"] }, "between": { "decision": true, "validators": null, "name": "between", "description": "Check to see if the trigger falls between two times, and optionally on specific days.", "arguments": [ { "name": "from" , "validator": { "regex": "^[0-9]{2}:[0-9]{2}:[0-9]{2}$" }, "description": "The 'from' time in hh:mm:ss 24hr format", "type": "string", "required": true }, { "name": "to", "validator": { "regex": "^[0-9]{2}:[0-9]{2}:[0-9]{2}$" }, "description": "The 'to' time in hh:mm:ss 24hr format", "type": "string", "required": true }, { "name": "days", "description": "The optional list of days in short form (Mon,Tue,Wed...), for all days use a blank list []", "type": "object", "required": true } ], "actionOnAssociated": false, "type": ["alert","situation"] }, "moolet_type": "alert" }]