Summary
Get templates filtered
Description
Get filtered list of templates
Route
GET /template_builder/filterTemplates
Roles
admin
other
readonly
apiread
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
options |
object |
yes |
Options for query parameters |
Copied to Clipboard
{
"options": {
"limit": 10,
"skip": 0,
"order": -1,
"sort": "name",
"contains": "Template name search term",
"containsField": "name"
}
}
Copied to Clipboard
{
"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
DetailsExampleSchema
Name |
Type |
Description |
templatesResult |
object |
Template and example results from parsed text |
Copied to Clipboard
{
"total": 97038512,
"skip": 93253253,
"limit": 17668064,
"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": "99839d5bfe2c2efbc4f551b5"
},
{
"name": "My Template",
"device": "Device Group A",
"command": "show hostname",
"template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record",
"text": "hostname",
"type": "custom",
"_id": "821e48e779743cd1c4440eb9"
}
],
"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": "e9bb14ee4d730a0637d45d4b"
},
{
"name": "My Template",
"device": "Device Group A",
"command": "show hostname",
"template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record",
"text": "hostname",
"type": "custom",
"_id": "08699e9f3c0f9ffb228ca31a"
},
{
"name": "My Template",
"device": "Device Group A",
"command": "show hostname",
"template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record",
"text": "hostname",
"type": "custom",
"_id": "e4200a9c3773571ce6c397df"
},
{
"name": "My Template",
"device": "Device Group A",
"command": "show hostname",
"template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record",
"text": "hostname",
"type": "custom",
"_id": "6b916a2f65d916b9f8d95a3a"
},
{
"name": "My Template",
"device": "Device Group A",
"command": "show hostname",
"template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record",
"text": "hostname",
"type": "custom",
"_id": "1e32ea3c0ea3bf3cca9389ae"
}
],
"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": "e872b7becd9ded1bb568063c"
},
{
"name": "My Template",
"device": "Device Group A",
"command": "show hostname",
"template": "Value HOSTNAME (.+?)\n\nStart\n ^${HOSTNAME}\\s*$$ -> Record",
"text": "hostname",
"type": "custom",
"_id": "d00ae42d6d3019a9ef158b81"
}
],
"devices": [
{
"name": "device1",
"id": "device1"
},
{
"name": "device1",
"id": "device1"
},
{
"name": "device1",
"id": "device1"
},
{
"name": "device1",
"id": "device1"
},
{
"name": "device1",
"id": "device1"
}
]
}
]
}
Copied to Clipboard
{
"type": "object",
"properties": {
"total": {
"type": "integer",
"minimum": 0
},
"skip": {
"type": "integer",
"minimum": 0
},
"limit": {
"type": "integer",
"minimum": 0
},
"list": {
"type": "array",
"items": {
"$ref": "templatesResults"
}
}
}
}