Summary
Get Triggers
Description
Query the Trigger document collection
Route
GET /operations-manager/triggers
Roles
Parameters
Name | Type | Required | Description |
---|---|---|---|
queryParameters | object | yes | query params for searching |
{ "queryParameters": { "contains": "event", "containsField": "name", "equals": "my event trigger", "equalsField": "name", "startsWith": "my", "startsWithField": "name", "greaterThanField": "lastExecuted", "greaterThan": "04/06/2021", "lessThanField": "lastExecuted", "lessThan": "Thu Nov 15 2018 01:30:00 GMT-0500 (Eastern Standard Time)", "enabled": false, "actionId": "sunt reprehenderit minim", "limit": 50, "skip": 1, "order": 1, "sort": "name" } }
{ "type": "object", "properties": { "queryParameters": { "title": "queryParameters", "type": "object", "properties": { "contains": { "type": "string", "examples": [ "event" ], "description": "the value for a contains query. if the property with the key of containsField does not have a value that contains this string, then filter out the document" }, "containsField": { "type": "string", "examples": [ "name" ], "description": "the field to run a contains query on" }, "equals": { "type": "string", "examples": [ "my event trigger" ], "description": "the value for an equals query. if the property with the key of equalsField does not have a value that equals this string, then filter out the document" }, "equalsField": { "type": "string", "examples": [ "name" ], "description": "the field to run an equals query on" }, "startsWith": { "type": "string", "examples": [ "my" ], "description": "the value for a startsWith query. if the property with the key of startsWithField does not have a value that starts with this string, then filter out the document" }, "startsWithField": { "type": "string", "examples": [ "name" ], "description": "the field to run a startsWith query on" }, "greaterThanField": { "type": "string", "examples": [ "lastExecuted" ], "description": "the field to run a greater than query on" }, "greaterThan": { "type": "string", "examples": [ "04/06/2021", "Thu Dec 03 2020 14:55:00 GMT-0500 (Eastern Standard Time)", "2020-12-03T19:55:43.189Z", "1617681600000" ], "description": "the value to use for the greater than query. If the value is a valid date string, then it will be converted to a unix timestamp in milliseconds" }, "lessThanField": { "type": "string", "examples": [ "lastExecuted" ], "description": "the field to run a less than query on" }, "lessThan": { "type": "string", "examples": [ "04/06/2021", "Thu Nov 15 2018 01:30:00 GMT-0500 (Eastern Standard Time)", "2020-12-03T19:55:43.189Z", "1615611600000" ], "description": "the value to use for the less than query. If the value is a valid date string, then it will be converted to a unix timestamp in milliseconds" }, "enabled": { "type": "boolean", "description": "if true, then only return trigger documents that are enabled" }, "actionId": { "type": "string", "description": "if provided, only return trigger documents with this action id" }, "limit": { "type": "integer", "description": "Number of results to return. Used for pagination.", "default": 25, "minimum": 0, "examples": [ 1, 10, 50 ] }, "skip": { "type": "integer", "description": "Number of results to skip. Used for pagination.", "default": 0, "minimum": 0, "examples": [ 1, 10, 50 ] }, "order": { "type": "integer", "description": "The sort direction: 1 for ascending or -1 for descending.", "default": 1, "enum": [ -1, 1 ] }, "sort": { "type": "string", "description": "Field to sort by. Default is name.", "default": "name", "enum": [ "name" ] } } } }, "required": [ "queryParameters" ], "additionalProperties": false }
Return
Name | Type | Description |
---|---|---|
result | object | total number and a list of trigger documents that matched the search query |
{ "results": [ { "$id": "eventSystem-trigger-common", "title": "EventSystem Triggers Schema Common Definitions", "description": "Common elements in the schema for a EventSystem Trigger", "definitions": { "commonEventSystemTriggerFieldNames": { "enum": [ "lastExecuted", "source", "topic", "schema", "jst" ] }, "commonEventSystemTriggerFields": { "type": "object", "properties": { "type": { "const": "eventSystem" }, "lastExecuted": { "description": "A timestamp in milliseconds of the time this job was last executed.", "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] }, "source": { "type": "string" }, "topic": { "type": "string" }, "schema": { "oneOf": [ { "$ref": "http://json-schema.org/draft-07/schema#" }, { "type": "null" } ] }, "jst": { "oneOf": [ { "title": "MongoDB ObjectID", "description": "String representation of a MongoDB ObjectId", "examples": [ "4321abcdef694aa79dae47ad", "5cb7b531d06cceb89fd21b1c" ], "oneOf": [ { "type": "object" }, { "type": "string", "pattern": "^[0-9a-f]{24}$" } ] }, { "type": "null" } ] } } } } }, { "$id": "schedule-trigger-common", "title": "Schedule Triggers Schema Common Definitions", "description": "Common elements in the schema for a Schedule Trigger", "definitions": { "commonScheduleTriggerFieldNames": { "enum": [ "formData", "formSchemaHash", "firstRunAt", "processMissedRuns" ] }, "commonScheduleTriggerFields": { "type": "object", "properties": { "type": { "const": "schedule" }, "formData": { "description": "A pre-filled JSON object created by filling out the associated JSON Form.", "type": [ "object", "null" ], "examples": [ { "deviceName": "ATL-123", "action": "SYNC" }, { "deviceName": "XYZ-987", "action": "SHUTDOWN" } ] }, "formSchemaHash": { "type": [ "string", "null" ] }, "firstRunAt": { "description": "A timestamp in milliseconds for the first scheduled run of this job.", "type": "integer", "minimum": 0, "examples": [ 1648829216268 ] }, "stopRunningAt": { "description": "A millisecond resolution timestamp denoting when to stop this schedule. This is calculated using repeatEnd and lastIntervalStart.", "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ], "examples": [ 1648829216268, null ] }, "lastIntervalStart": { "description": "A millisecond resolution timestamp denoting when the current run interval started. This is calculated using repeatEnd.", "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ], "examples": [ 1648829216268, null ] }, "processMissedRuns": { "description": "Describes how any missed job runs should be processed. A missed run is a job that was supposed to be ran at least 'n' seconds ago, but did not due to some issue with IAP (busy process, IAP was down, etc). 'none' means do not run any missed jobs. 'last' means only run the last missed job.", "type": "string", "enum": [ "none", "last" ] } } }, "legacyInvariantProperties": { "properties": { "repeatInterval": { "description": "The interval between repeated jobs in milliseconds. This is calculated from repeatUnit and repeatFrequency.", "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ], "examples": [ 10000, 30000, 120000 ] } } }, "legacyCovariantProperties": { "type": "object", "additionalProperties": true, "oneOf": [ { "properties": { "repeatUnit": { "type": "null" }, "repeatFrequency": { "type": "null" } } }, { "properties": { "repeatUnit": { "type": "string", "enum": [ "minute", "hour", "day", "week" ] }, "repeatFrequency": { "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] } }, "required": [ "repeatUnit" ] }, { "properties": { "repeatUnit": { "const": "second" }, "repeatFrequency": { "oneOf": [ { "type": "integer", "minimum": 0, "multipleOf": 10 }, { "type": "null" } ] } }, "required": [ "repeatUnit", "repeatFrequency" ] } ] }, "dimensionedQuantitySeconds": { "type": "object", "properties": { "unit": { "const": "second" }, "quantity": { "type": "number", "minimum": 0, "multipleOf": 10, "examples": [ 30, 140, 2000 ] } } }, "dimensionedQuantityOther": { "type": "object", "properties": { "unit": { "enum": [ "minute", "hour", "day", "week" ] }, "quantity": { "type": "number", "minimum": 0, "examples": [ 1, 3, 5, 10 ] } } }, "implicitMsQuantity": { "$comment": "Implicit unit of milliseconds", "type": "number", "minimum": 0, "multipleOf": 10000, "examples": [ 10000, 30000, 100000 ] }, "intervalDuration": { "oneOf": [ { "type": "object", "properties": { "unit": { "const": "second" }, "quantity": { "type": "number", "minimum": 0, "multipleOf": 10, "examples": [ 30, 140, 2000 ] } } }, { "type": "object", "properties": { "unit": { "enum": [ "minute", "hour", "day", "week" ] }, "quantity": { "type": "number", "minimum": 0, "examples": [ 1, 3, 5, 10 ] } } }, { "$comment": "Implicit unit of milliseconds", "type": "number", "minimum": 0, "multipleOf": 10000, "examples": [ 10000, 30000, 100000 ] } ] }, "intervalAction": { "type": "object", "properties": { "action": { "enum": [ "execute", "wait" ] } }, "required": [ "action" ] }, "intervalComponents": { "type": "object", "properties": { "components": { "type": "array", "items": { "$ref": "#/definitions/anyInterval" } } }, "required": [ "components" ] }, "anyIntervalDirective": { "oneOf": [ { "type": "object", "properties": { "action": { "enum": [ "execute", "wait" ] } }, "required": [ "action" ] }, { "$ref": "#/definitions/intervalComponents" } ] }, "standardInterval": { "allOf": [ { "type": "object", "properties": { "type": { "enum": [ "repeating", "terminating" ] }, "duration": { "oneOf": [ { "type": "object", "properties": { "unit": { "const": "second" }, "quantity": { "type": "number", "minimum": 0, "multipleOf": 10, "examples": [ 30, 140, 2000 ] } } }, { "type": "object", "properties": { "unit": { "enum": [ "minute", "hour", "day", "week" ] }, "quantity": { "type": "number", "minimum": 0, "examples": [ 1, 3, 5, 10 ] } } }, { "$comment": "Implicit unit of milliseconds", "type": "number", "minimum": 0, "multipleOf": 10000, "examples": [ 10000, 30000, 100000 ] } ] } } }, { "$ref": "#/definitions/anyIntervalDirective" } ] }, "countShorthandInterval": { "allOf": [ { "type": "object", "properties": { "type": { "const": "count" }, "duration": { "oneOf": [ { "type": "object", "properties": { "unit": { "const": "second" }, "quantity": { "type": "number", "minimum": 0, "multipleOf": 10, "examples": [ 30, 140, 2000 ] } } }, { "type": "object", "properties": { "unit": { "enum": [ "minute", "hour", "day", "week" ] }, "quantity": { "type": "number", "minimum": 0, "examples": [ 1, 3, 5, 10 ] } } }, { "$comment": "Implicit unit of milliseconds", "type": "number", "minimum": 0, "multipleOf": 10000, "examples": [ 10000, 30000, 100000 ] } ] }, "count": { "type": "integer", "minimum": 0, "examples": [ 2, 5, 10, 25 ] } } }, { "$ref": "#/definitions/anyIntervalDirective" } ] }, "dateRangeShorthandInterval": { "allOf": [ { "type": "object", "properties": { "type": { "const": "date-range" }, "start": { "description": "", "type": "string", "format": "date-time", "examples": [ "2019-04-16T00:43:22.038Z" ] }, "end": { "description": "", "type": "string", "format": "date-time", "examples": [ "2019-04-16T00:43:22.038Z" ] } } }, { "$ref": "#/definitions/intervalComponents" } ] }, "anyInterval": { "oneOf": [ { "$ref": "#/definitions/standardInterval" }, { "$ref": "#/definitions/dateRangeShorthandInterval" }, { "$ref": "#/definitions/countShorthandInterval" } ] } } } ], "total": 67896180 }
{ "title": "result", "properties": { "results": { "type": "array", "items": { "anyOf": [ { "$ref": "endpoint-trigger-common" }, { "$ref": "eventSystem-trigger-common" }, { "$ref": "manual-trigger-common" }, { "$ref": "schedule-trigger-common" } ] } }, "total": { "description": "total number of event docs that matched the query", "type": "integer" } } }