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": "6203268256a7da0da5088e38", "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": "6941abe816aEbA56565a5dfA", "createdBy": "537581cac8e159470c1298b8", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "914e469c212039b6c0557ca5", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "7734afa822c44437a2987bc3", "name": "minim non Excepteur Ut" } ] }, { "_id": "e91e9e5607fb22084ab3fae0", "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": "ec2f4BCEDbB22bf68c369899", "createdBy": "703d93cc8d3f188db9c5889c", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "ed193464c47ec3d0f4633053", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "a18fab6e717d45927efdf080", "name": "ullamco cupidatat Ut est reprehenderit" }, { "_id": "a2ba7a1130df0af431ce16d1", "name": "quis" }, { "_id": "0d07abf9266cf918a0f320ce", "name": "consectetur fugiat ullamco nulla minim" } ] }, { "_id": "95a400b52465935814ea2ae7", "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": "133a37553e925acadd1100a2", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "8a549931949ae03b23859701", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "a11e4087adce795e4da7e288", "name": "esse" }, { "_id": "abbd8ce9cdab2cf6512fd94a", "name": "occaecat officia magna ut consectetur" }, { "_id": "adecfd53586401a67a24790c", "name": "laborum exercitation dolore pariatur in" }, { "_id": "fc66f624db720848f92ba008", "name": "in aliquip occaecat esse" } ] }, { "_id": "2edca727801907e0feaa4b98", "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": "CCA6596A95b0b3bcCC8E86a6", "createdBy": "1209e8dcdfc2f30c763b8547", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "b317c0e9128cc69007c0d1eb", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "fcb8641a35b049cdae904dc8", "name": "magna ut dolor" }, { "_id": "35ca4aca4f4058589add150c", "name": "do Excepteur ex" }, { "_id": "4c4728ea00a67de0e7addbe9", "name": "ullamco sed pariatur" } ] }, { "_id": "b4a190a08e11b3f0ab0b809d", "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": "0c0744D47EeBdFadB45bCeC5", "createdBy": "4fb6aed886d0f9ce79838e47", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "c1f20a5632b9e2912f009c53", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "b557eda1c3af7fc1fe3e06fe", "name": "Lorem aliqua ea dolor nostrud" }, { "_id": "a8ee70dac9eb25630f3a7935", "name": "sit Excepteur labore ullamco exercitation" } ] } ] }
{ "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": "ea labore ipsum", "original": { "_id": "d22c4d79672811d62036e541", "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": "3cc88afb6258673ce99230cc", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "419ae076cc80b5962761333c", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "caac903394bcf1db31fc68c3", "name": "Duis nisi culpa" } ] }, "created": null, "edit": null, "success": false }, { "message": "ullamco proident dolor", "original": { "_id": "35664811b460cd6b717ec458", "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": "5413650f32ec83185d557af7", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "37a3c8f01adc783b8182e4ac", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "6e8cca2e85d8c59cfeb48c37", "name": "amet sed nostrud consectetur" }, { "_id": "3c1786af61c908faf57b5ee4", "name": "dolor laboris id dolore" } ] }, "created": null, "edit": "laboris magna Excepteur sint", "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" ] } } } }