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": "8bf06e5834a988f8be39e5da", "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", "projectId": null, "createdBy": "329c33bb613f9022299ad4f2", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "0df3885fa29a1d93c68ce8bd", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "3e85f68e4abd04c2ffb33e5c", "name": "culpa minim mollit" }, { "_id": "093e43f9df92007de4004d6b", "name": "ex veniam non quis Ut" } ] }, { "_id": "01d371cac71913a51893b308", "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", "projectId": null, "createdBy": "5629ce69de3ae47f5cede4c9", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "80fd46fe01f6b0fe7231917b", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "3541a20c1ffb23cd75212469", "name": "sit consectetur" } ] }, { "_id": "567bb6b57e9b94ade8499cfe", "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", "projectId": null, "createdBy": "032e94e29dcc3d1c62731a36", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "141c9ad22c9357a63cdc470a", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "47b4970bf3834eeeaa993caf", "name": "voluptate exercitation irure amet" } ] }, { "_id": "d7800e95068dc129554cd100", "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", "projectId": null, "createdBy": "8b868f8a098907b01fd435c0", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "ee76d9e54a1638a8b4b2ed2c", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "0b00cdf35233c467368bbff9", "name": "cupidatat tempor Excepteur" }, { "_id": "6742f026761702d8d51a4eb9", "name": "in sunt sint pariatur dolore" } ] }, { "_id": "91558df6d90abeaa7ffd57c0", "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", "projectId": "2EdCC3FD9421aA12aE5699aF", "createdBy": "f981e561f429527ccc1cfc1c", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "5057de686a093e80faf276e4", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "f093cac8245f02c1c7ed0afd", "name": "deserunt non id" }, { "_id": "1d0cca2d20f6762ea41e0d57", "name": "consectetur incididunt reprehenderit occaecat do" }, { "_id": "7f363fa7e26eb56ec3c34996", "name": "dolore exercitation ullamco dolore mollit" } ] } ] }
{ "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": "incididunt id voluptate consequat", "original": { "_id": "aed5c941ca3c0f0d7a4ca8d7", "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", "projectId": null, "createdBy": "c2475c65cb7f8d080f440e00", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "92bfa5b00f585a9511f09c37", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "0ffb3bf4f5265bac31dae998", "name": "dolore" }, { "_id": "b782940449599fd1aea2b05c", "name": "amet" }, { "_id": "2ce736b6a9ce23d4cb1ce723", "name": "anim ipsum" } ] }, "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": "9E54e681D2d86dEeB5c0e187", "namespace": { "type": "project", "name": "occaecat Lorem", "accessControl": { "read": [ "magna Duis dolor", "et in cillum ut", "dolore in occaecat id" ], "write": [ "irure", "aliqua in", "elit", "labore irure in in dolore", "et culpa proident elit laborum" ], "execute": [ "fugiat cupidatat", "quis aliqua et", "deserunt incididunt in", "occaecat" ], "manage": [ "mollit ad", "magna quis minim culpa", "esse", "voluptate aute exercitation", "incididunt ipsum esse sed nostrud" ] } }, "createdBy": "D70c0F3Dd16E8aC9597e5cDf", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "aBB645e3C2Ac3eE76F0eAD31", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "bbCb1AC867b380Eb86CEBe2A", "name": "dolor consectetur aliqua" }, { "_id": "Dd48FDfA418eDA7cbd7993F7", "name": "consectetur laborum tempor ipsum culpa" }, { "_id": "DfaC1ffcb58ABD72b87F5453", "name": "proident consequat" }, { "_id": "8181b525Ec1941aF8DdBe944", "name": "labore velit" }, { "_id": "9E3Cc362d7E657eb37DDE735", "name": "do ut" } ] }, "edit": null, "success": false }, { "message": "culpa exercitation in consectetur", "original": { "_id": "e6d86a78e3f1eb352ada45fe", "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", "projectId": "1d334f83AB77123DaA867D9E", "createdBy": "0ee1e5971b589c3cbfaf0d1e", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "aeeb44339e0968deb580d4b7", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "9164924f90fe0520822c219d", "name": "do" }, { "_id": "a62f1ba0558b910807cb6415", "name": "deserunt cupidatat" }, { "_id": "7467878150140aede3b76f85", "name": "consectetur" }, { "_id": "111fc5790b3c4a6b8aeff13f", "name": "esse anim labore officia nostrud" } ] }, "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": "4a2ddBDD18aaa119eBcBd8cE", "namespace": { "type": "project", "name": "esse dolor nostrud dolore", "accessControl": { "read": [ "in qui nostrud irure dolor", "ullamco nulla eiusmod adipisicing aliqua", "do adipisicing nostrud dolor voluptate", "nulla commodo cupidatat", "aliqua" ], "write": [ "aute cupidatat ut" ], "execute": [ "dolor sit adipisicing fugiat Lorem", "laboris sit ex", "consectetur veniam", "cupidatat enim consectetur nisi irure", "ut officia laborum" ], "manage": [ "adipisicing irure voluptate" ] } }, "createdBy": "366988a7AdACDe47ED8A6D0a", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "A7EC2ae763ABb613AF8e33dB", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "ffCc6C1D4b724165Eeb1C8e5", "name": "mollit" }, { "_id": "129dD4aECBd24C9CC3e2d3C3", "name": "laborum" } ] }, "edit": "est adipisicing", "success": false }, { "message": "aute exercitation non", "original": { "_id": "26c6bf667b2c337a44955483", "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", "projectId": "e6a2Fb6A8f9ed3CebD06a7c2", "createdBy": "e8882e4e0bd18ef949d9bbcc", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "dcc1b9500a44a98aa7bd6a87", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "a355100c9a0c089de51f871c", "name": "elit Excepteur anim exercitation" }, { "_id": "0d599e747934ed02071b612e", "name": "commodo velit" } ] }, "created": null, "edit": "cillum commodo nulla est cupidatat", "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" ] } } } }