Summary
Get templates filtered
Description
Get filtered list of templates
Route
GET /template_builder/filterTemplates
Roles
Parameters
Name | Type | Required | Description |
---|---|---|---|
options | object | yes | Options for query parameters |
{ "options": { "limit": 10, "skip": 0, "order": -1, "sort": "name", "contains": "Template name search term", "containsField": "name" } }
{ "type": "object", "properties": { "options": { "type": "object", "properties": { "limit": { "type": "integer", "minimum": 0 }, "skip": { "type": "integer", "minimum": 0 }, "order": { "type": "integer", "enum": [ -1, 1 ] }, "sort": { "type": "string" }, "contains": { "type": "string" }, "containsField": { "type": "string" }, "equals": { "type": "string" }, "equalsField": { "type": "string" }, "startsWith": { "type": "string" }, "startsWithField": { "type": "string" } }, "examples": [ { "limit": 10, "skip": 0, "order": -1, "sort": "name", "contains": "Template name search term", "containsField": "name" } ] } }, "required": [ "options" ], "additionalProperties": false }
Return
Name | Type | Description |
---|---|---|
templatesResult | object | Template and example results from parsed text |
{ "total": 76390137, "skip": 50272144, "limit": 68154682, "list": [ { "templates": [ { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "7f560cbf41471d3e44bfbf99" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "9ea019388dd117f6f038e6a2" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "2853d3eb03607cdb0125bb91" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "9be20cd9d5ace1ce47ebe8a1" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "fe39ce4dd1e2c985a0cdd121" } ], "devices": [ { "name": "device1", "id": "device1" }, { "name": "device1", "id": "device1" }, { "name": "device1", "id": "device1" }, { "name": "device1", "id": "device1" } ] }, { "templates": [ { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "9fff9e9fd5e7c30ebcd916bb" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "04ef4d9d764fcd9cdbb8dbf7" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "3b440d62f0693b6cfbcc2df8" } ], "devices": [ { "name": "device1", "id": "device1" } ] }, { "templates": [ { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "bc4edbf692248f0a0b2c5a31" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "735a35b79f9b52d4ec73f033" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "9c29a0b5fc9975e9c5253455" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "b09dabe3eaae131470132218" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "6debb3f2a5441544481847fc" } ], "devices": [ { "name": "device1", "id": "device1" } ] }, { "templates": [ { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "837151766b7f082ce4a40838" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "83040d9f5dd6301bdef12881" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "99ded78f442f6e8246f9f664" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "4619461705e89e0d96311e93" } ], "devices": [ { "name": "device1", "id": "device1" }, { "name": "device1", "id": "device1" } ] }, { "templates": [ { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "2a50bf79f1bbb9e8c1bcdb51" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "c6191816255f931fb34bfedc" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "b4b3ac47277ea91d9e61d52b" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "fe1059e01f04d8153c8012f8" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "ee5ed3aa7b3cc758ae0662a4" } ], "devices": [ { "name": "device1", "id": "device1" }, { "name": "device1", "id": "device1" } ] } ] }
{ "type": "object", "properties": { "total": { "type": "integer", "minimum": 0 }, "skip": { "type": "integer", "minimum": 0 }, "limit": { "type": "integer", "minimum": 0 }, "list": { "type": "array", "items": { "$ref": "templatesResults" } } } }