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": "a9a53cae9c4141fa0931887c", "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", "projectId": null, "createdBy": "0c5d1cbf5469022f7e056154", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "00868a792992a2dca39b0335", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "c9fc6cc16834e0b714dd3fc7", "name": "cillum incididunt consectetur voluptate consequat" }, { "_id": "fbbed43100f63c000b4c4287", "name": "ut sint irure" } ] }, { "_id": "8ba8842a6efaf6d9b2a722db", "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", "projectId": "719EaEf1CF742bDc0eA33dbd", "createdBy": "45a72ee6320ebfbace2d3512", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "441de2cb717ec2a16c673d63", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "be68bdba9775b838f20aad7c", "name": "nostrud" }, { "_id": "2b64e6402423e75be5c6c4c2", "name": "ut officia" } ] }, { "_id": "3c32d716e1f6021e84ae3a41", "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", "projectId": null, "createdBy": "92025cd76a0c0a1d84d50ff9", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "53cb5f6d16e1388effc8acfb", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "edd6d7e6667edfed2aacf878", "name": "ad ullamco" }, { "_id": "f911d3825df62ee848654f0e", "name": "elit" } ] }, { "_id": "5895500d3b53ca2dfa95a8ed", "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", "projectId": "De63bD59334f2bd71fA1D5a3", "createdBy": "a377bbfeff84c203b7fc4778", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "72ed31fa4b438408789fbf50", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "dfb58e7d2c16f1ab1f8778d4", "name": "sint minim" } ] }, { "_id": "0462a4b764035893691e0663", "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", "projectId": null, "createdBy": "bf5013222613f6de3cb16d1b", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "1ebc76ed2fc9e5a6055dee02", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "39c7b36e0986234bf98df887", "name": "laboris" }, { "_id": "95f2228fd451c8698e71e806", "name": "voluptate labore Duis enim" }, { "_id": "b79f5cd3b2029f07048863a9", "name": "labore ullamco dolore Lorem elit" }, { "_id": "8a3f5f9eab131b5837218f33", "name": "laborum laboris et eiusmod qui" }, { "_id": "be28fa6b4f5de6a6c4df313c", "name": "commodo labore Duis occaecat" } ] } ] }
{ "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": "veniam", "original": { "_id": "50be0151e2cddf1c92a2eeca", "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", "projectId": "Afca4Ed0Fe3B9bd6C606F5f1", "createdBy": "3accc6cf8933e97ae9ec4c3a", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "28ffa3c555c2df28104f5176", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "a33cac375cd0071ed219c646", "name": "Duis esse adipisicing" }, { "_id": "6bcfc886d34c6814f407d115", "name": "minim consequat dolor eu" }, { "_id": "ebea65b10e3c99f250ae3543", "name": "adipisicing exercitation" }, { "_id": "adbfa2e3793359bb4aac427a", "name": "dolor et reprehenderit" }, { "_id": "80f58e5b523bb0dd28f342c3", "name": "magna consectetur ex 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": "1F0ffEfdFCCAeaF29B6d2f80", "namespace": { "type": "project", "name": "consectetur minim quis velit", "accessControl": { "read": [ "nisi", "veniam exercitation in in anim", "exercitation et labore voluptate", "nisi nulla mollit nostrud", "dolore quis Excepteur ut culpa" ], "write": [ "nisi irure", "irure eiusmod consectetur" ], "execute": [ "labore cillum anim", "eiusmod et", "in" ], "manage": [ "est voluptate", "dolor irure Ut" ] } }, "createdBy": "55BEecd7fFae58C10Ceba8bE", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "010a7B6bF29f43CE6F1cAea2", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "Eec6D4Bd63EB011acD4fa4AC", "name": "esse" }, { "_id": "F02c6322F7cc9f8A4d32f49B", "name": "id ipsum" }, { "_id": "cbCbA1A89Ff0E2FE09fF81D0", "name": "dolore in Lorem" } ] }, "edit": "enim fugiat", "success": false }, { "message": "sint in aliquip enim", "original": { "_id": "94a43303c5034093930c62a7", "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", "projectId": "ffA6ACe2F118745dA0C1958E", "createdBy": "519f5d287a4fe73140c3350d", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "241bb5f35d66ca6e08fed277", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "6ca0fa3272842a7c2cde9735", "name": "culpa non amet pariatur et" }, { "_id": "01511488e70ccee6418748b4", "name": "nulla deserunt fugiat ea ut" }, { "_id": "6cb01088a172e474128c3d77", "name": "adipisicing mollit minim" }, { "_id": "2116ed051dea3723b8cf4f52", "name": "aute" } ] }, "created": null, "edit": "Ut velit et Lorem reprehenderit", "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" ] } } } }