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": "29ebd1364c69f330973a6fbb", "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": "AaFdbEDA5d0A33bbb317dDeA", "createdBy": "a38c10fb603fd0d2613fccb4", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "873075eb93e177cf3a8123a3", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "d16deab3e79dc6dc514847d4", "name": "culpa amet adipisicing ullamco mollit" }, { "_id": "15cb719fb6ece61caaf74f8d", "name": "laborum id" } ] }, { "_id": "559062dd97000896437c7691", "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": "44d3df4d5ABdB2b7B7929Eaf", "createdBy": "eaae205903b35b3fc823871d", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "d3151c3e86b9c7a54b66ba7b", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "f489d7032fff4b461a9e1016", "name": "ea proident quis" }, { "_id": "ac38822d7ebc49714893ccf7", "name": "veniam sed ut tempor occaecat" }, { "_id": "26c4daaa709c464842b16b38", "name": "aliquip cupidatat sunt ut" } ] } ] }
{ "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": "consectetur eiusmod", "original": { "_id": "efe5a70951d51123d2ca41e1", "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": "64beebb0eee6580cdbe30142", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "8c28f2bff43047eace5a5415", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "921802e541602310b35bcb5d", "name": "in laborum consequat" }, { "_id": "4dc1469523cfec7389e1b460", "name": "Excepteur cupidatat irure" }, { "_id": "7553754fe715d684cdb136f9", "name": "commodo proident ea minim ex" }, { "_id": "e01978fcdeb5af063f47aa06", "name": "dolore" }, { "_id": "9225595d00af015b4bb1ac2e", "name": "do ea" } ] }, "created": null, "edit": "deserunt adipisicing", "success": false }, { "message": "dolor ullamco eiusmod consequat", "original": { "_id": "262cdce7815a22eb0d3b2f41", "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": "8C55BE60C569Bf4EC1ef28dE", "createdBy": "d66c543a17327992c4023db3", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "df0fc241b19efac0db7d2956", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "fdf9fb251a1139504f45e5e3", "name": "ex ad ea elit" }, { "_id": "178cdfefa2d20557d4946012", "name": "nulla consequat occaecat pariatur 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": "Ed2d76db529A8D89d64cB0a3", "namespace": { "type": "project", "name": "Ut in", "accessControl": { "read": [ "id cupidatat ut sit", "occaecat aute" ], "write": [ "aute officia", "ex ipsum sunt" ], "execute": [ "aliquip dolor ut irure", "proident cupidatat dolor consequat", "pariatur enim", "eiusmod", "occaecat consequat" ], "manage": [ "amet ad enim ut dolor", "ullamco irure exercitation Excepteur", "aliqua", "ad elit", "non" ] } }, "createdBy": "9ba9c6149ecDc1C3db44eeF5", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "7f8D6f1de963D35Eb6C548Ce", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "ED095FdEE0a41DBB5c665B7A", "name": "dolore" }, { "_id": "F762aCdeBbb95FeBCFa04Ddf", "name": "cupidatat eiusmod id culpa" }, { "_id": "1eb14eBC111C5FDb49Df98f7", "name": "ipsum adipisicing labore culpa" }, { "_id": "ceBDe3fD1a59D3da281EB9A2", "name": "nostrud" }, { "_id": "94EFDfb01177AA9d560bE4aE", "name": "dolor" } ] }, "edit": "ut non laborum veniam", "success": false }, { "message": "eu nisi est in dolor", "original": { "_id": "db355b312e7170cf7d481e3d", "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": "ADA2e82A2f9528D14CBD0F9a", "createdBy": "b183811322c577edc741ec43", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "ac48af3ea2391b81d475118d", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "d07fbefeebdd13ff63b1c2a1", "name": "ullamco adipisicing veniam" }, { "_id": "4a51d94a4ebc305201f9364e", "name": "laboris" }, { "_id": "4d009fcae30c848c1b2f689f", "name": "magna" }, { "_id": "fbe5f1ee8a9d30cb3012b378", "name": "cupidatat sed adipisicing" }, { "_id": "1651ed028e4955f097600ef4", "name": "sed in non" } ] }, "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": "3514D277A51BC9388F95badB", "namespace": { "type": "project", "name": "dolore occaecat sit elit", "accessControl": { "read": [ "consectetur qui", "laborum Ut elit tempor culpa", "sint magna proident occaecat", "exercitation tempor ipsum" ], "write": [ "nisi incididunt ut anim" ], "execute": [ "fugiat elit eu", "cupidatat sit mollit esse nulla", "tempor dolore ex", "est" ], "manage": [ "in consectetur laboris eu qui" ] } }, "createdBy": "AAE5A7Fb1e7e6FDc17eC4FF0", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "D5AcF4b77DcdcE5498cE3ed1", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "FBF9d5d0dcB1eBda271aBE6F", "name": "ut" }, { "_id": "34bCED63fD91E51Ea321bCeF", "name": "nostrud esse do officia" }, { "_id": "ae537A0af06bF41dbaae01EE", "name": "amet proident ut" } ] }, "edit": null, "success": true }, { "message": "ad ea", "original": { "_id": "0b36be8fca4c5c1657eec16c", "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": "2862e69aD43CC05E2C1Cff61", "createdBy": "86b281c812a9267a2ed3aaf6", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "522cfa3c53f5f0e009a71c2a", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "ef246105e03f81971d7c789b", "name": "aliquip" }, { "_id": "65cea6fe62dc21a19f4a5e3d", "name": "adipisicing Lorem amet" }, { "_id": "fa61e4d8aedc950c0944b246", "name": "id nisi" } ] }, "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": "AfEb5a0Dad260bA8Bcb4Faac", "namespace": { "type": "project", "name": "ex dolore", "accessControl": { "read": [ "ullamco ad adipisicing in", "pariatur", "anim proident culpa qui exercitation", "laboris labore qui", "Ut laboris cupidatat magna non" ], "write": [ "cillum" ], "execute": [ "aliqua est in", "sed mollit nulla" ], "manage": [ "quis sint et consectetur laboris", "voluptate incididunt laboris minim sint", "dolore", "consectetur" ] } }, "createdBy": "77c5A72D4CA6889Be9665e02", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "9bAF4b7afbd3Ce8033aC35E1", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "FF17522bdCa4b53b2AcD2e26", "name": "nostrud proident tempor cupidatat" }, { "_id": "D23b150D6448D31a12BbF6FF", "name": "eu dolor" }, { "_id": "314d6c89FbFEda55AF8dCaB2", "name": "sed exercitation" }, { "_id": "1Da9bdFEB1FeEBE0aef8cBea", "name": "Ut aliquip nostrud" } ] }, "edit": "mollit ut cillum exercitation", "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" ] } } } }