Summary
Import Triggers
Description
Route
PUT /operations-manager/triggers
Roles
Parameters
Name | Type | Required | Description |
---|---|---|---|
triggers | array | yes | A list of Trigger documents to import |
options | object | yes | optional parameters |
{ "triggers": [ { "title": "Manual Triggers Schema Common Definitions", "description": "Common elements in the schema for a Manual Trigger", "definitions": { "commonManualTriggerFieldNames": { "enum": [ "formData", "formSchemaHash", "lastExecuted" ] }, "commonManualTriggerFields": { "type": "object", "properties": { "type": { "const": "manual" }, "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" ] }, "lastExecuted": { "description": "A timestamp in milliseconds of the time this job was last executed.", "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] } } } } }, { "$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" } ] } } } } }, { "title": "Manual Triggers Schema Common Definitions", "description": "Common elements in the schema for a Manual Trigger", "definitions": { "commonManualTriggerFieldNames": { "enum": [ "formData", "formSchemaHash", "lastExecuted" ] }, "commonManualTriggerFields": { "type": "object", "properties": { "type": { "const": "manual" }, "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" ] }, "lastExecuted": { "description": "A timestamp in milliseconds of the time this job was last executed.", "oneOf": [ { "type": "integer", "minimum": 0 }, { "type": "null" } ] } } } } } ] }
{ "type": "object", "properties": { "triggers": { "title": "trigger", "type": "array", "items": { "oneOf": [ { "$ref": "endpoint-trigger-common" }, { "$ref": "eventSystem-trigger-common" }, { "$ref": "manual-trigger-common" }, { "$ref": "schedule-trigger-common" } ] } }, "options": { "title": "options", "type": "object", "properties": {} } }, "required": [ "triggers", "options" ], "additionalProperties": false }
Return
Name | Type | Description |
---|---|---|
createdTigger | object | the created trigger document |
{}
{ "title": "createdTrigger", "type": "object", "oneOf": [ { "$ref": "endpoint-trigger-common" }, { "$ref": "eventSystem-trigger-common" }, { "$ref": "manual-trigger-common" }, { "$ref": "schedule-trigger-common" } ] }