Summary
Import Triggers
Description
Import Triggers.
Route
PUT /operations-manager/triggers
Roles
Parameters
Name | Type | Required | Description |
---|---|---|---|
triggers | array | yes | An array of exported Trigger documents. |
options | object | yes | Optional parameters. |
{ "triggers": [ { "name": "myCoolDocumentName", "type": "endpoint", "enabled": true, "actionType": "automations", "actionId": "e6614761ff1267819ed2ee6c", "verb": "POST", "routeName": "ucego", "_id": "bb9843b3f2af7498a69fa8a2", "jst": null, "description": "Some helpful information about the document", "lastExecuted": 79897572, "migrationVersion": -53220011, "createdBy": "do fugiat proident Lorem", "created": "1963-05-10T03:39:28.666Z", "lastUpdatedBy": "dolore dolor ut cillum enim", "lastUpdated": "1967-05-29T05:13:39.548Z" }, { "name": "nulla", "type": "quis", "enabled": true, "actionType": "consectetur mollit commodo ad", "actionId": -89373465.52755904, "formData": "eu ut Ut magna elit", "firstRunAt": false, "processMissedRuns": "ullamco laboris ut laborum exercitation", "repeatUnit": 31161101, "repeatFrequency": "adipisicing ad enim sit est", "repeatInterval": false, "_id": true, "formId": -63299428.07212259 }, { "name": "myCoolDocumentName", "type": "manual", "enabled": true, "actionType": "automations", "actionId": "8c8935ba684c0e86bcc75b2f", "formData": { "ip": "1.2.3.4", "name": "myNewDevice" }, "_id": "7f052248ff3366206c4bdd67", "formId": null, "description": "Some helpful information about the document", "lastExecuted": 48701660, "migrationVersion": 49410653, "createdBy": null, "created": "1965-12-08T06:16:59.019Z", "lastUpdatedBy": "Duis adipisicing irure proident", "lastUpdated": "2011-02-05T00:48:14.88Z", "formSchemaHash": "consequat", "legacyWrapper": true } ], "options": { "adapterMap": { "old_name": "new_name" } } }
{ "type": "object", "properties": { "triggers": { "title": "triggers", "type": "array", "items": { "title": "triggers", "$ref": "trigger-json" } }, "options": { "title": "options", "type": "object", "properties": { "adapterMap": { "type": "object", "description": "A mapping of provenance names to be converted upon import, specified in \"old_name\": \"new_name\" format.", "examples": [ { "staging": "production" }, { "old_name": "new_name" } ] } }, "additionalProperties": false } }, "required": [ "triggers", "options" ], "additionalProperties": false }
Return
Name | Type | Description |
---|---|---|
createdTigger | object | The result of the import operation. |
{ "message": "Successfully imported 3 of 4 documents", "data": [ { "success": false, "data": { "name": "myCoolDocumentName", "description": "Some helpful information about the document", "enabled": true, "actionType": "automations", "actionId": "5d1771ecc644e8e4d0a43d3c", "lastExecuted": null, "migrationVersion": -81636688, "createdBy": "Pronghorn", "created": "1952-01-13T02:10:49.41Z", "lastUpdatedBy": "Pronghorn", "lastUpdated": "1975-03-07T14:50:54.096Z", "_id": "2b696a0a8ca7ef1a2d346113" } }, { "success": true, "data": { "name": "myCoolDocumentName", "description": "Some helpful information about the document", "enabled": true, "actionType": "automations", "actionId": "dbe87cb0c1ade17a6b148675", "lastExecuted": 90080357, "migrationVersion": -5618862, "createdBy": "Pronghorn", "created": "1964-11-25T15:23:26.009Z", "lastUpdatedBy": "Pronghorn", "lastUpdated": "1970-02-18T22:21:04.014Z", "_id": "f9b6a3d4d559420a50b47b7a" } }, { "success": false, "data": { "name": "myCoolDocumentName", "description": "Some helpful information about the document", "enabled": false, "actionType": "automations", "actionId": "f6fa9a5848d15d1b123c915c", "lastExecuted": 15538309, "migrationVersion": -53171535, "createdBy": "c04b5bb6946005be02318732", "created": "1985-12-28T17:48:55.584Z", "lastUpdatedBy": "10530d284a17064899894ef1", "lastUpdated": "2012-08-31T21:17:32.816Z", "_id": "af874d060294ecd551674393" } }, { "success": true, "data": { "name": "myCoolDocumentName", "description": "Some helpful information about the document", "enabled": true, "actionType": "automations", "actionId": "cee31187fb2f07582138ca17", "lastExecuted": null, "migrationVersion": -34147430, "createdBy": "f69080bcb1f20a3438a80781", "created": "1967-03-28T22:51:23.601Z", "lastUpdatedBy": "Pronghorn", "lastUpdated": "2021-01-30T12:43:44.586Z", "_id": "d55cb1bcf6cbf1d3a0d8e8e9" } }, { "success": true, "data": { "name": "myCoolDocumentName", "description": "Some helpful information about the document", "enabled": false, "actionType": "automations", "actionId": "0b393506909c6515541b771b", "lastExecuted": null, "migrationVersion": 98468818, "createdBy": "d94714d1ce30a9f2ec72b34c", "created": "1946-10-26T15:09:59.681Z", "lastUpdatedBy": "Pronghorn", "lastUpdated": "1980-11-16T15:52:30.678Z", "_id": "9c145b4afdc2e09cbe02b9ca" } } ] }
{ "title": "createdTigger", "allOf": [ { "$ref": "common-api#/definitions/success-response" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "allOf": [ { "$ref": "trigger-common#/definitions/commonFields" }, { "$ref": "common#/definitions/metadataFields" }, { "type": "object", "properties": { "_id": { "$ref": "common#/definitions/ObjectIdLikeString" } } } ] } } } } } } ] }