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": "2fbc124b7681bf3d7f002d8d", "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": "a1e0eef0fb8086e200481253", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "1683aaf6d783cbd84de6c3de", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "0b56f1c96e5a3ce28935c488", "name": "et sit dolor" }, { "_id": "155770485c78374ad17ba913", "name": "Ut et cupidatat" }, { "_id": "eaa69540a6fda1b36b8b6799", "name": "laborum" }, { "_id": "ae7efd809a53aab511bdee96", "name": "in Excepteur Duis ea" }, { "_id": "a1566f8c24bb09536132cb22", "name": "cillum velit ut dolore" } ] }, { "_id": "0daf385bba7f9067f6ba6c8e", "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": "8AfCFe438fb23aeE713dB0aA", "createdBy": "ab0883b40fcb0f85e8959540", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "dbc3e4a60dddcfae008e7793", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "7944a22ec1562a105dbde5cf", "name": "enim velit cillum" }, { "_id": "f4d290739cef132a9c115dc4", "name": "aute occaecat aliquip veniam mollit" }, { "_id": "5cb9259add3db510187d1a6d", "name": "adipisicing officia culpa eiusmod" }, { "_id": "fedec2fbf181df602f370a63", "name": "consequat" }, { "_id": "bf9cecfb36cae7d16a168b08", "name": "aute sed est" } ] }, { "_id": "720fb4922d1aa44be2409c84", "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": "ddc07e688d50d021b2b4ed24", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "c52e5b620ad756108b3e9b3f", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "7b9420a33a17f5e32db337c5", "name": "culpa magna adipisicing" }, { "_id": "08661c34404eee05ccf91152", "name": "consectetur dolor ut sit dolore" }, { "_id": "b69770112005334c84065882", "name": "ut aliqua sed est" }, { "_id": "4b2a21838335b75775d98b68", "name": "eu magna" } ] }, { "_id": "4cd94a060f66c961168c7edb", "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": "d23Ffd5Af790D73E544FeaEe", "createdBy": "567f5c8fa55ee6e6f2e082d2", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "cbb51039599fbe75f21e5cad", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "fbabfd6288caf4a2d8ea2a56", "name": "Lorem occaecat adipisicing ea quis" }, { "_id": "9d4f5665dcb0ca5e0d4ee06d", "name": "in ipsum" }, { "_id": "39728997f7d9a3309d3eabf6", "name": "qui Duis ipsum" } ] }, { "_id": "b4a81343d1a829ecac6af134", "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": "8bBe0aFCedeAAB0D6157abba", "createdBy": "a8392fc836f1558c40522737", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "0539051d3bbdb0bd5e4b9d28", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "d8a0a84a4dc285b098333cba", "name": "deserunt" } ] } ] }
{ "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": "in Excepteur eu proident pariatur", "original": { "_id": "692e3f2f4c2dc68f9a2483eb", "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": "1EDFd7A1e1F4E211E1F38e60", "createdBy": "349da8093bcbe81b67546f37", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "a708c44473b707b12a16d3c4", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "f869888da81232f175553b1c", "name": "esse consectetur amet pariatur ut" }, { "_id": "b599f373bbcc0e9e0108c506", "name": "in cillum officia elit" }, { "_id": "64da8d12f037f21a4987bd17", "name": "laboris elit" }, { "_id": "a54aef1654dc60132444f7b1", "name": "dolor laborum" } ] }, "created": null, "edit": null, "success": false }, { "message": "Duis", "original": { "_id": "e5084c7b12865bd4150c6658", "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": "2dcb843dbc5e87f59678d6f6", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "27dcd9f326dbab9743bfe093", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "342b9c5e9d02dbb3c5867010", "name": "esse elit deserunt reprehenderit dolor" }, { "_id": "1e010dc6f2a9f4dc3f7c8552", "name": "quis minim est qui" }, { "_id": "3e1a633ba7cdd6a6f5e5f8cf", "name": "occaecat ut officia anim eiusmod" }, { "_id": "990a1274058962632991615e", "name": "non consequat commodo elit" }, { "_id": "ac1732b005d34b913ce477c4", "name": "non dolor" } ] }, "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": "fEEaB8b1F84E8B909FBF2FA5", "namespace": { "type": "project", "name": "qui consectetur", "accessControl": { "read": [ "ut pariatur", "irure mollit do aute qui", "Lorem in", "dolor Lorem" ], "write": [ "nostrud proident et", "in esse" ], "execute": [ "proident", "elit", "sunt adipisicing", "labore laboris incididunt nostrud" ], "manage": [ "nostrud ullamco sit ex" ] } }, "createdBy": "Ce7eCBdFb6C2b4D5adacEd78", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "2f1F4E17aeDedFAD6D63eDf7", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "3AAD3dd534faa52D0aAc88B0", "name": "laboris id in" }, { "_id": "8c86CFf22B51bc91510f030B", "name": "aliqua nulla qui sit" }, { "_id": "fdFe76156756c1d7FaaaC66A", "name": "amet" }, { "_id": "4E5DECcaB6837Fa68CdC7D7C", "name": "eiusmod ad" } ] }, "edit": "et", "success": false }, { "message": "do sed enim", "original": { "_id": "07ad40eba10cfc618c3ca165", "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": "97d3e3789d3876f796cf9b5b", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "0643074cca60c2eda6156875", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "bd82331a5cd1fab25340cff0", "name": "ad laboris" }, { "_id": "b05efc363e62cb85af392ffa", "name": "esse laboris magna in" } ] }, "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": "D60e6fEAA01E6e43Dd24f8cA", "namespace": { "type": "project", "name": "Ut", "accessControl": { "read": [ "culpa incididunt aliquip veniam voluptate", "nostrud adipisicing", "voluptate eiusmod ut in", "ut proident sunt", "aliqua in" ], "write": [ "commodo Ut amet fugiat", "ad", "anim non consequat do nisi", "eiusmod aliquip do" ], "execute": [ "dolor amet", "magna ea enim cillum cupidatat", "proident cupidatat" ], "manage": [ "culpa elit aliqua est Lorem", "id dolor eu ipsum", "laborum id reprehenderit veniam nulla", "culpa proident sunt eu ut" ] } }, "createdBy": "1ACf154ba2C943c98cfAE379", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "8B6b9eCEE8Eca0a4eAFBdBf3", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "0aD3047dd41119DC5ac8DB3b", "name": "aliqua cillum" }, { "_id": "7F46200BA1c45CbC7bdD5fe4", "name": "id" } ] }, "edit": null, "success": true }, { "message": "Excepteur est laborum occaecat irure", "original": { "_id": "1d315ec3db0dc6d6a1078eb8", "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": "87cb5E907Ba64eEEe69ca1ec", "createdBy": "6deae3ee253116f75f3146d8", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "eaadd2467c033526b04d056e", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "19e27d67cf8f22b8c8552f8c", "name": "nulla" }, { "_id": "7a462e517b3abf54b312b0e8", "name": "esse anim" }, { "_id": "f6eaff555a7ad584c2d98566", "name": "cillum irure" } ] }, "created": null, "edit": "elit", "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" ] } } } }