Summary
Apply value to errors
Description
Selects the errors and changes their value using values from templateVariables
Route
POST /golden_config/applyTemplateVariables
Roles
admin
engineering
support
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
complianceErrors |
object |
yes |
Array of errors, device and tree information |
templateVariables |
object |
yes |
An array or object of template variables and the values associated with them |
Copied to Clipboard
{
"complianceErrors": {
"errors": [
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"condition": "cant",
"value": 26481886.09721704,
"severity": "notices",
"comparison": "string",
"ruleId": "e9c32617-26fa-1c84-1d9b-b4bb1bb76eb2",
"templateVariable": "HpWDQDU"
}
]
},
"templateVariables": {
"9SkOJ5gZ": "aliquip quis elit nostrud",
"w": "ipsum",
"Ta": "Lorem esse aliqua ut"
}
}
Copied to Clipboard
{
"type": "object",
"properties": {
"complianceErrors": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "complianceError"
},
"minItems": 1
}
},
"required": [
"errors"
]
},
"templateVariables": {
"$ref": "templateVariables"
}
},
"required": [
"complianceErrors",
"templateVariables"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
Name |
Type |
Description |
complianceErrors |
object |
Array of errors, device and tree information |
Copied to Clipboard
{
"errors": [
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "cant",
"value": false,
"severity": "error",
"comparison": "string",
"ruleId": "865b2286-90b8-894c-4fa9-5ab19417a219",
"templateVariable": "MTETGtU"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "cant",
"value": "hnnCCD",
"severity": "error",
"comparison": "regex",
"ruleId": "2d7b2511-3a7d-7ad1-67b1-472b07549a69",
"templateVariable": "DjpngIDuZmI"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "must",
"value": false,
"severity": "notices",
"comparison": "regex",
"ruleId": "84ff0101-c955-1167-58f0-2e2e42c5ffb4",
"templateVariable": "BVutQVO"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"condition": "must",
"value": "Asdr",
"severity": "warning",
"comparison": "regex",
"ruleId": "ea971a92-e548-da4c-aee2-5b0ed1f873b7",
"templateVariable": "Ve"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "must",
"value": "sBvpNTaZAi",
"severity": "warning",
"comparison": "string",
"ruleId": "6a1a22cd-1ee2-bcb3-380c-2e59a15d53d6",
"templateVariable": "RE"
}
]
}
Copied to Clipboard
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "complianceError"
},
"minItems": 1
}
},
"required": [
"errors"
]
}