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": 18961155, "skip": 59103670, "limit": 80654545, "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": "36fd77f5ef4677c6b8c8d3a4" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "91fdc84c6a94b63fa636a523" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "874b86997610a50050ec225d" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "6be681767ab340083b42d4df" } ], "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": "c6d8acc76d7fa1a31a710d25" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "789f328b9a0f05c32af39727" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "88f90a2ed642eeb5ba0179b5" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "f048cae23de61d7c315762ac" } ], "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": "a8880a1066aae17eb9f1df85" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "139616741bbd42325e961e93" } ], "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": "37396b18016f88102934e0fd" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "ee0fe53c3e65405d864da291" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "ec3e1f8e9e507f71e21c4c7e" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "00fe13bfd4524db1d11840b2" }, { "name": "My Template", "device": "Device Group A", "command": "show hostname", "template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record", "text": "hostname", "type": "custom", "_id": "410203c9c42661066c54c259" } ], "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" } } } }