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:hostname",
"condition": "cant",
"value": true,
"severity": "notices",
"comparison": "string",
"ruleId": "bbd8edf2-6622-520e-c5f7-e0fba7397f23",
"templateVariable": "NQD"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "cant",
"value": "ZRlhSxVe",
"severity": "notices",
"comparison": "regex",
"ruleId": "cc35819a-7628-2324-b916-865c8f895dbb",
"templateVariable": "xsiKUXkQ"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "cant",
"value": true,
"severity": "notices",
"comparison": "regex",
"ruleId": "19366754-ff78-8ec9-6cc5-1bc2c606cdcb",
"templateVariable": "jvrUNmaKDl"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "must",
"value": "w",
"severity": "notices",
"comparison": "regex",
"ruleId": "4f03781d-736c-eacd-771a-51e45aaba651",
"templateVariable": "D"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "cant",
"value": -20635886.31712374,
"severity": "notices",
"comparison": "string",
"ruleId": "03a58df0-1447-ee24-1636-989fa1424f53",
"templateVariable": "oBfehsVei"
}
]
},
"templateVariables": {
"C8": "nostrud enim laborum",
"P39QW4c": "pariatur",
"ERpj": "fugiat sunt dolor in"
}
}
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": 80314949.66299361,
"severity": "error",
"comparison": "regex",
"ruleId": "3448d477-2c12-2eda-fcb9-828dbcad2bf9",
"templateVariable": "u"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"condition": "cant",
"value": 30746339.204893887,
"severity": "warning",
"comparison": "string",
"ruleId": "43555da9-ed0c-0045-ccb1-511eb19742e9",
"templateVariable": "oGQ"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"condition": "must",
"value": true,
"severity": "error",
"comparison": "regex",
"ruleId": "d27adf95-1024-c07b-a47f-2f292416b223",
"templateVariable": "KEvb"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "cant",
"value": true,
"severity": "notices",
"comparison": "string",
"ruleId": "d722a473-dbd7-7d13-25a0-31c173f3526d",
"templateVariable": "pywfXVSpF"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "must",
"value": "VKb",
"severity": "warning",
"comparison": "regex",
"ruleId": "bd386c89-2901-f015-10a0-4442c64ac835",
"templateVariable": "K"
}
]
}
Copied to Clipboard
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "complianceError"
},
"minItems": 1
}
},
"required": [
"errors"
]
}