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": "8882cee5749ce5229ebdef7d", "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": "78a07785058e6db46CEd93cc", "createdBy": "3a1a1ffd70d53206bcec230b", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "00d710731482f5202aecbb24", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "dde34b797e323d04ed340607", "name": "sed anim deserunt nulla" }, { "_id": "a5c3d569dee263f30436e98f", "name": "proident eiusmod qui ipsum deserunt" } ] }, { "_id": "c6a3bc8b85abd8fb5205e96c", "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": "d3211c8BBfeeAe7c0810FccA", "createdBy": "b1968ae03072900e9f137f8f", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "1965fad4a64482b8cc44be34", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "5fe2c60028d98bcb7ea01165", "name": "cillum Lorem sint aute" }, { "_id": "9aa693ce1c8d15c1e81cef47", "name": "deserunt" }, { "_id": "5aecae212c268fffc7b09ef2", "name": "aliqua do" } ] }, { "_id": "9d7b6e65e5832fd590ca3175", "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": "3924361ef82795004d3b93cc", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "c2689e07e46efdc1723dbb82", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "7453518702b73e6542a7d866", "name": "eiusmod dolor sunt nulla" }, { "_id": "17e4b00fc3a26f66ccb12697", "name": "anim ipsum id enim Excepteur" }, { "_id": "6454957f09e1e8a0a29d685e", "name": "consectetur nisi velit pariatur" } ] }, { "_id": "0edf54fee075ddcb114e176d", "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": "B2DECAaba5Fa1E4DAC09d9e8", "createdBy": "34c9134524e8d55d567461f5", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "9bde13ec066dc3d877a7ea24", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "175b26c621283e44ba5d9950", "name": "esse officia Ut" }, { "_id": "73730e3576ad73f53e763ba7", "name": "sunt id irure aliqua adipisicing" }, { "_id": "360ccb591f82b49e2f7cae9b", "name": "veniam et nisi eiusmod" }, { "_id": "5add5e9fe8c4448f799c8c4f", "name": "id in non" }, { "_id": "1d954b80cc41572cdea867d0", "name": "Excepteur" } ] }, { "_id": "2093e6290404dd93b05f9f88", "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": "3Ec3D89F81528EbBCe8eFdB3", "createdBy": "3caa49a1f17fae8037172c75", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "4aed5f99b58ddf2a61e04c82", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "2715f64c33da69ddf190a4ef", "name": "ullamco ex incididunt adipisicing" }, { "_id": "a4f52af2af812da4dc823193", "name": "ut consectetur" }, { "_id": "ba74b299e7caf725d1b741b8", "name": "amet" }, { "_id": "70d43f66eccc56f9077e7e1f", "name": "dolor exercitation amet" } ] } ] }
{ "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": "dolor commodo dolore veniam occaecat", "original": { "_id": "85b631d0d2c4ed5dd8be3b7f", "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": "dDF22e9aCBbaF6Dac6fc7AFf", "createdBy": "22906db0bde8e57cb44ba3a5", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "807c1ee121e740e4a9749c35", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "cf5cd427b5984376215ac025", "name": "anim fugiat quis aliqua mollit" }, { "_id": "71ec792d6f61b75f0ccd2ad0", "name": "ex quis nisi officia" }, { "_id": "75c3641c5c5cc6f9292276e9", "name": "laborum" } ] }, "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": "0F6e1D83bdC5e55aeec1D775", "namespace": { "type": "project", "name": "tempor exercitation irure adipisicing", "accessControl": { "read": [ "quis culpa incididunt ipsum aute", "nisi" ], "write": [ "anim mollit labore", "minim pariatur tempor officia labore", "dolore pariatur Ut eu velit", "in" ], "execute": [ "velit enim", "Excepteur", "mollit nostrud sed Excepteur magna", "minim velit fugiat" ], "manage": [ "dolore aliquip enim dolor", "ex elit eiusmod sunt" ] } }, "createdBy": "BfDBA2de4F4CCbf7cEB0A6C7", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "09678000cE4A36A8AAf6b23B", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "aEc5D77070EC9e7b1eDe8A57", "name": "reprehenderit qui nisi cupidatat" } ] }, "edit": null, "success": false }, { "message": "cupidatat ex nostrud exercitation", "original": { "_id": "ef55d66c1096f48c6938465b", "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": "6EcCdD19D18eB4ABeE73a6f3", "createdBy": "5585de224a3cc028e52407ab", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "0e2cc6638ae4a3d288948cbb", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "2d78a15887a1f8791ef1010b", "name": "cillum eu" }, { "_id": "e452bb8e29abc63be104a583", "name": "amet mollit velit dolore" }, { "_id": "3456a0a024261ebe25108677", "name": "aliquip" }, { "_id": "c41b1ce9bc82362508ec0496", "name": "proident ut aliquip do 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": "aDEC2dEBdDfeAE3eeaF4Ff9C", "namespace": { "type": "project", "name": "ad exercitation dolore", "accessControl": { "read": [ "qui elit", "in", "nostrud aliquip", "proident deserunt dolore", "ea" ], "write": [ "in Ut", "occaecat tempor elit esse dolor", "Duis nulla", "do magna non occaecat in" ], "execute": [ "occaecat", "fugiat ut cillum officia sint", "ad occaecat deserunt ex" ], "manage": [ "ullamco do elit consectetur nostrud", "elit eiusmod qui", "exercitation dolor eiusmod ex nisi", "sunt", "fugiat" ] } }, "createdBy": "2a4ef54fa33fc3242aeee52e", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "b0e3aa71a38260c21538aff6", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "cA3ab3FE6Bb4d5d14925Cf02", "name": "occaecat proident sunt" }, { "_id": "bFE228de7222f0CDa8E8ee2d", "name": "veniam anim dolor" }, { "_id": "30EabAB53fACAA6979724Ee6", "name": "pariatur dolor cillum dolore laboris" }, { "_id": "0eaa05E4977156B6d5bafFfc", "name": "laborum Excepteur aliqua" } ] }, "edit": null, "success": true }, { "message": "nostrud ad dolor", "original": { "_id": "aa4394fb19f0411f747b9517", "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": "45FfcFB6D3524B19Add9dDc1", "createdBy": "315510e3ef07e347e36da48e", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "e6661b18f504740b3dc1e6fa", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "b359e8a0927d36a747b5f777", "name": "dolore sit adipisicing elit" }, { "_id": "8a5d02e716d4c527589f566c", "name": "fugiat" }, { "_id": "1f2537475cb7b46c7ecc8bef", "name": "Duis officia do dolore laboris" }, { "_id": "9023e14bddb7e114a65dca3e", "name": "cillum" } ] }, "created": null, "edit": "dolore", "success": false }, { "message": "nulla eiusmod sit consectetur Lorem", "original": { "_id": "3ff1cd3b1fbd42c0f1286ccb", "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": "63Af50e17C0299affFa0a23d", "createdBy": "9c5e0d9479127f3630fc10ec", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "4fc9d6cff588d01168599dac", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "b47b4a34cae12336ecde32c4", "name": "irure adipisicing" }, { "_id": "198562b35fc23471256adf4e", "name": "quis amet dolore" }, { "_id": "c85bf64a5cf8b5f7fc13ad26", "name": "consectetur" }, { "_id": "77e0932af408b3cf1ab40742", "name": "laboris in in non" } ] }, "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": "396DFCABB9ca3Ab1FBd45bE1", "namespace": { "type": "project", "name": "anim ut minim", "accessControl": { "read": [ "consequat ea anim ullamco", "nostrud laboris", "proident minim", "ad amet laboris" ], "write": [ "pariatur fugiat labore in", "id amet sit minim", "veniam" ], "execute": [ "occaecat", "nisi aliqua ipsum dolor consectetur" ], "manage": [ "dolor veniam velit voluptate irure", "aliquip laboris", "sed pariatur ullamco veniam", "exercitation sit qui nostrud id" ] } }, "createdBy": "Ce42a40ec472a0Ed83DC5d5F", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "AEf8d5FBbf4E953dE3bEBBE6", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "02EeA8ca5bbC2FCfF39c95b7", "name": "sunt elit enim" }, { "_id": "48653d04BcCe9BAdAB7b6aAD", "name": "quis" }, { "_id": "ABFafb4d2f3edEd16AaE057e", "name": "proident Ut quis est" } ] }, "edit": "ipsum", "success": false }, { "message": "enim qui Ut est", "original": { "_id": "54a0a884ef366b20578eea72", "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": "CCce7ee9e7ddcFEbf6AABd4e", "createdBy": "435aaea78cabe0ea5429b65e", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "25acbdb0403eeb8bf949ca99", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "6bbbc7adcd41e9bc5fa15f46", "name": "sit cillum ad nulla ipsum" }, { "_id": "802dbb95a9b0ab4e7ba4eff2", "name": "consectetur esse dolor quis" }, { "_id": "3badb33d88201637295019f6", "name": "nisi ad sunt laboris proident" }, { "_id": "d6454af05c2bdd15286c5928", "name": "in" }, { "_id": "ee0fb9b848f4f38d8157faba", "name": "ut nisi dolor sunt aute" } ] }, "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": "bBeA07F9A0010f63f909ebdE", "namespace": { "type": "project", "name": "proident", "accessControl": { "read": [ "pariatur cillum magna Ut tempor", "dolor cillum in aute" ], "write": [ "pariatur cupidatat" ], "execute": [ "et minim quis ex", "incididunt ut exercitation", "reprehenderit do ullamco" ], "manage": [ "eiusmod Ut id dolore", "deserunt", "consequat", "pariatur reprehenderit incididunt eiusmod" ] } }, "createdBy": "D2fC9c7F0ce21AaF89dF47aE", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "1189cD9e54d95E141fbebCbC", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "49CD3E76ecB75DB2EFb0b806", "name": "nisi pariatur elit ipsum" } ] }, "edit": "dolore irure consequat culpa aute", "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" ] } } } }