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": "endpoint",
"enabled": true,
"actionType": "automations",
"actionId": "de0c4ebf73f012e5880ed4a5",
"verb": "POST",
"routeName": "KqCigF",
"_id": "0fcb232a3befe6d21b352d55",
"description": "Some helpful information about the document",
"lastExecuted": 96091734,
"migrationVersion": -72623218,
"createdBy": null,
"created": "2013-08-27T10:13:19.226Z",
"lastUpdatedBy": null,
"lastUpdated": "2001-07-20T19:11:07.343Z"
}
],
"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": false,
"actionType": "automations",
"actionId": "c18185e7275ca0623d3ae309",
"lastExecuted": null,
"migrationVersion": -48536870,
"createdBy": "c39135ba082d08a19fe03b28",
"created": "2022-01-30T06:09:36.075Z",
"lastUpdatedBy": "c63a411d9ec34dee8aa69c94",
"lastUpdated": "1955-01-10T14:16:01.766Z",
"_id": "1e26fb0024c25087cfa95c3c"
}
},
{
"success": false,
"data": {
"name": "myCoolDocumentName",
"description": "Some helpful information about the document",
"enabled": true,
"actionType": "automations",
"actionId": "c8ef9177cd4afd3e350bb565",
"lastExecuted": 26369267,
"migrationVersion": -38707677,
"createdBy": "Pronghorn",
"created": "2016-01-06T09:06:46.889Z",
"lastUpdatedBy": "e02ed68857b20b1c9f7f1f00",
"lastUpdated": "1950-06-07T19:08:41.917Z",
"_id": "975643fdb5d5f03b8e5b65a3"
}
},
{
"success": false,
"data": {
"name": "myCoolDocumentName",
"description": "Some helpful information about the document",
"enabled": true,
"actionType": "automations",
"actionId": "475d7631d6ef1c84dd011c7c",
"lastExecuted": null,
"migrationVersion": -7864415,
"createdBy": "Pronghorn",
"created": "2018-06-24T22:21:38.548Z",
"lastUpdatedBy": "Pronghorn",
"lastUpdated": "2003-01-04T02:19:01.489Z",
"_id": "2e11c940ccac3aab777e34b1"
}
}
]
}