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": "38915bc9926f1e6613655b71", "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": "4efd2bf81cba16413ae646a9", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "de548aea17638b5d48539332", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "14e9617b0a7cdd6854090bc2", "name": "velit anim do labore consectetur" }, { "_id": "9820e765ea53054e35c983aa", "name": "non" }, { "_id": "1f7aefd02cac78914a6d2d77", "name": "incididunt do" }, { "_id": "6cf3afc3cc9b4c91d025e27b", "name": "consequat sunt" }, { "_id": "ba98505b44fecff95de13503", "name": "enim cupidatat in labore" } ] }, { "_id": "c09be07224045422d8498277", "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": "ce1E1bdfEF1fCdbFcBfaf8d4", "createdBy": "3dd721b8997bb55d9813089e", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "1bcb1fcc803b24edadca7493", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "1e1a4aa846a4c542ea0ab153", "name": "aliquip eiusmod" } ] } ] }
{ "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": "officia Lorem", "original": { "_id": "fbfdf7a4e3aa3429196e46f5", "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": "FE8BDccfe7dCf55b3E7cFeAf", "createdBy": "b1bfee60b26fbba541610a57", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "169d47825cb41ed0707ae353", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "7e042a80ba877dcc5b39afae", "name": "exercitation" }, { "_id": "5f9c79fdd9724dd77f7934fb", "name": "sunt" } ] }, "created": null, "edit": null, "success": false }, { "message": "sunt voluptate velit in", "original": { "_id": "da17fad1ece3ebcc21e91c99", "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": "e099ac4b77e035928bcd856f", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "98b1d8bc84c0ce7474433938", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "820c1e564e640a120ab58f96", "name": "consectetur voluptate Excepteur laboris" }, { "_id": "39c737385112a7799ecb45de", "name": "velit culpa nulla consequat" } ] }, "created": null, "edit": "dolor consequat Ut", "success": true }, { "message": "culpa sint ullamco", "original": { "_id": "2d7d808c080ef44909878f37", "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": "c6A9b5a99ABcC3FBD5Ade316", "createdBy": "f21454fa4ea0ada5f8c61374", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "ab122147fa9e8f258d5eec6d", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "5b2c45fbc92168c57d048249", "name": "do ex" }, { "_id": "02db85104633e5e6d82304b8", "name": "mollit culpa proident occaecat" }, { "_id": "da741dd11d60c2a607c762a4", "name": "nostrud" }, { "_id": "485f83405f3ab1d042647045", "name": "aute qui esse deserunt" }, { "_id": "42cdd30e7b8fb40828f3451f", "name": "ullamco sunt in enim laboris" } ] }, "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": "BFe7f48fcb8CcBF6ACFDBd62", "namespace": { "type": "project", "name": "dolore proident quis id aute", "accessControl": { "read": [ "aliquip sunt eu consequat", "magna ut irure laboris", "voluptate", "amet officia" ], "write": [ "anim aute dolor", "enim laborum non consectetur voluptate", "Lorem sint officia occaecat", "elit magna consectetur", "officia ut" ], "execute": [ "exercitation", "nulla" ], "manage": [ "in magna", "eiusmod", "eiusmod dolor ad dolore" ] } }, "createdBy": "07D9e6c27D0CA97fC9BCf849", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "56B8abcEf51A7cCd02D9dB4a", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "42EAa2DFb1c7F07AB8eDaDf4", "name": "veniam" }, { "_id": "800Af079ceA64650Be3C1fA5", "name": "aliqua deserunt nostrud" } ] }, "edit": null, "success": false }, { "message": "adipisicing nostrud", "original": { "_id": "1d333f6b231ab15153cf1deb", "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": "a29d2d6159d2727bb0f042a0", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "d6406c36b56587a0e598e0f7", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "a5a69619943bbf6a39ef0f19", "name": "dolor" }, { "_id": "52fc6f27df1135e959f0ec21", "name": "sint" }, { "_id": "090bf6cda214f14fe9538030", "name": "ex 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": "9Df71B13Dbfa6346A9B8dA0d", "namespace": { "type": "project", "name": "non eu aliqua", "accessControl": { "read": [ "occaecat mollit laboris in" ], "write": [ "culpa pariatur tempor magna", "id velit dolore", "officia", "pariatur cillum fugiat sed", "id deserunt" ], "execute": [ "est non", "eiusmod", "amet consequat" ], "manage": [ "enim amet exercitation" ] } }, "createdBy": "d811a712bF55E1dDb90Abede", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "eF241524A46C9cef049f43da", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "0D0DAA2Dcf5dfeFB2eEfe4e6", "name": "officia adipisicing est" }, { "_id": "C1fbFeE83bd90398A80C230d", "name": "labore dolore ut do in" }, { "_id": "e1D52cf2DFc4148E6cb391A5", "name": "Lorem" } ] }, "edit": "pariatur dolore", "success": true }, { "message": "minim", "original": { "_id": "2a895471605adb4b2cfb2d11", "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": "349ac24bf6d770c30894c5aa", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "8cceb930ae35858054caab87", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "0bdf5872c540b149a91c4a22", "name": "do occaecat eiusmod" }, { "_id": "a843009eea67aa4f344702a5", "name": "sit esse id ipsum" }, { "_id": "d3a3ea4e0a9cecb35e3721dc", "name": "adipisicing" }, { "_id": "870e4ba28d1bd2f3968c0075", "name": "esse exercitation deserunt" }, { "_id": "919982031415b1bb920a21d6", "name": "Lorem ex nulla voluptate aliqua" } ] }, "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": "7dDA52DB56bAA2dBf55Aafed", "namespace": { "type": "project", "name": "dolore voluptate Ut id deserunt", "accessControl": { "read": [ "sunt aliquip dolor sint anim", "velit", "ad" ], "write": [ "aute", "mollit in", "laboris cupidatat Excepteur", "labore laboris", "sed ipsum ex eiusmod elit" ], "execute": [ "ipsum exercitation minim" ], "manage": [ "eiusmod velit", "officia sit eiusmod magna voluptate", "enim", "non voluptate culpa", "reprehenderit" ] } }, "createdBy": "F2c1BC901AC42DfBf9bE1eaB", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "7FD5aBeAA1cec2Ec1BCd391b", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "e02bBbb4aB67EADFed9dD2Ea", "name": "enim commodo" } ] }, "edit": "in Duis sunt", "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" ] } } } }