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": "1c4d86c1ba1572b4e746177e", "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": "7e19476f84681efbf3b7c9c7", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "f783eb8db25321a128bcebb1", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "40855e8e8bd94b5a0e598d7e", "name": "Ut elit sint Lorem in" }, { "_id": "beef415f335ebaf319dc72f3", "name": "Excepteur et dolore" }, { "_id": "3bce185696c1d793bb645296", "name": "elit sit dolore ipsum irure" }, { "_id": "405e6ee82d01bb2ebbacbd1b", "name": "tempor et" }, { "_id": "fbc4fc8772e4525393f01bfd", "name": "veniam in do ad" } ] } ] }
{ "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": "fugiat et laboris", "original": { "_id": "2964ad9c6fd2a45e8ba997bf", "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": "2f27318a43b0fed76ab0bc8d", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "4963d1c1be732e7c78368ccf", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "e84b4ba6f6b0e7385c07a172", "name": "dolor irure" }, { "_id": "27153bab3a2a10046f457c54", "name": "proident incididunt" }, { "_id": "2fe8e2ebeedb101b552aceb6", "name": "sed eu culpa pariatur" } ] }, "created": null, "edit": null, "success": true }, { "message": "sed dolore Ut in", "original": { "_id": "d084e2d85a2bbfa5d7046cfa", "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": "674fe7cc7781e096e0c5f186", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "576990f0a3871efa96bbd9df", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "fdfca1f38ebba98d37428381", "name": "deserunt mollit" }, { "_id": "2428edfa58279ec198f60e3e", "name": "quis" }, { "_id": "1eb27a3d5728ec7646cb2ab1", "name": "magna esse non" }, { "_id": "bffb3941e61128563e45e940", "name": "tempor minim Excepteur" } ] }, "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": "ceffd0aFabbaaDF4db8Cb4af", "createdBy": "22d0DBFaaCF2Ba65F0BbfB0d", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "25a051Ae84d39fe6Eb16B9cE", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "eF921a69Ab1cbF52f8bdeD5d", "name": "id cupidatat officia", "description": "A user-defined object to help group documents." }, { "_id": "5a8FbcB5dD53e1DC505eb2D9", "name": "Excepteur exercitation eu", "description": "A user-defined object to help group documents." }, { "_id": "fcEA047dd3ed302856eCce5a", "name": "pariatur", "description": "A user-defined object to help group documents." }, { "_id": "BEad0b53EA83cfD593d4bBFc", "name": "adipisicing cillum in velit veniam", "description": "A user-defined object to help group documents." }, { "_id": "8542cD2B1ba8FE301e3aFA8C", "name": "officia", "description": "A user-defined object to help group documents." } ] }, "edit": null, "success": false }, { "message": "elit", "original": { "_id": "10ddab6a300e97d9d9c9bb37", "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": "271561464007893dbe8fd2fd", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "fced33b2d34b4279166972d7", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "48defd22a7a3614f1904416c", "name": "officia sed ea enim anim" } ] }, "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": "4A82e58d5CFaF39B4F02F425", "createdBy": "2CEfB6eaafFCA36C5f143CbE", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "9B0BBafa35eF1ef16AE2F1ee", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "12DaA1712e0a99feBD3fCD6E", "name": "velit Lorem", "description": "A user-defined object to help group documents." }, { "_id": "ee6Af47CdB844C592BA591Ef", "name": "culpa magna cupidatat", "description": "A user-defined object to help group documents." }, { "_id": "915B775b5b14aaa9ACB41DeC", "name": "non sint laboris occaecat", "description": "A user-defined object to help group documents." } ] }, "edit": null, "success": true }, { "message": "laboris officia in", "original": { "_id": "0481938781967ff0f1c7b71d", "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": "8018036f055165a57da1c84e", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "25928f46681321c89b5714bb", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "a4d53b91faefaac641891b27", "name": "incididunt Excepteur irure eiusmod quis" } ] }, "created": null, "edit": null, "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.", "type": [ "string", "null" ] } }, "required": [ "status", "message", "original", "created", "edit" ] } } } }