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": "6972555a2206afa61b876160", "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": "0249293c202336277601874c", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "d76c2fce3084df621025d6ee", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "f9af64fa567980e3e9fa7e6a", "name": "nostrud minim" }, { "_id": "bec3a6d3ae427809e19e80fc", "name": "voluptate labore cillum deserunt pariatur" }, { "_id": "fcebcd0fb0dcbc49bcd15618", "name": "pariatur anim" }, { "_id": "631ab5a7b7f70981ca2c08ef", "name": "ut commodo minim in anim" }, { "_id": "0cbcb574c9482b507efdb210", "name": "dolore sunt cupidatat pariatur" } ] } ] }
{ "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": "nisi tempor labore ex officia", "original": { "_id": "20232a58b83873d329b7e58b", "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": "2166baf5be54cce35e56b253", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "ca440d3f73a3ffb78822ac04", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "e800ed4493c923500b81cd03", "name": "dolore" }, { "_id": "b8c1df60be094eea95abd55a", "name": "dolore exercitation quis aute" }, { "_id": "85cc87615dccc08694799f49", "name": "esse proident Ut pariatur" } ] }, "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": "A1d2769CDf88c9b52e66AeDC", "createdBy": "EFe986C716a75E4F8e4Bd1d0", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "2ebA9AbdB44ea5B41fcEFca0", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "1e2Ad7Ea2C457CADC330d1F7", "name": "voluptate in ex cillum dolore" }, { "_id": "c43BCa9F815C1A992258FdDd", "name": "nulla in" }, { "_id": "C69Fbaff93311C51fccDB896", "name": "ut reprehenderit" }, { "_id": "C8c22Bfc6Dc12cefBEDfFC1A", "name": "anim consequat" } ] }, "edit": "adipisicing minim et cillum dolore", "success": true }, { "message": "occaecat Lorem in dolore", "original": { "_id": "622679a2feadb5471c694fb1", "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": "7c0c0d6d0a62053c88bc7a4b", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "b9db5560f7dcc5705aa910f8", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "b98f97227cbb53cf1868ccbc", "name": "amet nostrud" }, { "_id": "417f0a9b8f8b7adcd90513b1", "name": "proident" }, { "_id": "dfb51339f33d1f7da8be2b1b", "name": "anim exercitation non" }, { "_id": "80b5d9f827f782fbb53834ab", "name": "adipisicing" }, { "_id": "1856f6e06d111f2e99d092a7", "name": "qui" } ] }, "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": "F324DF997feE402a08d0000E", "createdBy": "0bccb1D0Caf6133acDC77C96", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "160bB96bbaD1b601E8BC09C1", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "01C7CDE2399F4f4B44f53f17", "name": "magna fugiat enim esse" }, { "_id": "2a6Ef8D1DEF4F3d17568bcac", "name": "deserunt Lorem irure eiusmod nostrud" } ] }, "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.", "oneOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "status", "message", "original", "created", "edit" ] } } } }