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": "ede6bfd1ff58e076c3149e59", "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": "b111af48b229e3966f26d0da", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "628b5fc952f3c821d20fd1b0", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "988a3ba161630d86f6987623", "name": "id" }, { "_id": "57c1009a1d19909f0bacfa5b", "name": "laboris" } ] }, { "_id": "7d3c6d3cd0eb16d236544030", "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": "91f603c7fa44108427b31e7e", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "928b007f4c6ed38ac770211c", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "a1748aa71334177297c92c57", "name": "laboris nisi aliqua Excepteur in" }, { "_id": "d2f7ef4849c389e0d585cae0", "name": "proident" }, { "_id": "d4b5e7f5d889bf9d2add2b54", "name": "sunt ipsum dolor" }, { "_id": "e72e893ec724153baee2c99f", "name": "sit" }, { "_id": "2daa5b382e04d69579b443ac", "name": "culpa commodo" } ] }, { "_id": "a656c9e00cca8a1ce5cd2e7a", "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": "9f7b0a3ceacd1978e498abb1", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "108a5fdcb404cc38d2301a1b", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "027db77dcbc001e97d4bedc5", "name": "exercitation dolor Duis" } ] } ] }
{ "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": "nostrud laborum et aliqua officia", "original": { "_id": "f04f6e2234416bad903eb19c", "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": "92acf7915cd350938a753f99", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "dc8c65876946f51a803844a7", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "5979de5e88f58e6ec5a753ad", "name": "sed" } ] }, "created": null, "edit": "pariatur fugiat labore", "success": false }, { "message": "deserunt consequat", "original": { "_id": "3a46403995d324ef873d469f", "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": "be1ec6bae0ef1366d4a25000", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "db14ab5b165396ac4b75c872", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "27b1310b684aa5cad877b5ef", "name": "in" }, { "_id": "06f2a984dcf87044ca689e08", "name": "sit ad" } ] }, "created": null, "edit": "ea", "success": true }, { "message": "adipisicing id dolor aliqua pariatur", "original": { "_id": "7c487269b2fd1fc078ecda04", "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": "c2a40de59ae3b5dfc2c81e7e", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "470e0777a8fcd5d663591640", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "a51db278921e163626dbd4dc", "name": "occaecat proident enim" }, { "_id": "0ba08201352522dbb0cea49f", "name": "ex aliqua velit" }, { "_id": "5bab9c975babaca91173f6d7", "name": "Ut dolor" } ] }, "created": null, "edit": "irure", "success": false }, { "message": "dolor enim aliqua anim consequat", "original": { "_id": "3624c0d73d27e03bb02424df", "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": "73232d7d268dcf774ce23144", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "d52bb8edb90498a5bda0863e", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "167954a8805b261f4e7bd0f1", "name": "Lorem 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": "57Ee460eeebFe43338F82808", "createdBy": "b4Bf5CDbbeEADbb2de32DB66", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "F9E7C6FABF1DA50F080FB37F", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "6864ee3b9ccB1cEFdeF3d3c4", "name": "veniam Lorem dolore" }, { "_id": "1c3Ac7e6F2900Ef85b3A0Ff6", "name": "minim eiusmod irure adipisicing" }, { "_id": "bcEAF5e2A9e1305b9fD8ABdf", "name": "occaecat cupidatat ut laboris commodo" }, { "_id": "9FcFFcC4d0C7B6c3D5cAB98E", "name": "labore proident mollit" }, { "_id": "e0D53Cd43626BD4F3BC1c510", "name": "eu cupidatat" } ] }, "edit": "non pariatur", "success": true }, { "message": "dolore dolor dolor nulla", "original": { "_id": "b68804f3c91e0278c4942c3c", "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": "b75159a6791df2bde2a9489b", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "4e189557fb3b126e10095b65", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "b5a36c063390a685ac3ca538", "name": "id pariatur Ut do ullamco" }, { "_id": "08b0903a4214090270ca342e", "name": "est dolore elit" } ] }, "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": "F69Caa89cacdae26c252a63e", "createdBy": "bEC0cA11f4d6d99acB7F15CC", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "9fC909319B5d53e9059bD6f5", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "1A91d2AB6d317C5f9B3155f5", "name": "veniam aliqua ad" }, { "_id": "9B4cff2EcDad39C15AEB3C63", "name": "ut ut ad" }, { "_id": "2B33e00b66B7fFfa8A4C087f", "name": "id" }, { "_id": "ddDfdD3Ab0e3Ae47Af7E9e79", "name": "incididunt eu laboris exercitation nostrud" } ] }, "edit": "amet nisi", "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" ] } } } }