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": "fef8dfe416efc69f4e56ff30", "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": "aEE8C785151cefc50eeA5fDb", "createdBy": "b34bdedb073b840e73d7a591", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "6126f8e167fdac615da3fa7b", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "06f6b9b99519359c26604e63", "name": "labore et dolor" }, { "_id": "093df0fb2e86fd579f2a13ba", "name": "aliqua eu dolore" }, { "_id": "f36411a5c1b8bb3e2ea0443e", "name": "fugiat quis dolor Lorem culpa" }, { "_id": "311973d1ea000891fac10938", "name": "dolor" } ] }, { "_id": "176cb61140f6fb387aca967c", "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": "375314f8b0e8430a67a2cac6", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "7c6d2bd99ea299ef728ea7b5", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "e0003b9dafcf29160adfbd6f", "name": "laborum minim" }, { "_id": "33c471d8e35ce2d139de21ad", "name": "sint et commodo pariatur laboris" }, { "_id": "2673c87c880b779e3b9a1249", "name": "reprehenderit" }, { "_id": "6180e088d16ec0a29c3795b0", "name": "in sit dolore sed consequat" }, { "_id": "4992e42181675de5471deacb", "name": "dolore labore est" } ] } ] }
{ "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": "et", "original": { "_id": "84cf6c591d32104083928c3e", "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": "22d2e6f731338b3ace0a624c", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "6c1a79f4aa079d649f1f5564", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "5f595784e6dc3cb2fce88e21", "name": "occaecat sed" }, { "_id": "598330fef9d402c84c4fb24d", "name": "ipsum" }, { "_id": "f687c360575554dbf5ba7226", "name": "incididunt Ut" } ] }, "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": "5AF97ADF45da664eef10f499", "namespace": { "type": "project", "name": "non sunt", "accessControl": { "read": [ "amet ad", "irure incididunt laboris sit sunt", "nostrud do", "ut" ], "write": [ "Excepteur aliquip ex qui minim", "elit", "elit est amet", "do incididunt Duis minim" ], "execute": [ "cillum aliqua et in ad" ], "manage": [ "exercitation cillum aliquip", "occaecat laborum reprehenderit", "laborum dolor id aute reprehenderit" ] } }, "createdBy": "eD8D0C60CaC9DDcd7Af06363", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "F13beACCD1aF66C61F4Bf15f", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "743ef810038B46dd1C8f1F2d", "name": "quis consectetur do" }, { "_id": "25CcDCcF2E34ba258AcBFbeB", "name": "adipisicing aliquip nostrud dolore sunt" } ] }, "edit": null, "success": false }, { "message": "laborum", "original": { "_id": "aa4d71866f2c73bc437f68b6", "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": "AF93e36dCEa927584C4BF96c", "createdBy": "5fd46cba34782865828fbc5c", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "2bed8e549025459ddf6442ff", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "973c4d10eb8f2f9cfcbe14a8", "name": "cupidatat esse laboris irure" }, { "_id": "1931b441d7383a3f9ab64536", "name": "irure sit" }, { "_id": "21d431ab9b1b46550ff979e0", "name": "id irure in" }, { "_id": "d5bb36689abd4f6dccf3fd7d", "name": "nisi et ea enim" }, { "_id": "844960969d00b70952bb5a4c", "name": "culpa qui" } ] }, "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": "cc035BDc6Ede598B98BD7CF6", "namespace": { "type": "project", "name": "elit quis Ut", "accessControl": { "read": [ "dolor pariatur aliquip sit" ], "write": [ "ad id adipisicing", "ullamco ipsum", "enim sed ad", "officia" ], "execute": [ "fugiat", "aliqua sit" ], "manage": [ "minim", "enim deserunt Ut adipisicing", "sit cillum" ] } }, "createdBy": "A9dba50d6147db806Ae5f410", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "A059BADfa6C437fd4A6eD4a8", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "d50cABfaf4C4835127e4bad0", "name": "cupidatat in" }, { "_id": "cEcFA10c5512A928ecd54BEe", "name": "quis" }, { "_id": "5F0E662A2CFBEDFE54BA6de3", "name": "sint qui ut" } ] }, "edit": "labore Duis", "success": true }, { "message": "nostrud laboris non et in", "original": { "_id": "5b2b52f6addaf8f6460d8e6e", "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": "1a44410294fc737e1a911f76", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "955b896fa5356e88c339b847", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "1360c042c25f619d23e41624", "name": "cupidatat" }, { "_id": "e7e7752ea4d504defcc96646", "name": "Excepteur adipisicing id" }, { "_id": "21bc44766e2793773c87b6db", "name": "eiusmod pariatur in Lorem ad" } ] }, "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": "25847Eaeb42ebF58088C0921", "namespace": { "type": "project", "name": "exercitation sed Lorem", "accessControl": { "read": [ "aute aliqua sed dolor", "Duis amet dolor", "qui enim nulla ad" ], "write": [ "sed elit Excepteur", "deserunt est", "anim magna ut minim non", "dolor exercitation do tempor" ], "execute": [ "ut aliqua" ], "manage": [ "aliquip mollit ex proident officia", "adipisicing voluptate laborum dolore do", "sed ex dolore", "nisi culpa quis et" ] } }, "createdBy": "dbF33f65c9cA3610e0D0C5Fb", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "d9662a8cCa3fc5b1fB30B676", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "BFF79C2EC4a724Ffa4baD124", "name": "reprehenderit" }, { "_id": "b96bcF24b2eE503b8DdcDdFa", "name": "aliquip in culpa mollit" }, { "_id": "4c4cF4d7Ad9CF4edA9c998C4", "name": "qui" }, { "_id": "98bDa827b5D20c2719e5C8Fa", "name": "cupidatat id" } ] }, "edit": "esse proident id", "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" ] } } } }