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": -79971653.7299262,
"severity": "error",
"comparison": "regex",
"ruleId": "77465fc5-2932-3e44-890f-aa00778d7930",
"templateVariable": "JnuNLTwOGyA"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"condition": "must",
"value": -25225152.61892338,
"severity": "notices",
"comparison": "regex",
"ruleId": "92c6a1ea-76b0-99d6-451f-b369d84db69c",
"templateVariable": "Ca"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "cant",
"value": "NCRqzbNvDb",
"severity": "error",
"comparison": "regex",
"ruleId": "980162f4-af2f-5045-4176-68b7b1534988",
"templateVariable": "YypPszEDoNu"
}
]
},
"templateVariables": {
"rwSagOxbt": "do elit sit",
"SIu5R1iN6n": "aute cillum dolor",
"ay0e": "ut cillum pariatur"
}
}
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": "must",
"value": 40170491.87680417,
"severity": "notices",
"comparison": "regex",
"ruleId": "a6231f7f-aedf-80c9-3ce6-26ee84840552",
"templateVariable": "slBysELqiT"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"condition": "cant",
"value": false,
"severity": "warning",
"comparison": "string",
"ruleId": "c72c20ba-fa9c-cbb9-6262-95d23dd57847",
"templateVariable": "UQwrxvRVQn"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "cant",
"value": true,
"severity": "error",
"comparison": "regex",
"ruleId": "6413988b-d10d-caa9-563e-31192b78b63f",
"templateVariable": "r"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "cant",
"value": "vfnipe",
"severity": "warning",
"comparison": "string",
"ruleId": "d0f709bd-586f-21d6-5f41-d604a3e432a6",
"templateVariable": "tOVOKTmAh"
}
]
}
Copied to Clipboard
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "complianceError"
},
"minItems": 1
}
},
"required": [
"errors"
]
}