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": "2b550f1de865672b428d2690", "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": "935a842831c79c4bdf4fabcc", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "6af8ce70afee9cdf2c75a42e", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "1955b8ef5aac2c74abdef138", "name": "irure" }, { "_id": "c1618b7f3d9f45e5e7fc565f", "name": "minim sit pariatur dolor" } ] }, { "_id": "79633aff3b33043a2d7022e5", "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": "95239115279e1ff15aeb7c34", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "71f8b9a5270aff5c150f9f97", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "e0f599c99b90020b0919be34", "name": "magna velit reprehenderit ullamco et" }, { "_id": "e9d541eef5e401a60a4bfdfd", "name": "aute quis id culpa" } ] }, { "_id": "160f226139f18593fdc95e0a", "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": "7dc66c5c17c9befbe3924f69", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "1d532c3548fac90b4f769128", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "5c46c10b316c8e65e579e588", "name": "ipsum officia nulla" } ] }, { "_id": "a38a6b50780138475fa230b2", "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": "10950d8936e2adc4cea79a8c", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "1919c588509104fc36e2f50c", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "75efcf4557a90cd2be9ab234", "name": "incididunt laborum occaecat" } ] }, { "_id": "50e71072d26f6df8bab343e2", "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": "24d6198b0fe8cd7f86c3bcd4", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "831a807183abe05cf7219d3f", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "9cbdebac9a88f6e62b11f850", "name": "ipsum" } ] } ] }
{ "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": "nulla", "original": { "_id": "4e9eb3e8c454f76c8c0bd38a", "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": "a083f444f1926c8ce91dcaac", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "0cc9a0f72328d646729270ae", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "0e8a2212d3bda9d3592aca03", "name": "reprehenderit labore pariatur" }, { "_id": "b9e1d456195b5243cf11fe1c", "name": "amet proident dolor magna" }, { "_id": "d23a0ed8dd7450d67fcee547", "name": "eu" }, { "_id": "06aee4c421f2fcd3ec7dc17b", "name": "consectetur quis laborum adipisicing" } ] }, "created": null, "edit": null, "success": true }, { "message": "elit in laboris nisi sint", "original": { "_id": "5dd2f75174cde110b8038981", "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": "277510a163254232ea741504", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "0c0e82284d570c14f1fd5297", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "5859fa6c240a2bb9c9ced4a9", "name": "ut quis ullamco anim magna" }, { "_id": "cd729b6a94e8a8009490cc25", "name": "nisi et quis reprehenderit Excepteur" }, { "_id": "2c13270882abe4233ef8ea5c", "name": "aliquip aliqua irure 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": "58275EaeeAAfBAeBFDAD79Ae", "createdBy": "BCDbEd0f0aCB98f52e2DEF5d", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "3DD8d0D99DAcABa667e9AF3A", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "abaA8893Cf1B64b3f76CCceC", "name": "ad laboris dolore minim" }, { "_id": "64dbC24B69D31eDaB6dBbAd6", "name": "eiusmod qui in cillum" }, { "_id": "923B1cAea926B4BE9c2Fe8b1", "name": "sit culpa esse minim sint" }, { "_id": "0a572FF70Be264ae09DB3bAc", "name": "enim sit Excepteur" } ] }, "edit": "in est Duis ad ut", "success": false }, { "message": "reprehenderit est sint sunt culpa", "original": { "_id": "c25abd01fa12cf36e400a7b8", "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": "483b684a4dea0a0dc83b1055", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "1b950fb23592101b30bb6b7a", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "92b61546e00501f266f31244", "name": "ea ut anim in" } ] }, "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": "61Deb42D5ef3cFD5afb6Aeff", "createdBy": "fDa8EFdAa9178C95dcd4EEF1", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "F23a0aEc57C70Ee14abcE47C", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "b8CBb8B2b7D7bcC0e0fd2cFc", "name": "sunt est quis exercitation" } ] }, "edit": "dolor", "success": true }, { "message": "nulla", "original": { "_id": "d482a1e466202ed59436d88f", "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": "a5893093624703bf48b232df", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "71229f0188e90f528298944d", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "56742ca61b4b1aaf9ae50fd2", "name": "Lorem culpa labore" }, { "_id": "3d17ba7af562eaf10d4f924f", "name": "nostrud sint magna eiusmod labore" }, { "_id": "1ce5b2b1ed7551989908ac9a", "name": "Lorem" }, { "_id": "b4de32bbca3583338e27d19a", "name": "fugiat est amet Lorem eu" } ] }, "created": null, "edit": "qui et Ut reprehenderit", "success": true } ] }
{ "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.", "oneOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "status", "message", "original", "created", "edit" ] } } } }