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": "ggQ",
"severity": "notices",
"comparison": "string",
"ruleId": "d4048340-77e6-f28c-6e56-e94cd7a7dc1c",
"templateVariable": "sp"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "cant",
"value": false,
"severity": "notices",
"comparison": "string",
"ruleId": "4af333f8-a18f-a8ce-5034-5caa1f2c7be6",
"templateVariable": "xoOTuzAZrYK"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "must",
"value": -15392208.256642267,
"severity": "notices",
"comparison": "string",
"ruleId": "2a0242f9-3d54-1802-d6a2-694aa4d33428",
"templateVariable": "D"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "must",
"value": 29375532.451338142,
"severity": "notices",
"comparison": "regex",
"ruleId": "72677aad-a348-e336-842a-18feec210530",
"templateVariable": "Rm"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "cant",
"value": true,
"severity": "warning",
"comparison": "string",
"ruleId": "329c49bb-4bbc-c7e6-7961-c75befbe6503",
"templateVariable": "lWcdd"
}
]
},
"templateVariables": {
"m": "sit in amet et",
"nLnEwX9c": "cillum in",
"dd3E2p7P": "sunt enim aliquip"
}
}
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": -76833365.99056427,
"severity": "warning",
"comparison": "string",
"ruleId": "c808a626-692a-33b7-0e29-4babfcf7ec6f",
"templateVariable": "hiPJ"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "must",
"value": -23341852.71181965,
"severity": "error",
"comparison": "regex",
"ruleId": "c1061a7e-5484-1fbc-1392-3c01e62f72c5",
"templateVariable": "LSOajczbU"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "must",
"value": true,
"severity": "error",
"comparison": "string",
"ruleId": "07f5c347-b1ba-8f84-d6f9-0a471478213a",
"templateVariable": "AZGp"
}
]
}
Copied to Clipboard
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "complianceError"
},
"minItems": 1
}
},
"required": [
"errors"
]
}