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": "1245055e333dc77dd0587b67", "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": "af2311ea149822969135120f", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "bd1000c7de4158f78a85c25c", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "57129c8e58ede2fdd84b8211", "name": "eiusmod exercitation est mollit" } ] }, { "_id": "9f906cb8ef7094447f08cb66", "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": "c92117bc12c4fd275533443e", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "1c1ff122216c3e6f9fd84ce3", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "e658d8425f0e0a1e490ddf8f", "name": "in in ut sint reprehenderit" }, { "_id": "281e624b15e84646cde8f829", "name": "Duis sunt ad" }, { "_id": "bf848cf889e071dbdf7cb81c", "name": "anim" }, { "_id": "bd75eab2ae612cf3b3bea053", "name": "amet enim" } ] } ] }
{ "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": "ad dolor proident", "original": { "_id": "44ec230fed834278d9bceb5b", "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": "c750a8dd6f9395fa088aa9a0", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "98bc347c034e93047607494e", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "31d0f8083e941a5b68fa6996", "name": "tempor esse labore sunt sint" }, { "_id": "a6f382db35bef0982fc820c0", "name": "non ea id" } ] }, "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": "5fAD70384fDaf5EA6CEE676a", "createdBy": "df88d11F3dAafF06848d1D13", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "78ef1CCDdc495D1cAF8DeaCa", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "c36b2eaCFE0C8D2aD0ba6C86", "name": "dolore", "description": "A user-defined object to help group documents." }, { "_id": "8fb54FABd5AadccDdA4A82b7", "name": "quis exercitation in", "description": "A user-defined object to help group documents." }, { "_id": "FB6f5fBe9706258af5594Fc2", "name": "mollit qui cupidatat est", "description": "A user-defined object to help group documents." } ] }, "edit": null, "success": false }, { "message": "fugiat", "original": { "_id": "97d33446f33f80e8aa8d4e93", "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": "886c0a78f19a6689f7172810", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "64690722bdcbbf33268bd303", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "a4ce5c54630d59048e2b443b", "name": "amet laboris Lorem dolore mollit" }, { "_id": "57ab86557fba3e040e71c794", "name": "cupidatat laborum aliqua deserunt dolor" }, { "_id": "aeb4321e5e620f5650052798", "name": "reprehenderit eiusmod" }, { "_id": "762487cef6a22139b80a9f41", "name": "Excepteur in" }, { "_id": "d6b7667f0bd1f2cde6729e2a", "name": "laborum minim" } ] }, "created": null, "edit": "consequat", "success": true }, { "message": "id magna nisi exercitation", "original": { "_id": "89d5ed15146e8d71d312ef8d", "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": "dd4de3a5035738a962e9896d", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "e3ad6a7b58c4e9a2bfa945bc", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "684f7f4849a20a2b4753f1dd", "name": "in sint enim ad" }, { "_id": "502bf9cb3ed31a916e37e7ac", "name": "id irure elit" }, { "_id": "8d9ea64861f1defd6127c48d", "name": "cillum nostrud enim dolore" }, { "_id": "f5cdafd974dcd59293fb372a", "name": "ipsum" }, { "_id": "a17e24c77eb3b8f889976cd0", "name": "non minim" } ] }, "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": "cda4DAAb8bDcceD745Ff1AdA", "createdBy": "bBD1DD8E1c1BfbFdEb8D8F1c", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "11fc88BF1cbfd9fD93C2BbcC", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "d096FEd7BB7caA81BA6fc9b2", "name": "reprehenderit", "description": "A user-defined object to help group documents." }, { "_id": "eEbDD29ffEdD648bBCbC0eBE", "name": "dolore ad cupidatat veniam", "description": "A user-defined object to help group documents." } ] }, "edit": "reprehenderit officia", "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" ] } } } }