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": "1cbc11f54e896a373a41e216", "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": "45fc2f428ba2d77b2683f8a7", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "0a650d1d6e6499d386d00998", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "a6fe18069c8d6a14447debbb", "name": "in" } ] }, { "_id": "4cc3b9fd1eb2b2d0c60c3cdb", "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": "29141519c5a0c2aee2e21146", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "3f88fa8ebfb26157a541a4b1", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "424d477a65f39e0b31725e04", "name": "ex" } ] }, { "_id": "bcc1ab4e74d760c25ef673bb", "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": "721366c4d142e32047b95654", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "6ba10b8fb7e108e7f8f08c9d", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "f6ebd6286105ac62bd1b2c54", "name": "laborum" }, { "_id": "42465e253db32ad8fbaff15e", "name": "ipsum aliquip quis" }, { "_id": "81dc5da69b901710b26753fc", "name": "minim ut aute fugiat" }, { "_id": "7522aaa08e47a412cf574d73", "name": "sit Excepteur minim incididunt" } ] }, { "_id": "0d260c2263975657381398f3", "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": "1a0c8a1ef554f7ecd6027bbf", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "e4292b836cf7786e0550e4e0", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "bc03494dfca2394f84e1efaf", "name": "ipsum" }, { "_id": "58d317885cc70ef8a84c32b6", "name": "dolore proident" }, { "_id": "90cc234f72c51cb254f52321", "name": "esse ut" }, { "_id": "e9bbbd89d67e42ea8ea196cf", "name": "ullamco tempor proident cillum Ut" }, { "_id": "468617582ddd4d7a9119bfaa", "name": "tempor" } ] } ] }
{ "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": "nisi", "original": { "_id": "79d6cb88444dd88662b019e0", "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": "cdf6d7a8af16d48893af7be2", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "4b0eb6d7505993b602e3ebbf", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "4d5aafd08d1eac84a42f7b1e", "name": "non" }, { "_id": "3508003623ccf623def3387b", "name": "amet ullamco ut" }, { "_id": "62fd810f36910550db26b850", "name": "non minim" }, { "_id": "997517543e73cabd3ff2b767", "name": "consequat dolor minim" }, { "_id": "8139069cbc691d2488cd6e76", "name": "culpa minim" } ] }, "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": "10ad3305ceaDefbe1BE265a9", "createdBy": "D534610C5dC8FF2Dd0DbBcB2", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "E47E3ADEadaE5b1d0bc9AF47", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "2CCEC4aEB1dDefc48995BE36", "name": "in ad esse anim adipisicing", "description": "A user-defined object to help group documents." }, { "_id": "6A30d9aB14DfF1d4D1Bb3fa1", "name": "irure ad minim Lorem Excepteur", "description": "A user-defined object to help group documents." }, { "_id": "aaDce25c33FE052dc2bAb6Ac", "name": "occaecat consequat ad irure dolor", "description": "A user-defined object to help group documents." } ] }, "edit": null, "success": true }, { "message": "veniam Duis cupidatat aliquip", "original": { "_id": "2de37caaa70a35cda683dc82", "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": "fe2311b507590508930812e8", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "e4c0bea7b6c524af6d4e3185", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "f545da95c9903aa5eed88f85", "name": "dolor" }, { "_id": "07a66c5f8879a1001a1bbfcc", "name": "ut" }, { "_id": "405b8087e11add7c55a0bfb0", "name": "dolor et labore 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": "cc853dAd1ed7CDB88bcBC2B3", "createdBy": "FfadA98Fe513eA3f0b8aab9F", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "d9c946146B93b5F8fEF7F869", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "27f26F1336bc7f16Be5FFF3E", "name": "esse reprehenderit", "description": "A user-defined object to help group documents." } ] }, "edit": "sit", "success": false }, { "message": "anim pariatur", "original": { "_id": "481ce9b5b0bedaebe7c23f4e", "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": "c8fd11788aa4f8ab98bda660", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "2d32fcd8618aed17295c2e82", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "04f2a041fe7b86d121c2e6df", "name": "esse dolore 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": "f16ECad10667fEDcB8C35a2f", "createdBy": "Ae3E1F51F9BFca8BdEdBC65d", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "cF0EFded3F38a0315EFFBDF3", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "aeBf5ba7Fb0EFeED7bfaACE7", "name": "consectetur", "description": "A user-defined object to help group documents." }, { "_id": "9B4CDa9809CFe4FE3ebe5Ef8", "name": "mollit", "description": "A user-defined object to help group documents." }, { "_id": "b4F956cEBCfe826CFB4efeeF", "name": "commodo Excepteur sint", "description": "A user-defined object to help group documents." }, { "_id": "faa3398Dc0cc04A2360b74be", "name": "Ut tempor aliqua non Duis", "description": "A user-defined object to help group documents." } ] }, "edit": null, "success": false }, { "message": "amet adipisicing sit", "original": { "_id": "b31e43f5af252c2ff453e0ea", "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": "8eae56e9c5d798aad8556fbb", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "af20da26bbc722941ca26bfb", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "9f706776e3837021b15ed6c7", "name": "culpa adipisicing" }, { "_id": "6c997eb24b10b0050e33f6ed", "name": "sed" }, { "_id": "501c9a9cb1030b73cb3865f2", "name": "Excepteur" }, { "_id": "1ab225a8e1849aa12befcacc", "name": "aliquip officia mollit" } ] }, "created": null, "edit": "commodo culpa in", "success": false }, { "message": "cillum dolore pariatur commodo", "original": { "_id": "9611644ff67e00f263007a86", "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": "3c46767148c0a332e655e2c3", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "1207a31ad83380ab2ba43125", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "afb87a21fe801dbc93359b18", "name": "amet Ut adipisicing" }, { "_id": "b372052090abbc8aa419d127", "name": "aliqua id aute" }, { "_id": "6d8a87e27606401a576cbf33", "name": "et officia qui enim minim" }, { "_id": "321e95d4615740c87a19a501", "name": "in id" } ] }, "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": "072FC9D8fA44CBa10E35cfC7", "createdBy": "6c72B54dbAA5DD35CDC4d2A2", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "DA1a9Fb121a7b5c8AeeAbFdE", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "EfE70ECd8fe5b3f1aD21cAD1", "name": "dolor incididunt cillum dolor minim", "description": "A user-defined object to help group documents." }, { "_id": "1a0A4a0FD0D948e67deb64c6", "name": "qui ut fugiat reprehenderit Duis", "description": "A user-defined object to help group documents." }, { "_id": "eAaAaadc593bEF8889a2BaA4", "name": "et minim pariatur", "description": "A user-defined object to help group documents." }, { "_id": "5C6E7E8a8f6A9D8e16D144c4", "name": "dolore sunt", "description": "A user-defined object to help group documents." } ] }, "edit": "ipsum in ut", "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" ] } } } }