Summary
Import Triggers
Description
Import Triggers.
Route
PUT /operations-manager/triggers
Roles
admin
apiwrite
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
triggers |
array |
yes |
An array of exported Trigger documents. |
options |
object |
yes |
Optional parameters. |
Copied to Clipboard
{
"triggers": [
{
"name": "myCoolDocumentName",
"type": "manual",
"enabled": true,
"actionType": "automations",
"actionId": "5a866b76f72530940203d33d",
"formData": {
"ip": "1.2.3.4",
"name": "myNewDevice"
},
"_id": "fa2a17ea429c760e31638c76",
"formId": "myCoolDocumentName",
"description": "Some helpful information about the document",
"lastExecuted": null,
"migrationVersion": 98462127,
"createdBy": null,
"created": "1979-06-25T04:44:04.237Z",
"lastUpdatedBy": "id laborum ut",
"lastUpdated": "2016-07-11T18:38:01.714Z",
"formSchemaHash": "sint nisi dolor",
"legacyWrapper": true
},
{
"name": "myCoolDocumentName",
"type": "endpoint",
"enabled": false,
"actionType": "automations",
"actionId": "bbfb0e461c85b13fcfd40b2b",
"verb": "POST",
"routeName": "d",
"schema": null,
"_id": "69c985eb4d1b6fcd4fab1202",
"description": "Some helpful information about the document",
"lastExecuted": 26482045,
"migrationVersion": 79903382,
"createdBy": null,
"created": "1988-09-21T14:02:14.538Z",
"lastUpdatedBy": null,
"lastUpdated": "1949-08-20T21:26:57.071Z"
},
{
"name": "myCoolDocumentName",
"type": "manual",
"enabled": false,
"actionType": "automations",
"actionId": "470df62b6240782c9eec2ae5",
"formData": {
"ip": "1.2.3.4",
"name": "myNewDevice"
},
"_id": "e1b6cdfa36200e4fbb903e52",
"formId": null,
"description": "Some helpful information about the document",
"lastExecuted": null,
"migrationVersion": 55358627,
"createdBy": null,
"created": "2010-09-18T18:34:42.314Z",
"lastUpdatedBy": null,
"lastUpdated": "1949-09-29T03:22:17.664Z",
"formSchemaHash": "cillum",
"legacyWrapper": true
}
],
"options": {
"adapterMap": {
"staging": "production"
}
}
}
Copied to Clipboard
{
"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
DetailsExampleSchema
Name |
Type |
Description |
createdTigger |
object |
The result of the import operation. |
Copied to Clipboard
{
"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": "314a1c7b1e9ae20cf3659256",
"lastExecuted": null,
"migrationVersion": 70735339,
"createdBy": "Pronghorn",
"created": "2021-09-04T14:11:08.092Z",
"lastUpdatedBy": "2426c20f5ef9f92e7c6e3816",
"lastUpdated": "1972-11-29T22:49:28.038Z",
"_id": "6eddb8f285cb4c6889431bb9"
}
}
]
}