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": "0ebeb03df87f081a98a08a36", "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": "89ce94c4fbda7bf05ccfa7be", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "096ac64aa17a0b6557eb1723", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "285cc23710dd7ef59e45118d", "name": "non Excepteur" }, { "_id": "f94bcdb319e030762230ec48", "name": "magna velit Ut Lorem" }, { "_id": "cd2ca7395c70453555a798a0", "name": "cupidatat" } ] }, { "_id": "edb5f5b97d7c48c00a2c7158", "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": "f5021bd53494440dd29a48b4", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "19b44e52c6636114bbd27e37", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "6a52c350b6d89ab91e009b8b", "name": "proident ipsum" }, { "_id": "c2681b9031eefb594db2ed97", "name": "ipsum eiusmod reprehenderit enim" }, { "_id": "fd28c4e6331e2b4acc0522f3", "name": "velit aliquip" }, { "_id": "2f21c0a7daae8be98738fbb3", "name": "ut cillum exercitation mollit officia" }, { "_id": "44daa5620a10ee8420af91c6", "name": "dolore id sunt officia" } ] } ] }
{ "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": "ut aliqua pariatur incididunt", "original": { "_id": "7971386caf5bd2bd3f00ea6c", "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": "be1080d1bd066e5ff8eda3a3", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "6f9e28c0c59041f481d5d3da", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "d78dfe0c38950d0b3aada07d", "name": "deserunt Excepteur elit ad" } ] }, "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": "b36d64C8B9BbA71DFd41Cb49", "createdBy": "7efaf646aF2304bC852DfcED", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "7e6afE4Dcda0C1062FeDedA2", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "a894d783d846F1FE10ADF5bC", "name": "adipisicing dolore veniam", "description": "A user-defined object to help group documents." } ] }, "edit": null, "success": true }, { "message": "laborum", "original": { "_id": "18396095409df1504901bb30", "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": "d6bb02fec5b835e0341b1346", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "ee27b111722a8b5aed1fa1c9", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "4982fcaf00fa4018ea4409c6", "name": "cillum proident sed voluptate veniam" }, { "_id": "0795d9eec24cdb5d8c189c73", "name": "aliquip esse deserunt dolore" }, { "_id": "585d05c40e2ad422933d43c4", "name": "sed" }, { "_id": "75fdab5376e247a1cce1e7df", "name": "aute aliquip" } ] }, "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": "b62D9F9b4a5cF5f897A6e527", "createdBy": "Fc8B1bCdcB2f62c78120A7E5", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "b1D58DEbB3DCe7D7231fecFF", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "7B0fc52EC15887d7d7274817", "name": "quis", "description": "A user-defined object to help group documents." } ] }, "edit": null, "success": true }, { "message": "amet", "original": { "_id": "02d7407d8bf8e6aa0fb707fd", "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": "daa7145834aab1db8eafcdcf", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "caf360bd68adc364e46498ce", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "656c49b275d1dabc49cb39d2", "name": "eiusmod fugiat consequat ut nisi" }, { "_id": "e39735435b22bac5ba619bfd", "name": "dolor aliqua" }, { "_id": "4fd61ad4d2fe640db29b2033", "name": "in magna laboris nulla" }, { "_id": "ce01860a81d57cb734102815", "name": "tempor" }, { "_id": "8e9247df8ccad046d5a9a081", "name": "occaecat ullamco 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": "30E5Cd9eC59b9065DABeB4aB", "createdBy": "F45203eecfB93ABc6bFD20E8", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "DeEeeCD7DA0Bb52Db1bB14A3", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "b863d7DC12Db7b712D5C0DA6", "name": "sint magna", "description": "A user-defined object to help group documents." }, { "_id": "DD4AbFB6b3e9FFa135ba2cA4", "name": "esse et non consectetur magna", "description": "A user-defined object to help group documents." }, { "_id": "d1e988D488ddeabdFCcDeF2D", "name": "laboris voluptate ad laborum", "description": "A user-defined object to help group documents." }, { "_id": "5f1ebbB72f45A652Efee5b0b", "name": "Duis", "description": "A user-defined object to help group documents." }, { "_id": "0A8DA22F35A2799a0d0CAA42", "name": "quis do laboris non id", "description": "A user-defined object to help group documents." } ] }, "edit": null, "success": true }, { "message": "do aliquip", "original": { "_id": "7b2cfd42d412b05a49f15d51", "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": "0b8f2ec568f7b5c0cb3416ea", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "f5ac78dff3cda3585e7d499c", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "0d1fa49ed0d26aa8ea5ce535", "name": "Duis irure consectetur sit" }, { "_id": "cfb82af008dbdf5270b78c08", "name": "eu" }, { "_id": "ea828345dafb14c57e0ca26d", "name": "dolore in" } ] }, "created": null, "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.", "type": [ "string", "null" ] } }, "required": [ "status", "message", "original", "created", "edit" ] } } } }