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": "47e4852a0755c8a8e5b86c83", "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": "DaeE991A7e0AE5DE1AEB4548", "createdBy": "16002ae64a1740f9fec1dfca", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "28f89c61a079a5094fbd328c", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "95c1be64ff07ffe5b3bf3fd1", "name": "dolor eiusmod ut sit id" }, { "_id": "617aad7ab4de5685377681d6", "name": "consequat est eu in" }, { "_id": "3e34c58453d324e0f5ebf79b", "name": "minim eu id" } ] }, { "_id": "251dd41e807ad7ed84c234e1", "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": "587f0cce118bbc4c24990c3d", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "0b72f70e0d6cac28618d6226", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "f1fea24d3a7baff1eb474700", "name": "voluptate Ut" }, { "_id": "4f624ad6553b84dbe7e18ac4", "name": "amet consectetur ullamco aute eu" } ] }, { "_id": "5440138ccb4126e59c9d0ffb", "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": "3147467cdae1f040fce21cbb", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "ad45b8edd4dfd06cc1130d44", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "e6660bf3871b8304e14e3f81", "name": "veniam in" }, { "_id": "c8b2643e94c0b5cea1de5597", "name": "non adipisicing" } ] }, { "_id": "57b535ca2f15085b1d162ad2", "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": "35a02cd9a53c7d08ef8b73c6", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "634ebee6bf71d83eff984685", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "4c7b7d3f566917196d95d0e1", "name": "amet labore laborum ullamco" }, { "_id": "e948c2bb099dd308140576c4", "name": "ex non" }, { "_id": "19e18fd3b0eb1a5dda86c429", "name": "consectetur Duis" }, { "_id": "10209e788fa8d90bad4251c5", "name": "id culpa Duis reprehenderit 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": "minim et", "original": { "_id": "486c5c0dabd9e14cc189cc78", "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": "EB084ec8FFFB2afBbfF0FA4e", "createdBy": "76c5772a00ee688796bde10e", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "c7b980d81b3163b823c0920a", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "0cae834f22204b19eb05b3be", "name": "dolor" }, { "_id": "2ae12d48299c045d5e64cb9c", "name": "consectetur labore Duis" } ] }, "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": "F72E036b47d8dC062fdFA6d1", "namespace": { "type": "project", "name": "quis magna", "accessControl": { "read": [ "laboris", "in dolore Lorem reprehenderit fugiat", "ea cupidatat", "enim consectetur" ], "write": [ "non veniam", "cupidatat qui", "adipisicing occaecat tempor ipsum" ], "execute": [ "anim ex", "officia sint", "ipsum", "magna anim", "ipsum" ], "manage": [ "adipisicing irure magna", "exercitation sit ullamco", "proident", "incididunt sit eu", "anim sed" ] } }, "createdBy": "6eF4AEB949D4ec8D6FF15eef", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "c22c83Ceb68dac789F5D73b1", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "2A8e6Ca511cb0b8FEffe62aA", "name": "enim dolor" }, { "_id": "9bcB5F0D67d5cfb9C00e1AA4", "name": "proident" } ] }, "edit": "eiusmod aliqua occaecat", "success": true }, { "message": "laborum esse ut", "original": { "_id": "b906d748b7da765fbebc4b57", "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": "FAE32CBebB69c2e622D5fE8e", "createdBy": "e8f6c497da15f0ca06bcce6b", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "68459c00e09927059b8b46fd", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "7e1176d360933aa0f266a113", "name": "commodo sunt ea" }, { "_id": "b11499b4cb6e30a48f97c285", "name": "nulla" }, { "_id": "8e0d7bd779f392835bc2abaf", "name": "qui deserunt ut pariatur" }, { "_id": "0463aaab62148d9949d58cce", "name": "ut magna in eiusmod pariatur" }, { "_id": "fa058d491e35dbf2a808eb0a", "name": "aliquip" } ] }, "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": "77ABa9fe558fD7Ce363cFF3f", "namespace": { "type": "project", "name": "qui", "accessControl": { "read": [ "Excepteur" ], "write": [ "sint pariatur", "sint", "dolore ea anim", "sint dolor sed laboris" ], "execute": [ "ea in", "tempor nulla id enim" ], "manage": [ "sed proident", "mollit", "id sed dolor", "cillum nulla" ] } }, "createdBy": "7B9D97D1bDC91FB61dF7fe7a", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "F4eee07cAEcd9DAe8abF28cf", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "19Dda427aFfEDC8B7196Bb92", "name": "labore consequat sed" }, { "_id": "A0DcecA4D316Da3C39565BEE", "name": "velit ea" }, { "_id": "ED7Ea6cA8aeDb3aFB64bB9Fe", "name": "dolor" }, { "_id": "2567aa81D7528d9b5E3f2fA3", "name": "commodo amet dolore elit" } ] }, "edit": null, "success": true }, { "message": "occaecat culpa enim Ut", "original": { "_id": "7a7988f1ee03966359c2dd3d", "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": "e9b731f8ab865fd7017575f5", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "5cd0a9a1a7ffc5e652334fdf", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "17bbb971a977fe69ba87b132", "name": "veniam nostrud" }, { "_id": "3d179d51d8cc25b0013b4ecb", "name": "dolore" }, { "_id": "e99464cab1c5baa1da2ea2dc", "name": "amet" }, { "_id": "f039068342081edc61cb476a", "name": "dolor labore minim aute" }, { "_id": "31f0aef0c5b64c280db62ac8", "name": "deserunt proident aute ex" } ] }, "created": null, "edit": null, "success": true }, { "message": "elit et irure", "original": { "_id": "ab009ccc98688086a03361ee", "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": "a4e742882992c4adff178047", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "f59bd76630e92eaeda364263", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "ba80ebc5ad1eedd864dd1041", "name": "Excepteur" } ] }, "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": "42a2cF07FBc59dbca83eD2C7", "namespace": { "type": "project", "name": "aute sit fugiat reprehenderit", "accessControl": { "read": [ "dolore est" ], "write": [ "et cillum nulla" ], "execute": [ "ea tempor incididunt est", "velit Ut culpa laborum", "ipsum" ], "manage": [ "dolor", "dolor culpa quis voluptate nulla", "nulla ullamco velit incididunt ut" ] } }, "createdBy": "BaBfe97eaaA0A90dFdefaF1B", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "8e698dEAC73AcBaCdB6Aada2", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "5f784fd7d6A51724c41F6E83", "name": "consectetur" } ] }, "edit": "magna", "success": true }, { "message": "elit dolore", "original": { "_id": "391dbac3c9e14f8c3c351217", "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": "0eDCc2914C2fC9CcbFe0FB56", "createdBy": "e1955623b1fb04afea19d79b", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "f43768832b2318f867c5a51d", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "fa91a43871873fe7088664d9", "name": "eu in" }, { "_id": "161928a20235eff19596a18c", "name": "minim sint" } ] }, "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": "dAe01be2fAcf836CE68d4e97", "namespace": { "type": "project", "name": "do dolore Duis culpa esse", "accessControl": { "read": [ "consectetur nisi dolore ipsum", "dolor laborum qui", "enim nulla ea cillum", "enim" ], "write": [ "sed", "sit", "ut veniam exercitation" ], "execute": [ "dolore aliquip occaecat consectetur", "commodo", "et consectetur id nulla anim", "id eu velit tempor" ], "manage": [ "fugiat qui elit officia ea" ] } }, "createdBy": "af18d10E5129B9E98Ddb20D3", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "1bfcb9eddAdAC1bDeac4cE8C", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "6217DF4A6F25bBaBD5c15FD0", "name": "ex sint sed dolore esse" }, { "_id": "3A0CC4bC7cC95ABD82fCBD23", "name": "mollit amet quis commodo labore" }, { "_id": "1Af6aFBAD362Ea9f8C8ef3Df", "name": "laboris nisi ullamco culpa" }, { "_id": "3Df13910DE0ffcfa6fb98F39", "name": "voluptate amet eiusmod" } ] }, "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.", "oneOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "status", "message", "original", "created", "edit" ] } } } }