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": "f749d03552ad0e4b2726dac1", "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", "projectId": null, "createdBy": "e97317a09efda14a1f527417", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "63d4ed1f0a78ec14be9031b6", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "845b81cb89f1e8624057f15a", "name": "voluptate consequat ea nisi anim" }, { "_id": "1dc78ac9da028494117d5195", "name": "reprehenderit dolore magna" } ] }, { "_id": "1059b10b9444416354c87c73", "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", "projectId": null, "createdBy": "9332ce3f80619cdf6f404c8c", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "60d67af075472370744922ed", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "bc07fafd6edeb3a8e6e43c4a", "name": "laboris incididunt occaecat minim ad" }, { "_id": "25884574ec909e9986e40e58", "name": "nostrud incididunt" } ] }, { "_id": "4f072a37872754c1e28eda6a", "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", "projectId": "7a56b83130C6aBa327Ce96Af", "createdBy": "f0cb1e62f8e2ad10ed2507e7", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "595f333894406b70654164d4", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "527df1a36754ad6b6dd94e9d", "name": "do" }, { "_id": "39c527c8c3f2898752fa279f", "name": "pariatur ea ad adipisicing" }, { "_id": "63da836e775525c0add8039e", "name": "in officia ipsum commodo pariatur" }, { "_id": "0c84c3e9204fb4fa5a6c3eb5", "name": "minim" } ] }, { "_id": "666ab9bf164860c0e23069c8", "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", "projectId": "3fFA81b0dc0F1d82A5cfAcf0", "createdBy": "c5cb6ab4e9cb8c60bd385d33", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "4cf2d7cea96b5dc2b78d7cd0", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "f17006c269e8ff24b2d32198", "name": "et irure" }, { "_id": "46f6fa37d64276d85dfe72d0", "name": "aliquip cupidatat ut magna irure" } ] }, { "_id": "6e568855bc8c0760fa75ca79", "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", "projectId": null, "createdBy": "63bd6692c06d2e3d8dbd83b1", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "d9ed13ec102a74fa2d25b855", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "33bd3cdc63b3b036c48175ae", "name": "Duis qui sunt consectetur id" } ] } ] }
{ "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": "ipsum", "original": { "_id": "afb65a0b6de21d41b3999976", "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", "projectId": null, "createdBy": "bb2b23ce4843a5d6cacc2019", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "300d0c0ce3ffacf2b6b54fbf", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "29e62bb49e497c4a3cbeea68", "name": "deserunt commodo ea minim et" }, { "_id": "425ad74485b4c32f253ba026", "name": "aliqua tempor quis" } ] }, "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": "11a69Bdb11497ca70A6acB43", "namespace": { "type": "project", "name": "nostrud nisi", "accessControl": { "read": [ "ad", "laboris in sit proident", "ea nisi ullamco tempor exercitation" ], "write": [ "ut", "aute ad nisi amet laboris", "ex", "nulla fugiat amet officia cupidatat" ], "execute": [ "veniam", "proident aliquip labore velit ut", "commodo adipisicing sed", "ea proident sint", "est" ], "manage": [ "cupidatat" ] } }, "createdBy": "a86ee770FA1fa0e39CAC871f", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "FCDb0Dce967efEC4C7AC3C95", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "2c78cBeBFF9b71287Bfbd8D6", "name": "anim" }, { "_id": "f7BD8e2CDcD06F821B8A96Cf", "name": "voluptate fugiat" }, { "_id": "B5FbaE3b30E2D9a33dDAee5c", "name": "in" } ] }, "edit": null, "success": true }, { "message": "aute mollit nostrud cillum Duis", "original": { "_id": "34450a53bf563e9ffd46d176", "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", "projectId": null, "createdBy": "8c3f9699be71dcc24e9a49b4", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "01f82dd83b882c86c9a5cf09", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "497a91183c6312b44b524b40", "name": "incididunt ut tempor dolore" }, { "_id": "5f2d05f38f8b4acb2b96b5fd", "name": "adipisicing veniam labore cupidatat" }, { "_id": "44839c284e957ab36aa038be", "name": "eiusmod" }, { "_id": "a291cf69e75ce830d8b71090", "name": "pariatur incididunt ullamco" }, { "_id": "03fa3658f572130bbf0d274b", "name": "ipsum officia sit consectetur" } ] }, "created": null, "edit": null, "success": false }, { "message": "Duis irure dolor laboris aute", "original": { "_id": "49eecedaf986b551c97c688f", "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", "projectId": "EAba2BC8B812B99803d3C2AC", "createdBy": "d9768d5996094a0de5a009d2", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "81f3899f4d6fa45471f41d5c", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "90e70546e4132cfe8b9ae47d", "name": "nulla cillum culpa ex proident" }, { "_id": "6c48251c6cf6981ab12ab75f", "name": "dolore qui dolore deserunt" }, { "_id": "487cd09bc009ae52bd4a2a1a", "name": "pariatur ullamco non Lorem" }, { "_id": "fa08408586bf56a716fd4d23", "name": "incididunt" } ] }, "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": "dbBECBa89322BB371b8DEaB0", "namespace": { "type": "project", "name": "pariatur mollit", "accessControl": { "read": [ "qui" ], "write": [ "ut qui sint", "fugiat ullamco quis dolor sed", "ullamco ad", "non" ], "execute": [ "voluptate mollit aute", "ut culpa velit in", "deserunt adipisicing commodo magna", "quis ad" ], "manage": [ "cupidatat in Lorem", "esse", "quis sed ut incididunt", "sunt eu incididunt", "est" ] } }, "createdBy": "7C22dAc5c18b28b2495cC2Bb", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "B6094F76e59FcD88BeCE5EfD", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "E1Ed950B77ddc2ACeeCf89be", "name": "sed sit" }, { "_id": "8f35DEb6D7e369B9c727eACE", "name": "id" } ] }, "edit": "veniam occaecat sint dolor", "success": true }, { "message": "incididunt", "original": { "_id": "77c8f59a5f839e92e3f7f4b0", "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", "projectId": null, "createdBy": "0329d6bffdd7bfa146344c57", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "94c25d4f97c3e32a074bc36d", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "dcc04c2c83cf154b694b78a7", "name": "Duis" }, { "_id": "0120242299acaf53a134226e", "name": "et laboris" }, { "_id": "865004b5d6b7080c96d3e262", "name": "ut ullamco" }, { "_id": "f55c1d7e8255859bb885eeb0", "name": "in esse aliquip quis" }, { "_id": "4e33e1e8c48efebde4ef6e84", "name": "nostrud" } ] }, "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": "F9A8d6CA1abd8CF61DBBa8dF", "namespace": { "type": "project", "name": "in voluptate", "accessControl": { "read": [ "occaecat proident quis amet", "anim laborum enim proident", "veniam aliqua ex consectetur", "in" ], "write": [ "labore ad do dolore", "quis" ], "execute": [ "non elit in culpa eu", "in aliqua dolore", "amet" ], "manage": [ "ea in do", "eu", "in sed occaecat non nostrud", "ut" ] } }, "createdBy": "248Ba4f4DEdcC92c8D7D112c", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "AA4dA75ABbc27e37FD0dD6ee", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "F83DF130fcB8aafe0Cbdc12C", "name": "dolore" }, { "_id": "EEcC235f5fA88b0Cc8e7FfcD", "name": "ullamco amet tempor laboris" }, { "_id": "BcD7FFAe028DCF60af03b6bB", "name": "cupidatat veniam in adipisicing" }, { "_id": "f57B5C2c73eB5a3f86fDBCEC", "name": "dolor incididunt magna proident eiusmod" }, { "_id": "C7f5eB41aea10465DFF3bf06", "name": "consequat laborum dolore" } ] }, "edit": "minim irure", "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.", "oneOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "status", "message", "original", "created", "edit" ] } } } }