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": "b0b16159b0e6f9ddeb48d597", "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": "98bbdb7bbceb7d67f4498686", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "af85baf2ded510e173f5f342", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "9cc1f45937d5508bf412e380", "name": "elit ipsum" }, { "_id": "e4798722cf141cac354f04c0", "name": "quis" }, { "_id": "8f1f710448207eb87e6ac4e1", "name": "sed" }, { "_id": "3c6b8c6c0f52b7c859ef71d7", "name": "ad ut qui cillum" }, { "_id": "be1648e455903bd870977054", "name": "culpa consectetur officia esse cupidatat" } ] }, { "_id": "84f108ab398bdffe1c9257cc", "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": "7de042f600c9674cab7abf0c", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "088cbda8f544de738fdb47c6", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "6537f69ca8edf9572d651967", "name": "Lorem in ipsum velit" }, { "_id": "d9f3f6b79cb19fc49a1926a3", "name": "laborum Lorem" }, { "_id": "0e7ea260e8e859bd06728ada", "name": "velit" }, { "_id": "aedd2af5cf4090e43debfabf", "name": "reprehenderit consectetur" } ] }, { "_id": "961dfb7a5caa01561217890b", "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": "c45f7443e4d648339e621f1b", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "a0df17ee9584d55e360f2a07", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "00f617ed27b279293de5a160", "name": "non incididunt eu Excepteur Lorem" }, { "_id": "70ac78196e5e89db1030f196", "name": "sed in ipsum magna" } ] }, { "_id": "ee7eedb61b41b3978b75889c", "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": "e3200d9ed8ef431cc2d0b6f8", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "9d1f63f7ce4873eb93c1f31d", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "5f7c34a65985d60b7694d445", "name": "deserunt nostrud ut sunt" }, { "_id": "aeb2b0cbaf007c5b4e44d312", "name": "magna est tempor sit dolor" }, { "_id": "4498cba9a16b7875a5efaa96", "name": "fugiat" }, { "_id": "a3a9ee25ed869f82936286d3", "name": "et deserunt pariatur eiusmod esse" } ] }, { "_id": "35c4cc891ce83a64955e4dd9", "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": "71aaed4aa3fb1dd2d698a3e0", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "b6f150c56fef290b60e43dde", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "c22a2d3bb4e2b1e68af5e5c4", "name": "Lorem laboris aliquip sunt ea" }, { "_id": "4fd9ceaa5ba785f7338bce78", "name": "minim labore" }, { "_id": "8aaa1d981b472a6c053325c7", "name": "in Excepteur pariatur non mollit" } ] } ] }
{ "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": "culpa eu amet est", "original": { "_id": "aaafa0cda0b6edd5eb5598a5", "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": "d0a839cc314fc29085a82c24", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "18aef7433aa767e0197603a3", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "8f66e48f8e5f14f68c04c542", "name": "nisi nulla" }, { "_id": "c7eb857a7a59e1dd38aeb005", "name": "culpa ea" }, { "_id": "bd51c752d78bac1c4931c60c", "name": "eu" } ] }, "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": "e49aA9E8cB770292d81e64CD", "createdBy": "E9E3A2dCa9C6fccBd58fcDfD", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "DA7bfc5D42327f2fb680c00B", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "14Be4ef3491cadba4e1F80e5", "name": "exercitation tempor aliqua pariatur" } ] }, "edit": "nostrud adipisicing velit", "success": true }, { "message": "in nostrud sunt exercitation dolore", "original": { "_id": "67f5f819da364bbf5ed012be", "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": "d14c45520181ad030becefb5", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "0b3be6c54305906b4ac28a22", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "d38571f7689830f4eee6887e", "name": "eu cupidatat deserunt anim" }, { "_id": "43feaa486a9b50ced90ba248", "name": "minim veniam commodo in" }, { "_id": "9ca7a5c3ab62c891f3c981aa", "name": "cupidatat deserunt" } ] }, "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": "FA9DB073fCfb6E9CCFCBA8de", "createdBy": "50D5aDdc7b4A4FFA1d3c3B5D", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "9b4BfbAb488d45acAbDfc51e", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "F96FAaa6436C717cBb338fF9", "name": "cillum sed proident sunt consectetur" }, { "_id": "2fbbAAf58C9BBfeeEa7d0D2F", "name": "cillum deserunt et sint esse" }, { "_id": "95deaCc3a3fEe65a143a57E9", "name": "pariatur" }, { "_id": "F3d7EB321E70C467Cf6AeDEe", "name": "quis nisi occaecat ipsum" } ] }, "edit": "ex", "success": false }, { "message": "in anim dolor velit nisi", "original": { "_id": "0c1d3a005b759969a1a430c4", "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": "9f02e101e2cbfa88412c42ea", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "06a18c53d4b10f5d070b5734", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "d344c0d2ecea18be53fe051d", "name": "elit consectetur" }, { "_id": "cb64bed68a9a2f776f23d9fe", "name": "enim consequat" } ] }, "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": "fFFeD8baC0bBfdfdAD4c305E", "createdBy": "8C20AEaB98B4EC8D1A726eB6", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "Aa53125CD4A2c8ee36ACEf6f", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "CBda8cbDbB4AFD3f075BE95b", "name": "consectetur officia" }, { "_id": "4Cb401c9F767951186EfdEc8", "name": "aute deserunt ipsum est" }, { "_id": "7d6FDeeE2AAf1a78226618cB", "name": "elit sint" }, { "_id": "Dae8b02Eeb471C80Bf78b5Db", "name": "elit nisi incididunt nostrud ea" } ] }, "edit": null, "success": false }, { "message": "deserunt ea minim Duis", "original": { "_id": "1e568ace5bdef36267e9f4af", "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": "009eeed18850b335b7fcfc3b", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "ea2a1ed377b24a4bf1ddb31e", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "216f39ba8e4c13799e830d11", "name": "cillum" }, { "_id": "c9b62e5077d0d710d4281ac6", "name": "cillum labore ad quis id" }, { "_id": "a89197b5301cb7e4feac2e97", "name": "reprehenderit ut id laborum culpa" }, { "_id": "e32fc45deb920bf244740e7a", "name": "ex enim proident" } ] }, "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": "5d036F41fAaccEfE4abe0b15", "createdBy": "d2054FdD5BBAD1cC3Ba47c6E", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "1408Ee3D1D35b13e8B46eefb", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "04A8B7A1212Ddeb30ab44c5e", "name": "id labore eu culpa consectetur" }, { "_id": "725F36d2A809fd8cf05Dc027", "name": "nisi" }, { "_id": "946EFCfb966ae6edb9fdfd5A", "name": "aliqua in" } ] }, "edit": null, "success": true }, { "message": "Duis dolor", "original": { "_id": "5d111b6f86f320bb0ddc9856", "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": "713dfa2a9fe91ac384a24fdc", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "380523ac3c6c2ca55b805282", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "e3b71cfc618eba17bc66a688", "name": "laboris eu tempor" }, { "_id": "ec191e1c87e0fe8c69328d2f", "name": "tempor irure" }, { "_id": "c46e9bf843636a4b5d8fa957", "name": "esse fugiat" } ] }, "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": "9c70a7F6543Df65AbFedF42A", "createdBy": "033261bbeECac7f14Fb9bFB9", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "3F57cc1Ed9E7eaB2F7e6A7E0", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "DfE5E9f94fA70adD174d9d7d", "name": "dolore" }, { "_id": "6Af1FA3b4f01Cd1b6F4d3AfE", "name": "qui pariatur dolor aliquip" }, { "_id": "34C93a5cDBafcAbBd35dD3A6", "name": "nisi eiusmod commodo adipisicing" }, { "_id": "3d4C7fE57dc15BbAa573bB17", "name": "officia do" }, { "_id": "d2aFD42E4Af1E10353C5A65A", "name": "incididunt adipisicing sit id dolor" } ] }, "edit": "officia commodo est culpa", "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" ] } } } }