Summary
Imports a new template document.
Description
Imports a new template document.
Route
POST /automation-studio/templates/import
Roles
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| templates | array | yes | Templates array. |
{ "templates": [ { "_id": "60054dbe0f99b635fe415fa3", "name": "test", "group": "Sample group", "command": "show ip br", "description": "description", "template": "Value FIRST_WORD (S+)\n\nStart\n ^FIRST_WORD.* -> Record", "data": "some sample text to match against", "type": "test", "createdBy": "3eb5187ce11a9914ff965c3b", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "b320a8d91373f03ed6ebd2d1", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "3f47c764f04b047d624d1106", "name": "occaecat dolore sit fugiat" } ] }, { "_id": "9c7c6e52d7129479f1bb9b76", "name": "test", "group": "Sample group", "command": "show ip br", "description": "description", "template": "Value FIRST_WORD (S+)\n\nStart\n ^FIRST_WORD.* -> Record", "data": "some sample text to match against", "type": "test", "createdBy": "fa81e2ef5f9d309c79b91b38", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "f633e84e291584c9e029bee7", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "a057ae317b73c102760d9467", "name": "non" }, { "_id": "f09697889d3ebbce5829ff10", "name": "nulla et pariatur aute" }, { "_id": "892f9b18b25c9b3991f34955", "name": "magna sit ut minim do" }, { "_id": "1f9c7a455f111261eb4e60f6", "name": "Lorem ex Duis do" }, { "_id": "e06cd43d4dae19e685c3f394", "name": "adipisicing cupidatat" } ] } ] }
{ "type": "object", "properties": { "templates": { "title": "templates", "description": "Array of template documents to import. If '_id' is provided, it will be replaced with an autogenerated '_id'. If a template's name is already used in the templates collection, it will be renamed with a numeric suffix.", "type": "array", "items": { "$ref": "templateImport" } } }, "required": [ "templates" ], "additionalProperties": false }
Return
| Name | Type | Description |
|---|---|---|
| response | object | Results from each individual import operation. |
{ "imported": [ { "message": "eu Duis do est sunt", "original": { "_id": "6764f980d85b48e2c0c1b3ea", "name": "test", "device": "Sample group", "command": "show ip br", "template": "Value FIRST_WORD (S+)\n\nStart\n ^FIRST_WORD.* -> Record", "text": "some sample text to match against", "type": "test", "createdBy": "cf54c4d603742433cecb3d92", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "7ac2dbebf6f6ed03cbcaccdc", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "4485c2330a1561ce4913e8f0", "name": "aliqua culpa minim" }, { "_id": "8c8acfd445ba75b07020cc8c", "name": "occaecat enim" } ] }, "created": { "name": "test", "group": "Sample group", "command": "show ip br", "description": "description", "template": "Value FIRST_WORD (S+)\n\nStart\n ^FIRST_WORD.* -> Record", "data": "some sample text to match against", "type": "test", "_id": "ba9bb488F5CFCBC1eCED126b", "createdBy": "958aBC6B92ccd833C14677FF", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "1adC9dE2a66a95325E924E6e", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "E7a37fDE7DaeCBc3B0665e3c", "name": "aute ut amet occaecat", "description": "A user-defined object to help group documents." }, { "_id": "f040C4856CfD7f50E4EBB636", "name": "incididunt occaecat cupidatat id", "description": "A user-defined object to help group documents." }, { "_id": "EdCdaEE5D5d84c56e72DBDF4", "name": "aute est", "description": "A user-defined object to help group documents." }, { "_id": "B9aA3fB6eccFb9C725A87cb6", "name": "aliqua Duis ut", "description": "A user-defined object to help group documents." } ] }, "edit": null, "success": true }, { "message": "laboris exercitation proident minim in", "original": { "_id": "200a2bea3d9b4882044ad2c8", "name": "test", "group": "Sample group", "command": "show ip br", "description": "description", "template": "Value FIRST_WORD (S+)\n\nStart\n ^FIRST_WORD.* -> Record", "data": "some sample text to match against", "type": "test", "createdBy": "8d0908255f444663d41f677d", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "eeaa93c12af63875c3171d96", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "4a960cdbacb0ddd27aaff947", "name": "incididunt Excepteur eu laborum Ut" }, { "_id": "e959971d8a8c8a78c351cb50", "name": "culpa Lorem Ut aute eu" }, { "_id": "5ffcbff9f2ee49810ecdaaf1", "name": "ex non ipsum irure sit" }, { "_id": "6cde476a485658a1da925c00", "name": "ea labore mollit occaecat" } ] }, "created": null, "edit": null, "success": false }, { "message": "enim dolore id", "original": { "_id": "3d80979a09791d3e67b5e0cb", "name": "test", "group": "Sample group", "command": "show ip br", "description": "description", "template": "Value FIRST_WORD (S+)\n\nStart\n ^FIRST_WORD.* -> Record", "data": "some sample text to match against", "type": "test", "createdBy": "07b5160ccec69752d650ea0a", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "38696407f324a74b716689fb", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "9cabe40a14512a53a628ec9f", "name": "do amet" }, { "_id": "e8f053367bb030040ad49a49", "name": "eiusmod dolor mollit pariatur" }, { "_id": "b2e8748743c0cec818f73762", "name": "officia id ullamco labore" }, { "_id": "b429c444d8e61baa4af00664", "name": "tempor" } ] }, "created": { "name": "test", "group": "Sample group", "command": "show ip br", "description": "description", "template": "Value FIRST_WORD (S+)\n\nStart\n ^FIRST_WORD.* -> Record", "data": "some sample text to match against", "type": "test", "_id": "B00dbd4da9Bf46fC55A0af38", "createdBy": "82dB1f9Ca8aD0Fddac3c601C", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "0aaD23f4cfa7AA987663D290", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "5fb6ED2Bd3c3a415CA39bCB6", "name": "dolore commodo occaecat irure in", "description": "A user-defined object to help group documents." }, { "_id": "3a8f92c7A0f7F3Fa3EC1C3c4", "name": "deserunt Duis nisi ad", "description": "A user-defined object to help group documents." }, { "_id": "cC990aFfD47AcfFF5fe0FE60", "name": "in amet est enim", "description": "A user-defined object to help group documents." }, { "_id": "ea8aa84C7Bae5fccBdEb07E8", "name": "nulla ullamco consequat sit eu", "description": "A user-defined object to help group documents." }, { "_id": "f7aAfBa9Ed3DD65c4674a72F", "name": "laborum nostrud", "description": "A user-defined object to help group documents." } ] }, "edit": "cillum", "success": true }, { "message": "tempor culpa velit sint amet", "original": { "_id": "e0c648c7a020319952123401", "name": "test", "device": "Sample group", "command": "show ip br", "template": "Value FIRST_WORD (S+)\n\nStart\n ^FIRST_WORD.* -> Record", "text": "some sample text to match against", "type": "test", "createdBy": "1fef2d5dd64c600472e76f70", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "32cf0b12c7f9539194361b69", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "29d60eea3f535e5eb34aa5da", "name": "deserunt magna incididunt culpa" } ] }, "created": { "name": "test", "group": "Sample group", "command": "show ip br", "description": "description", "template": "Value FIRST_WORD (S+)\n\nStart\n ^FIRST_WORD.* -> Record", "data": "some sample text to match against", "type": "test", "_id": "E751a06a00eecb2Db23E0C0C", "createdBy": "F07CaAeeb9fDEac3EFcA787F", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "1af0e5C5EdF9aC761dC2Bd95", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "9Be94CDee58BfE8eAa6d51F1", "name": "id pariatur sunt", "description": "A user-defined object to help group documents." } ] }, "edit": null, "success": false }, { "message": "adipisicing", "original": { "_id": "08b1b6f9ec01c80a278395a0", "name": "test", "device": "Sample group", "command": "show ip br", "template": "Value FIRST_WORD (S+)\n\nStart\n ^FIRST_WORD.* -> Record", "text": "some sample text to match against", "type": "test", "createdBy": "17e6e65a18a9d1d00bf90c1a", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "0b90b5bc100d74c8c3f62fe9", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "dce30361b3e53fc67a5e72a4", "name": "ex do" }, { "_id": "6e5458812276407585aa7896", "name": "quis cillum magna qui anim" }, { "_id": "71c311dec2c28a2fb0912b7e", "name": "occaecat labore id officia sint" }, { "_id": "c28aaa999fc2a77da11d713b", "name": "consectetur consequat dolor sed elit" } ] }, "created": null, "edit": null, "success": false } ] }
{ "title": "response", "type": "object", "properties": { "imported": { "type": "array", "items": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Status flag denoting the success (true) or failure (false) of the template's import operation." }, "message": { "type": "string", "description": "Message containing either confirmation of the import operation or the reason for the failure of the import operation." }, "original": { "description": "The original template given in the import array.", "$ref": "templateImport" }, "created": { "description": "The imported template as it exists after being imported.", "oneOf": [ { "$ref": "template" }, { "type": "null" } ] }, "edit": { "description": "URI to the edit page for the imported template.", "type": [ "string", "null" ] } }, "required": [ "status", "message", "original", "created", "edit" ] } } } }