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": -62731308.74597004,
"severity": "notices",
"comparison": "string",
"ruleId": "6d4c9eeb-018f-2621-66c6-88c576a52a91",
"templateVariable": "gMUtbqBxV"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "must",
"value": "QQn",
"severity": "warning",
"comparison": "string",
"ruleId": "3df8c006-cbf7-cda3-2bfe-2ded44925694",
"templateVariable": "XerSbZZ"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "cant",
"value": true,
"severity": "warning",
"comparison": "string",
"ruleId": "e0377ba0-1490-558f-03d7-0f6ad621562c",
"templateVariable": "jeE"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "must",
"value": false,
"severity": "warning",
"comparison": "regex",
"ruleId": "9a908b4a-2141-bce0-e536-4081c27fd84a",
"templateVariable": "m"
}
]
},
"templateVariables": {
"E9A": "aute sit adipisicing qui",
"CfEBA201": "sint",
"ucnrWO": "officia dolor et voluptate"
}
}
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:version",
"condition": "must",
"value": "ykLAT",
"severity": "warning",
"comparison": "string",
"ruleId": "b8c00859-3fd8-5d01-0d10-8f3a2d0c9977",
"templateVariable": "entEpQEhgG"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"condition": "cant",
"value": false,
"severity": "warning",
"comparison": "string",
"ruleId": "a2ad67cc-0ada-9c9f-7e24-3172a172fbc9",
"templateVariable": "Jw"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"condition": "cant",
"value": true,
"severity": "error",
"comparison": "regex",
"ruleId": "c40202d3-f7a5-919f-0a10-9229df085690",
"templateVariable": "yUXyRRcJj"
}
]
}
Copied to Clipboard
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "complianceError"
},
"minItems": 1
}
},
"required": [
"errors"
]
}