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": "5903039cb10e11000d62c4a2", "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": "b6872b2073e1762dea419d21", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "1a479a16d3ea0a0fbb1367d2", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "15932cdc409a8156cc8e4522", "name": "Ut proident magna dolore" }, { "_id": "ac92d66ce83f02b04b44a7de", "name": "enim" } ] }, { "_id": "9bd135542cd98a0d70d643db", "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": "ec80e13844330a2315c76889", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "6b84b89743b61d26cd91e93c", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "baa18c8e4f67837448be0b53", "name": "adipisicing tempor minim occaecat" }, { "_id": "a92e41626d9403328bcb1083", "name": "cupidatat ut irure" }, { "_id": "06640e3078c640d89fcd4617", "name": "dolor non" } ] }, { "_id": "cff1682c9019dde4945332e0", "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": "7a81d87e35bf866a8d8a6ffa", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "a0048a342dc850ff6fec5f8e", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "cedb3ee6d3773f4a0aba66dc", "name": "dolore velit consequat" } ] }, { "_id": "ba7fc03aeface8d3fca9f4e6", "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": "353e3885bd140a074be3d49d", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "96828a6cde5f42f20054a44b", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "6245c4b845e1818d9c3f609f", "name": "quis Excepteur in laborum dolore" } ] } ] }
{ "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": "eu fugiat eiusmod", "original": { "_id": "c0b8d938e35e84b9a24eda66", "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": "39e50da26827f04d99e014ee", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "9d423d7454f585e64a732ed8", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "dac544088d26f371944b5afd", "name": "ad Duis dolore" }, { "_id": "70e629b44119cda3e5d67a4e", "name": "incididunt sunt Excepteur laborum pariatur" }, { "_id": "117c0f481f8d64e55c9ee91f", "name": "ad est quis" }, { "_id": "2887168894b656aac15a4e15", "name": "veniam" }, { "_id": "31ad18c1436a6acdac3fd076", "name": "id dolor est eiusmod nisi" } ] }, "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": "38db6cdc3367bDd9ACe4DbbE", "createdBy": "A802d5fEEF19C4e8d6AF1721", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "c12626DC8bBA49Ae0D4CAf08", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "f6cF902B14589B3a5cDBa0Ee", "name": "anim nostrud", "description": "A user-defined object to help group documents." }, { "_id": "dFf3B459c328C52e5db72F6B", "name": "enim fugiat in est", "description": "A user-defined object to help group documents." }, { "_id": "9A7Accf82422FfA516De2C4C", "name": "nostrud sed non", "description": "A user-defined object to help group documents." }, { "_id": "a320aaD0Aaa707a9b6B72D0E", "name": "ad sint mollit", "description": "A user-defined object to help group documents." }, { "_id": "2C516eB4b3cCDCCa9fa2a0f2", "name": "sint aute anim dolore", "description": "A user-defined object to help group documents." } ] }, "edit": "aliquip", "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" ] } } } }