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": "f65a221555ec1f8824b74f2d", "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": "e9ed400095d2f1276eba812a", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "c9b5dc9f117385dbdef1a6b9", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "c162fbacf449bf9d9e381a37", "name": "aute eu sit ullamco" }, { "_id": "526124bd9c5886012d3b9327", "name": "ipsum qui adipisicing commodo nostrud" }, { "_id": "11da5005f7da6cb84f6aac1e", "name": "commodo sunt aliquip eu esse" }, { "_id": "54035fa72a0d10efa240cf35", "name": "ex dolor laborum laboris" }, { "_id": "433da28eff72ae3f7ecdbead", "name": "cupidatat sit elit" } ] }, { "_id": "74f32a163974783844b32c29", "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": "cAb8fFDebdd4De74bCde2bEB", "createdBy": "8693a66faec0cf2ac5d43852", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "5a550292f347d18c4c9d8113", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "78f820a1d0a7669855782880", "name": "commodo nulla esse dolore" }, { "_id": "6374398ba70c77f405faeedc", "name": "consectetur irure deserunt" }, { "_id": "771836193f06032b5b37f059", "name": "reprehenderit ullamco ea esse" }, { "_id": "d6366fdad12a57f009e20c35", "name": "in dolore exercitation ut proident" }, { "_id": "80c5490d8f7201044f279a1d", "name": "ad laborum in ullamco aliqua" } ] }, { "_id": "8c98f2e330e4dd0f10b2045a", "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": "2Ee52CdA73Ccc7e8bAB6B905", "createdBy": "f75eee6780ac08273477cddb", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "bd390bd4b429f046141e388e", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "1a15827da80af1cd9e112b6f", "name": "culpa esse veniam dolore fugiat" }, { "_id": "0f5e2f9a3914cd1eff7f27f3", "name": "officia laborum et consectetur" }, { "_id": "8e66a0673dd1a6eae9bde36c", "name": "velit laboris Duis" } ] } ] }
{ "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": "commodo dolore do proident in", "original": { "_id": "931c9ae7752f0a6f10e88c50", "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": "Bb17FC55bece15ceDc90a130", "createdBy": "a6312431f968dfa5804e18c3", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "53c701460d78b76b7172547e", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "f899f70ace2a57b1e378221b", "name": "dolor dolor ad" }, { "_id": "57b110ab2330b241ace94575", "name": "mollit in proident irure" }, { "_id": "4f8eeb80ec2e9182a14fa109", "name": "aliquip proident" }, { "_id": "35ad8f24dbbaa03af154962e", "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": "5Ac2e1cF99641Da9bDcb972b", "namespace": { "type": "project", "name": "esse eu irure ea tempor", "accessControl": { "read": [ "in dolor", "dolor sint" ], "write": [ "elit dolor pariatur dolor occaecat", "sint irure officia ullamco aliqua", "cillum qui ipsum sed", "ipsum deserunt fugiat dolore" ], "execute": [ "fugiat", "minim", "laboris", "sint est Excepteur" ], "manage": [ "eiusmod deserunt in mollit Lorem", "exercitation sint", "in do dolor Duis consectetur" ] } }, "createdBy": "5f6da7F8AB97c2c69ffFB299", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "FdBA02e2d5a2F4acB0Ffbbec", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "F29888851A49ca90fAfAcd2D", "name": "laborum velit" }, { "_id": "81c6f9928caBC7d69CD73Bf5", "name": "minim nostrud do sit" }, { "_id": "a9ba4eb8BD5E64f87B2ecADb", "name": "adipisicing" }, { "_id": "6CddfB5BD4258F32c5ef6cEc", "name": "cillum consequat velit" }, { "_id": "bC745cC4C6eb74BEd7dfBC3f", "name": "sint" } ] }, "edit": null, "success": true }, { "message": "laboris", "original": { "_id": "e5da76156ef437d0835caf42", "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": "da39B35217fb3E28cfa4edcd", "createdBy": "753d279476b48509e94a069d", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "7a72504e02dd55f55cbd67c2", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "1b0335b1e707691918053625", "name": "est" }, { "_id": "b1ffb4a673488091950d2ce4", "name": "cillum amet proident dolor" } ] }, "created": null, "edit": null, "success": true }, { "message": "voluptate veniam ipsum est sed", "original": { "_id": "89cb445f3d8f232b6cbac7c5", "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": "E764cf8c735Cb508F641adee", "createdBy": "60347efcef083666b7dfb89b", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "68114de8fec6a4582e3b37ff", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "6ce7fe16ba69c4dacb235eca", "name": "eiusmod elit in fugiat" } ] }, "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": "ef46BBdeAdFb5476fe06bACa", "namespace": { "type": "project", "name": "consequat occaecat laborum", "accessControl": { "read": [ "laboris veniam amet tempor" ], "write": [ "ea", "ullamco et", "dolor incididunt Ut" ], "execute": [ "mollit Excepteur dolor ad Lorem" ], "manage": [ "reprehenderit tempor labore", "culpa magna pariatur dolore" ] } }, "createdBy": "3a5E3C1aEBaD2bDeb4Fb0cF6", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "34c76cCd8F2953Bc7dFcE2F4", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "3Ca8Cd4EfCfeAEFf23b4bdEA", "name": "amet commodo nostrud" }, { "_id": "ebc08774afFccF5CcAdB2eCD", "name": "elit qui nostrud aute dolore" }, { "_id": "ba6d8cbb6dB3DE3E67dE26bc", "name": "nulla ut" }, { "_id": "ac1Faa5A5D8b0b9b141ae4cE", "name": "ut fugiat quis Lorem" } ] }, "edit": null, "success": false }, { "message": "dolore non reprehenderit dolor adipisicing", "original": { "_id": "015e70c19c1c9158331fdc83", "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": "7B180fb1C4aCB08bdC3eA708", "createdBy": "fef12c1d6d5d25e0d3f9683b", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "af934bddf11bc7bea5011beb", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "73edb4090a602e5973171562", "name": "ex quis amet in" }, { "_id": "1c5fa63dd62663356df556c8", "name": "dolore do" } ] }, "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": "1A7BdbD6d49bAFdEDa82d0Eb", "namespace": { "type": "project", "name": "veniam eiusmod cillum", "accessControl": { "read": [ "Duis culpa dolor laboris", "enim exercitation Ut", "consequat minim incididunt laboris", "ipsum labore", "amet" ], "write": [ "sint" ], "execute": [ "ex in sunt", "dolore eu nostrud laborum cupidatat" ], "manage": [ "in culpa" ] } }, "createdBy": "F3212097aa0eD50314EAcCFF", "created": "2019-11-25T22:51:39.201Z", "lastUpdatedBy": "1a1cDDf29bA22B279ba73f4d", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "DF3244A3145AeB3d92AEDC9C", "name": "laborum deserunt incididunt culpa amet" }, { "_id": "6097EaFBF2B4BAD3E2071718", "name": "esse qui est" }, { "_id": "8Fd996bC8c3Cae15506d03d8", "name": "incididunt in sunt elit cupidatat" } ] }, "edit": "ad velit", "success": true }, { "message": "sed officia tempor commodo veniam", "original": { "_id": "00d46071990029f2c86ea4b9", "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": "410d17ff58546a0242bfae76", "created": "2019-11-25T22:51:39.201Z", "lastModifiedBy": "709c65c1c68935ab3184c4fb", "lastUpdated": "2019-11-25T22:51:39.201Z", "version": 1, "tags": [ { "_id": "7993c6a283314e60a22de294", "name": "ea labore tempor" }, { "_id": "731e62cd69ab0998e4149766", "name": "consequat ex occaecat adipisicing" }, { "_id": "670c3d150f4e35eb53fbd64a", "name": "ea do" }, { "_id": "5fd937c736a0102a6538ab4b", "name": "minim sed amet Ut" } ] }, "created": null, "edit": "reprehenderit eiusmod dolor occaecat", "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.", "oneOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "status", "message", "original", "created", "edit" ] } } } }