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": "311fe3923f4b7da5c79f8ba6", "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": "1e14a7a4b403b8e67a5e89c8", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "fbb33a4796289b9225727768", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "7d0921bee63f0b9e1381d25e", "name": "Duis" }, { "_id": "d1793a0d14043c053332c852", "name": "Lorem est in eiusmod aute" } ] }, { "_id": "9ceb72ccd7c14daa5e9926f4", "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": "bd6bbca65737ba77f5d1a96e", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "7e1a1b39d9ec73ea024cfe28", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "29560fecd92e453127859674", "name": "Excepteur sed deserunt in" }, { "_id": "e50fdd169b043b880dd7fae0", "name": "dolore reprehenderit sed consectetur aliquip" } ] }, { "_id": "826655558d3cb1ed3d86a59e", "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": "dbb4bd176c7db715d9303404", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "00d9320bd4c7f3c5882f397a", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "607a712eb22bac393897f30b", "name": "deserunt amet reprehenderit occaecat aute" } ] }, { "_id": "d99a7fd0fd98f7a94c29675c", "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": "c3ba3588d1fe82f45cf98641", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "8086a8b9b510a286e9a4bbf7", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "cd3a7953db6f710c45048e5a", "name": "ea id eu ad exercitation" } ] }, { "_id": "437b461a7f87b04f69d24c25", "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": "d64d07350a63b97d16e62a99", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "ceb20d3313be4ffb637b5c73", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "e576e9c82b030ce054b8bf7f", "name": "consectetur in velit" }, { "_id": "8e850f39c7866e916a4ba660", "name": "esse pariatur ad" }, { "_id": "3fa207b2301f36604ac442d2", "name": "ipsum nulla" } ] } ] }
{ "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": "enim deserunt dolor eu", "original": { "_id": "9f5ea98e1bf80f68c5282b30", "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": "cfa6598d06d872adcf5e732d", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "2fafabfa0fca828d04a535aa", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "03c516c17c77ddeff7bdd17c", "name": "aliqua laborum adipisicing id" }, { "_id": "639cf8e7bdc0326ad41d1c1c", "name": "nisi" }, { "_id": "6fda43cca5ad928e020aedf5", "name": "dolore aliqua" }, { "_id": "95d0970ecfad3fb97a38a9d2", "name": "ea velit" } ] }, "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": "1Bf536cD9cfB71bC4d5FdDcA", "createdBy": "18Aca3bf3ccbe6a33e6490D6", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "1a5A35beCCff9A05B6a98005", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "3Bbbc1fEAbc460F9a8ea3915", "name": "aliquip cillum ullamco eiusmod", "description": "A user-defined object to help group documents." }, { "_id": "7a7c1514eD5f5405848112C1", "name": "in exercitation minim do qui", "description": "A user-defined object to help group documents." }, { "_id": "a8B30a7fE6799ffA5beCAec6", "name": "aliqua exercitation consequat adipisicing", "description": "A user-defined object to help group documents." } ] }, "edit": null, "success": true }, { "message": "dolor proident deserunt", "original": { "_id": "b108eff941cc7211e59b2411", "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": "2316cd16e00740d0b8f16318", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "33149f99fd39336a3c6af4d3", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "6f2d6be52633c081b4032fc3", "name": "est ipsum" }, { "_id": "a6a8dab2444bd7f4b5bd646a", "name": "do commodo" }, { "_id": "484cbd78e33a45172499969c", "name": "dolore pariatur" }, { "_id": "a71e180a64c4d8b824d1e553", "name": "consequat labore nisi ullamco" } ] }, "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": "FC5Cc4Ad5dE92cF0fD4E9560", "createdBy": "54B69D8E59fEE00F8Ed6D649", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "3B1dC9CCE65679E513DB9def", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "Aa394DFdFCce5eECa6abDC0a", "name": "in ea voluptate", "description": "A user-defined object to help group documents." } ] }, "edit": null, "success": false }, { "message": "exercitation occaecat aliquip", "original": { "_id": "99761310199389432a678c03", "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": "a1528f3c4e117d8258170a27", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "850ca61d5ef8feaea9f763d2", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "6b891a9a2fa0dffde0490a88", "name": "consequat nulla" }, { "_id": "89b82c36bd2135306984224d", "name": "ipsum" }, { "_id": "3c81b2412ded89feeac09b5a", "name": "id occaecat labore in" }, { "_id": "01a18d07a15278e2a45032e5", "name": "Lorem irure fugiat laborum dolore" }, { "_id": "932891e74fef1ed897dd66d2", "name": "anim ut non minim ipsum" } ] }, "created": null, "edit": "in deserunt Excepteur labore", "success": true }, { "message": "adipisicing sint consectetur", "original": { "_id": "441c80f5fc534731af4331af", "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": "04c97c8ea83725f59943cfd9", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "788fd0e7cf61069fb9a4d87a", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "c2e2047abd7995a90c25e6df", "name": "elit sit" }, { "_id": "3db32836f0c8ec27441b0511", "name": "proident aliqua" } ] }, "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": "Ea4a5DFcBB0023FbCdfA4f3D", "createdBy": "52a06Ebc0B44CffDb6baa4f6", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "ee9ef6f1454aA4CF4492E8de", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "16309EACaa7d5ad2dbF6fbbF", "name": "minim in eiusmod irure", "description": "A user-defined object to help group documents." } ] }, "edit": null, "success": true }, { "message": "Lorem", "original": { "_id": "510303b7a9bd92277a107079", "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": "257423f4a14aedd9fb9cb18b", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "11283e5684d8f4d4f3e40e20", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "03438afada462f95a3c67892", "name": "occaecat ullamco ut" }, { "_id": "04045791b7c293590b5d9ba4", "name": "ut aliquip quis" }, { "_id": "5c680d7702034eb955969517", "name": "aliquip in culpa quis cupidatat" }, { "_id": "206447e0adb14561028d53a2", "name": "sint in magna" }, { "_id": "63b168b12db66f2528699ae5", "name": "dolore" } ] }, "created": null, "edit": "aute", "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" ] } } } }