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": "d81b89f2f461251880bf8662", "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": "cd9ca3bb22cd0bb257b084cb", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "26a67e59f8bbefc1d22cb758", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "489fe36866c99c2a48bebfb3", "name": "veniam dolore irure ullamco" }, { "_id": "4d4637c5fdc6bd28f8e99a3e", "name": "est" } ] } ] }
{ "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": "in do labore", "original": { "_id": "5d48349b0578f770f67255d7", "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": "1e0497aadccabe8f5fdbd504", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "688e1badcc563976ea50d5d9", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "d176f6366f70cb35d304b648", "name": "ipsum" }, { "_id": "62ef4c6135a4b739bd684495", "name": "dolore nulla ex" }, { "_id": "259e387e0403f02900b64cdd", "name": "culpa et" } ] }, "created": null, "edit": "cillum ea", "success": true }, { "message": "mollit ea laboris", "original": { "_id": "11ddcf7ee9acba48c8903aa9", "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": "496a7a4d31ba8fd9b708327e", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "d50d81bc3b9defe3dbf4a2e5", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "625ce5297631f699040e1860", "name": "nisi est consequat" }, { "_id": "bd31351fc1fd8463215f6bf4", "name": "adipisicing" } ] }, "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": "1DE325C53b79dbBcfbfa12Da", "createdBy": "A10f55A466fe69d31dc3FcB4", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "d9C34AD003c04A77A6Ecf91C", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "DCa8F6f3788dFAb421cCb4f1", "name": "Duis in dolor" }, { "_id": "a9732e6e8B181Fc8ffaf7Ca9", "name": "ut" }, { "_id": "2f2e7a5CCdACDD662EddFCd0", "name": "est consectetur quis labore Lorem" }, { "_id": "4DAADFFE3FcEfcEAAef1cb53", "name": "sunt officia est dolore" }, { "_id": "2B064ECFa36AEb41D639ccB4", "name": "pariatur ut consectetur ipsum velit" } ] }, "edit": null, "success": false }, { "message": "aliquip ullamco pariatur veniam in", "original": { "_id": "3930705c40189f9b34bdab7d", "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": "249f1bbb6f263b08ee309fec", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "d249acbddc304490045403d7", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "c32f3cf55fbe91c544495157", "name": "aliquip sint ea in" }, { "_id": "cacb46fa71d542f0a2cf6331", "name": "sint sed ut ipsum" }, { "_id": "0eb63b127ca8c072067f36de", "name": "sint in in elit" } ] }, "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": "b0B95bd0e596ddCac5bee0D8", "createdBy": "5ecCba7ea6f3B8625d9cdBc0", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "DAB785A616e5731917E43A23", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "c130e9A7372DB02Fee48F729", "name": "incididunt" }, { "_id": "Fc5d3A08caa6CF25FB0DC926", "name": "elit velit fugiat" }, { "_id": "3Afa4aD46CFA7694C897aABd", "name": "aliqua Excepteur cupidatat et consequat" }, { "_id": "28C6deF47db5cEDF1bFfE26c", "name": "officia" }, { "_id": "f1fB2f647Ddf02e0CE9D8DCB", "name": "Ut Excepteur" } ] }, "edit": "ut et", "success": false }, { "message": "qui", "original": { "_id": "3503fc9ca8142949bbcfdeb1", "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": "3f0116d2ee58f59043ad8c15", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "a494dbd34fec72dd1453eac8", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "fd73bdadce1ac4ea2f438194", "name": "dolore est proident commodo quis" } ] }, "created": null, "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.", "oneOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "status", "message", "original", "created", "edit" ] } } } }