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": "manual", "enabled": true, "actionType": "automations", "actionId": "c2034f2e17228267d8b2a9dc", "formData": { "ip": "1.2.3.4", "name": "myNewDevice" }, "_id": "385a2a38345530a120361b2c", "formId": "myCoolDocumentName", "description": "Some helpful information about the document", "lastExecuted": null, "migrationVersion": 39186309, "createdBy": null, "created": "1996-12-25T23:35:46.118Z", "lastUpdatedBy": null, "lastUpdated": "2009-04-24T19:15:59.87Z", "formSchemaHash": null }, { "name": "myCoolDocumentName", "type": "endpoint", "enabled": true, "actionType": "automations", "actionId": "cd94609945d94ac48274eebd", "verb": "POST", "routeName": "fQ9", "_id": "f7b0374eec0af30d8002500d", "jst": null, "description": "Some helpful information about the document", "lastExecuted": 80542247, "migrationVersion": 72983176, "createdBy": null, "created": "1963-10-27T20:43:39.955Z", "lastUpdatedBy": "ex aliquip nisi", "lastUpdated": "2024-04-01T20:59:26.926Z" }, { "name": "myCoolDocumentName", "type": "eventSystem", "enabled": false, "actionType": "automations", "actionId": "d9384eb4f5eecb56b222d716", "source": "aute dolor laboris", "topic": "consequat nostrud consectetur", "_id": "d664d78b607f62e5ee039680", "description": "Some helpful information about the document", "lastExecuted": null, "migrationVersion": -82653770, "createdBy": "reprehenderit nisi ipsum ex", "created": "1997-11-06T13:58:16.942Z", "lastUpdatedBy": "reprehenderit proident magna", "lastUpdated": "1977-09-12T02:18:22.11Z" } ], "options": { "adapterMap": { "staging": "production" } } }
{ "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": "9ff82948ab69c64382f8fa99", "lastExecuted": 49959667, "migrationVersion": 3697938, "createdBy": "83c02eaf50fb18d8d0a3d394", "created": "1954-12-01T19:10:06.56Z", "lastUpdatedBy": "Pronghorn", "lastUpdated": "2003-04-14T05:03:56.682Z", "_id": "a03777a18512699c3d7cb220" } }, { "success": true, "data": { "name": "myCoolDocumentName", "description": "Some helpful information about the document", "enabled": true, "actionType": "automations", "actionId": "ee4d9c4a0739c453b698f503", "lastExecuted": null, "migrationVersion": 57811006, "createdBy": "Pronghorn", "created": "2000-11-04T14:42:54.372Z", "lastUpdatedBy": "efae52f293e011bec6a334c2", "lastUpdated": "2022-12-28T11:44:56.322Z", "_id": "553683efec323770276bb6f3" } }, { "success": true, "data": { "name": "myCoolDocumentName", "description": "Some helpful information about the document", "enabled": false, "actionType": "automations", "actionId": "ab54d5ad366dbce26e335b9f", "lastExecuted": null, "migrationVersion": -92715572, "createdBy": "Pronghorn", "created": "1952-10-18T17:58:56.48Z", "lastUpdatedBy": "Pronghorn", "lastUpdated": "1991-04-15T16:27:06.331Z", "_id": "9eb730614eaa6785422a51eb" } }, { "success": false, "data": { "name": "myCoolDocumentName", "description": "Some helpful information about the document", "enabled": true, "actionType": "automations", "actionId": "8bf5dd84bf51add07bbce2ab", "lastExecuted": null, "migrationVersion": 4952517, "createdBy": "Pronghorn", "created": "1984-08-30T16:40:59.216Z", "lastUpdatedBy": "Pronghorn", "lastUpdated": "1996-01-11T06:22:44.045Z", "_id": "68e7de32668906484ed94a3c" } }, { "success": false, "data": { "name": "myCoolDocumentName", "description": "Some helpful information about the document", "enabled": false, "actionType": "automations", "actionId": "e4dd88d435dee93fd7fe025a", "lastExecuted": null, "migrationVersion": -50200884, "createdBy": "Pronghorn", "created": "1978-11-12T22:29:37.335Z", "lastUpdatedBy": "Pronghorn", "lastUpdated": "2011-11-09T18:35:36.803Z", "_id": "b717cf65e52252982de9d2a9" } } ] }
{ "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" } } } ] } } } } } } ] }