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": "13627757bffb44eec135441e", "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": "c373bb2b4d5e70cfd4c807c5", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "271b82ce5baa9916c5bcb8b8", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "3d6c490aa40ee9342b031f25", "name": "amet sunt" }, { "_id": "de91af59dd0cb4ced087539e", "name": "ipsum" }, { "_id": "0911b58e0002a7ad83700746", "name": "mollit dolore" }, { "_id": "92ce7c8c6b5cf0e28494d86b", "name": "occaecat et" } ] }, { "_id": "9a64f593003f661ec8ceb13d", "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": "9fe3f48e1c60e9056e7b2398", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "0bdffeb87988da8b0328605d", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "1ca39be4923b93a5b37ee0a7", "name": "pariatur nisi" }, { "_id": "6923e61af9c41d14d2031e86", "name": "irure do minim ut laboris" } ] }, { "_id": "3a60f1c6e16e1f8b78bd87b6", "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": "fe33c2502953c9d62aa5612d", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "2db60d4f14e3964890b35482", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "a148a2f2439eb67458e231a3", "name": "aliqua" }, { "_id": "3324fce0f6c9b9d4048b4be0", "name": "exercitation voluptate nisi veniam" }, { "_id": "4703d0931ca4bfb17b8c472e", "name": "cillum ut dolore" }, { "_id": "e96b6c07a5673151ca5c4746", "name": "consectetur" } ] }, { "_id": "91bda472a9ad54a937600140", "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": "689c0f08c7c35a2e8e1dd81c", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "cb26e028584c2e09844179fd", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "5d38551580081f105a78e474", "name": "dolore est aute" } ] }, { "_id": "b18eab4fa2e724ea42b6e372", "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": "7fa0d5377b0f0f276564d4ff", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "c2846b084f0c8aa1c9265932", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "b35539a7a4e853c0c90295a0", "name": "velit sunt adipisicing" }, { "_id": "65b143d704ef751b5c3d530c", "name": "est sed Excepteur" } ] } ] }
{ "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": "sint dolor elit", "original": { "_id": "1937aa997b8cc206ea99f246", "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": "f387be1c396b535eb8e5f06c", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "cf221d48c40d836d6b64438c", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "e18a9a0817a44a8d85ddf04b", "name": "commodo et" }, { "_id": "d3e861dba7bf7f751d778573", "name": "voluptate cillum" }, { "_id": "5f4f8f9e29b1995d1447440d", "name": "elit ullamco qui eiusmod dolore" }, { "_id": "d48d80c662f4b0268ac0dd22", "name": "aute quis sed" }, { "_id": "26d57fb47708f2935d3981ab", "name": "eiusmod" } ] }, "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": "bF9BEe5DB43b84D8fB64e2Fa", "createdBy": "4153E35AcAe34faD2C0899fa", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "61bE882F16b83bD1F8d51e18", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "8FDA6Fdbbbb33c0FBaC7a6F3", "name": "eiusmod in" }, { "_id": "c35AB89eccE6044Ed271da68", "name": "labore ad" } ] }, "edit": null, "success": true }, { "message": "labore sint", "original": { "_id": "9f087f5800c91fdc754d6b52", "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": "7149f036252fe43011539be8", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "d5e188cece69c30b820f0340", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "44d43c709b92dba105553da5", "name": "amet qui labore" }, { "_id": "88f6e011e8a7047473dc9ab9", "name": "fugiat sint non quis culpa" }, { "_id": "1222a5eca3984414732f316b", "name": "sed" } ] }, "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": "8219c064Feecc663bAd45e74", "createdBy": "4a552D5A267b60563001b6f4", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "aC3B8E08e5cFfcFf4889dCE2", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "821700f0438ef51D0aDa9a74", "name": "veniam" }, { "_id": "52af7883EcD6dE5cE045A23c", "name": "voluptate nostrud ex" } ] }, "edit": "Ut", "success": false }, { "message": "cillum minim", "original": { "_id": "9bbf6aa1c64a20bd716fb5d4", "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": "2f1ada524cd06c866750ac6b", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "9d12a1c9b5295693241f2943", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "0c013238fffd6f242f8a1558", "name": "qui sint" }, { "_id": "b25ff25b1a73a5028e50f98e", "name": "magna non anim adipisicing" }, { "_id": "206bb5d7cba4a5dcfdc1fc08", "name": "enim" } ] }, "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": "2E371D2E7bbbf80dcd5740Ca", "createdBy": "7c9964913ee0DA45f365b25E", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "f9cf477Ba6beacc7cFe3Eb0c", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "0b7b3FB20ce48c531a2dDc30", "name": "sed" }, { "_id": "eF2e1f3EA4eB9d6c09b2bf99", "name": "culpa" }, { "_id": "6b916BF97Ff4FCDcFdb4B71b", "name": "cupidatat irure anim sit sunt" }, { "_id": "3c9Cb8e7dae019738DBCcd6B", "name": "irure labore cupidatat est" }, { "_id": "Ce05ec0e3fEeAabb2c0f53F0", "name": "commodo" } ] }, "edit": "enim veniam dolor", "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" ] } } } }