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": "4b1d266692db4b7c07c13051", "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": "4defdcb03c12059eae495d6f", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "b88cf739dd68fdad273cb40d", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "c17f3022de4c285b5a9f5663", "name": "voluptate ullamco" }, { "_id": "572a68d30d760d92c7fabf40", "name": "et eiusmod officia laborum aute" }, { "_id": "7087ffbdeb6a14637b5c6aa2", "name": "veniam sed ullamco est adipisicing" }, { "_id": "970cbc892b0ac5696b7a0d71", "name": "exercitation ut pariatur" } ] }, { "_id": "fd5446f5e2af9a7315e6dc88", "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": "b4116332f051f322576b64c3", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "2a2bc67ab7b1e925e809720a", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "0f892d80545c2f6a3e74757f", "name": "esse laboris" }, { "_id": "aa6c70d462c2c47ea6b8c844", "name": "Excepteur in anim ut eu" }, { "_id": "45d39fe21b0df9afbfff2a1f", "name": "laborum officia id" }, { "_id": "e5e255e9a36102637d6dcdbf", "name": "dolore mollit ut eu" }, { "_id": "4c82974192d69c068b68a58a", "name": "ipsum sit" } ] }, { "_id": "39a1af031cbb047e6bf7db4a", "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": "7a730ab3e00bad22950beeb1", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "0c67f2dd88d5370d98390eab", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "9d88464acf4043bc62479178", "name": "elit minim in sint qui" }, { "_id": "423e9dd2e1dd41b599c1173f", "name": "deserunt nulla irure sed mollit" }, { "_id": "10ba5d837e6fd004803f7d99", "name": "irure sed ad incididunt nulla" } ] }, { "_id": "4c50a59d77390e8f2d68da22", "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": "2bb2bd31536c80c42f4c7bce", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "7c8cf85b4f053693d668cfb6", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "8e51221b1bef018b8e202683", "name": "voluptate incididunt amet" }, { "_id": "cd545573e784bcccfc48721b", "name": "officia eu" } ] } ] }
{ "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": "non Duis in irure ipsum", "original": { "_id": "b45a5822952d29ea542b9ef1", "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": "c3bac853a84bdb66cd4190cb", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "68df8d8068b701f1c3c6d4d4", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "7e6c3f68dcf797b331b353b2", "name": "in irure sit exercitation id" }, { "_id": "f4d8b3833bf93e6bd726babe", "name": "labore" } ] }, "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": "DaAB8EB671FC0dd0f9A7d2E4", "createdBy": "a3A5dDbECf0fdA9Db55Ef9Df", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "a6Cb7Bc11B5F15EBE278B015", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "e07EF83eFACae5Bb9CdbcFfb", "name": "nostrud minim velit", "description": "A user-defined object to help group documents." }, { "_id": "9F3af6af3e942cC2c38a81fd", "name": "sit dolore", "description": "A user-defined object to help group documents." }, { "_id": "5D5BB14F3f5f23B8dD6F6B1e", "name": "irure Duis", "description": "A user-defined object to help group documents." }, { "_id": "Bf9ccd1Efbab66aDe32701d2", "name": "mollit", "description": "A user-defined object to help group documents." } ] }, "edit": null, "success": false }, { "message": "ut quis amet ex", "original": { "_id": "438bf7d03fb163dfaa7b612f", "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": "f556e73d95ea11ff5a5326d1", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "ea7987bc2e242276b3b66b19", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "adbc6813899e984496a1e219", "name": "occaecat ex" }, { "_id": "0937f27f103afc474253cca1", "name": "ad" }, { "_id": "a28007cf9675e9c7ed7320f7", "name": "dolor sunt officia" }, { "_id": "66f099208988c9d8dfa0a16c", "name": "id nostrud aute in veniam" } ] }, "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": "Dee3E1C8E4d373B84D4Ff891", "createdBy": "7Babade40d7c45109DF5abAf", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "d5846b8dA535CFDc50fE5e06", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "5261a6eB46B8bACfD3dAaBCE", "name": "sint est ea aute", "description": "A user-defined object to help group documents." }, { "_id": "c9aab1D68aE96bf9135dcC0f", "name": "deserunt culpa Excepteur nulla ipsum", "description": "A user-defined object to help group documents." }, { "_id": "A1D3ff34D10dE1ff61b712b7", "name": "cillum magna exercitation", "description": "A user-defined object to help group documents." } ] }, "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" ] } } } }