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": "5f5a2fa2bba2bb2e5c61e1c9", "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": "d3d71dd65fcafa6b10f222cf", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "f1ba4ebbe2ac72f00839d957", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "70327eadec3f89c8b05d54a5", "name": "Ut consequat Excepteur pariatur" }, { "_id": "585085e6b93cd811a265bc32", "name": "esse Lorem nulla velit" }, { "_id": "65a2c57153cdec5fad1ec36e", "name": "id" }, { "_id": "375ee90c7b8fd829a2c548f4", "name": "occaecat in laboris" } ] }, { "_id": "caa9b36abb82983b2c6ab960", "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": "647835ff3a4b4fa02d7b8d61", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "07b0742195c485391c3e82b0", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "78d2266adb8f3010cb8f0088", "name": "ut id dolore aliqua dolore" } ] }, { "_id": "9c9a14b3f4ccca3ee7de231a", "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": "440bbfcc85b0af0ea80c98eb", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "85a290e1c2cea85f3a675376", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "58b96549f3b371438aac3333", "name": "nisi" }, { "_id": "1e01b71d698ac77152505eb5", "name": "nulla" }, { "_id": "123c973bd676098adfb5a2a8", "name": "in nostrud ipsum" }, { "_id": "9eb6ebe62eb55a1c991ceda5", "name": "laboris" }, { "_id": "682ae8c70bd770c6dc691392", "name": "officia aute ea eiusmod minim" } ] }, { "_id": "875c9be76c82adedf6f4985a", "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": "3c8f826e2c70b30f0ea24dca", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "c86d9c8d341c50cd7098c7d9", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "f6bc8afac487e618f89bde2c", "name": "dolore veniam" } ] } ] }
{ "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": "incididunt nulla pariatur quis qui", "original": { "_id": "c7727c77de3e2c704c674c05", "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": "fc3c9801e5db081a3713d08b", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "b62b6c7a64ddbea2ecf45ef5", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "cd577f45e20af2b485b6d32a", "name": "velit laboris amet dolore" }, { "_id": "ed5723c4f6a69fd8a145053c", "name": "in" }, { "_id": "7bb113258fdee3559abe47ff", "name": "ea eu est aliqua voluptate" }, { "_id": "818feb197878ab812f8b7216", "name": "consectetur exercitation eiusmod voluptate occaecat" }, { "_id": "e7805cd89dfa08733eaf1384", "name": "et labore anim amet" } ] }, "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": "3A6AfcdCBA9D357306De5Fc2", "createdBy": "EFA3A6BF4A4cd0Ce7ADb4c04", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "d21C991B06a0Af1dCf1EED0B", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "e8C36B446C10Be3fc6F19896", "name": "sit esse sint sunt", "description": "A user-defined object to help group documents." }, { "_id": "9E3dB22De13CA4dFF9Ae38De", "name": "tempor dolore nostrud", "description": "A user-defined object to help group documents." } ] }, "edit": null, "success": true }, { "message": "ut in voluptate", "original": { "_id": "8df08ff791137130c5ff4864", "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": "d9f2a78eb717bd03e7c49375", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "d2f1434bbef54e47a4561a3c", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "d526973ca4a428a386fe9372", "name": "consequat veniam" } ] }, "created": null, "edit": "cillum ut elit incididunt", "success": false }, { "message": "ipsum cillum nulla sint", "original": { "_id": "d54f86518d031591caa1d035", "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": "8f4210a2dd87c6167e4299de", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "5739e41009e11ea0afecc820", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "3d676f3c39dd17f4698c16b7", "name": "consequat enim laboris do esse" }, { "_id": "772d3dc648fd32b89ad70480", "name": "enim incididunt" }, { "_id": "3501f71017b06d780621339b", "name": "labore laboris" } ] }, "created": null, "edit": "qui Lorem sed aliqua", "success": false }, { "message": "qui dolor nulla irure do", "original": { "_id": "eff0b8718af88f58bd6adeca", "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": "565b168f2a23e911d36faac3", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "8ed8e8447cdefaa38fe945e6", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "da3f2128f542ad0a42676e5a", "name": "minim aliqua aliquip consequat esse" }, { "_id": "c4f078397f768166c2393455", "name": "sunt elit ipsum" } ] }, "created": null, "edit": null, "success": true }, { "message": "consectetur ea", "original": { "_id": "86bbf73080d4bcd185ff6a5c", "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": "c517525e9b3a314cc4486da6", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "e28cd90568664b0cc2869e2a", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "10d80129cebc476090253dd0", "name": "nulla fugiat" }, { "_id": "ab4efb9f91d106b82f4880c5", "name": "anim laborum cillum" }, { "_id": "42e9f82d5c91681f74f092db", "name": "laboris labore nulla laborum" }, { "_id": "ce6d754f6f7b206ca80fb4be", "name": "occaecat" }, { "_id": "426d290b020542f90381bd12", "name": "dolore ad quis veniam" } ] }, "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": "03CD74ED07ec6285a402Af39", "createdBy": "D5b82A348efC2e6C36ca0bB6", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "fac90CECed44116df93F3aE5", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "B44bDC8D52b6d11a8F251D4E", "name": "cupidatat eu", "description": "A user-defined object to help group documents." }, { "_id": "C3B4e2CBfdf5941B93E4D9D5", "name": "exercitation magna enim in cupidatat", "description": "A user-defined object to help group documents." }, { "_id": "64aA023d13eb76000eAFE53c", "name": "velit", "description": "A user-defined object to help group documents." }, { "_id": "Af87F07330ecFDaBE92B49b8", "name": "Ut consequat exercitation Lorem", "description": "A user-defined object to help group documents." }, { "_id": "d82Ea30E9f2eaBB2ba61806f", "name": "dolor ullamco", "description": "A user-defined object to help group documents." } ] }, "edit": null, "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.", "type": [ "string", "null" ] } }, "required": [ "status", "message", "original", "created", "edit" ] } } } }