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": "5aba3d854bc9a6de4992f0d8", "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": "4ba1ccd53a60e17feb636cd4", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "0d942d651f593ec72c36c3e3", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "237e0f0c676b41c45dff6221", "name": "commodo aliquip in cillum Duis" }, { "_id": "0c6c004963ac92608f0d5f5c", "name": "dolor est ut" }, { "_id": "fd95097a9084e60300f3b98c", "name": "sunt eu ullamco" }, { "_id": "cfdec52581a8792966fcf251", "name": "Ut ea minim nulla Lorem" }, { "_id": "fc36f396c58f9faefff63768", "name": "adipisicing irure" } ] }, { "_id": "6e725579019df649b5c00fd3", "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": "cf0d67a5e3d5f03ed275e70c", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "3ca29ca1b45f1fd9920355fa", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "6419329c890c20e60891ac23", "name": "aliqua cillum do anim proident" }, { "_id": "188387810fbdd530ee152fc0", "name": "sint in nulla pariatur mollit" }, { "_id": "feb3e196b99a847f9ca0bd5b", "name": "magna non" } ] }, { "_id": "87d0ccdb666c352d7269cc11", "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": "18f5da1f5cb137aa7844b640", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "e86cff29cb17916503c1d7b2", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "7b76e873cb0786c39b4c295f", "name": "Lorem aute nostrud ut" }, { "_id": "8441a2be6ae3abf31e2b0fb4", "name": "veniam laboris non Excepteur" }, { "_id": "e3f342999c67ea53fc1e221c", "name": "qui ipsum labore fugiat" } ] }, { "_id": "8cf63385bc2c19e65b9682a8", "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": "4e2bc61200ba20a582279ef8", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "2579ed07ec08f13b7f475960", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "fcc8188095ff8c6b2964f18c", "name": "in ad aliqua" }, { "_id": "5d0e004fb38eea9476479af3", "name": "occaecat in" } ] } ] }
{ "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": "reprehenderit Ut fugiat", "original": { "_id": "99e4277c342baf59d04d4909", "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": "417eef98fe4114789615444b", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "205dce36ffcc3aa29428a3e3", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "764aba21f1cc359b0e894cd6", "name": "eu cupidatat aliqua" }, { "_id": "8be3933cce00270403d2ffa6", "name": "dolore sed fugiat et" }, { "_id": "214580e2e281ea159ada3ef6", "name": "officia aliquip pariatur sed" }, { "_id": "42b6325abd9f8b4f241b4eb7", "name": "Lorem" } ] }, "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": "B42dFAcFAaDbfdFBAF35Ee3a", "createdBy": "307215cc57CB500aeCdDC7bd", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "25C4fCe1A8e0B597E9FFBe3d", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "b9F8B2310EfD58f2E85E9D0C", "name": "non aute quis aliqua" } ] }, "edit": null, "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" ] } } } }