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": 33789362, "skip": 27762877, "limit": 54605673, "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": "f5d5e80c48233002b5807324" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "6a0326b32723413004a295fe" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "949cd943df683a87b22e1b6e" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "88d2d2184d033affadbe33f4" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "cf21a871f77c5a69da11668f" } ], "devices": [ { "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": "afdd19dbfd27f8a6841949e6" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "8152ab682429ebc683539c67" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "d74f8cc105fc5341cdcc8a28" } ], "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": "3c7e50dfac97021b161278ca" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "1ee7a3ac72978ac943892b73" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "76a1af836d8c41e2086be9c4" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "d3a1d0123192d6fa5a06610d" } ], "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": "c1d75d9cba2e1da56db11bac" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "96221074ff86772eea241ccd" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "4e1e6e8158b12b929c5872ab" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "8e042dac496c39b2ebc84f83" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "15e44368c8c44dc9c39363da" } ], "devices": [ { "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" } } } }