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": "CV",
"severity": "notices",
"comparison": "string",
"ruleId": "cce8d313-3d48-d5ed-fc09-dcd2e46f591b",
"templateVariable": "ITDgFJhfMZv"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "cant",
"value": 38965152.78072888,
"severity": "warning",
"comparison": "string",
"ruleId": "d0b32f1b-723f-958c-d046-fc5e20d75227",
"templateVariable": "hlJlOf"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "cant",
"value": false,
"severity": "warning",
"comparison": "string",
"ruleId": "4c842cdc-a195-0c0b-7b3a-c12633d35904",
"templateVariable": "mhkdEpf"
}
]
},
"templateVariables": {
"0Uevsvm4": "cillum",
"8IR6SjEQ": "eu",
"EmEPO": "in velit dolore"
}
}
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": "SZd",
"severity": "error",
"comparison": "regex",
"ruleId": "90859b4b-ccba-8db4-5f0d-c9eea1e99d15",
"templateVariable": "xgbRbMrCa"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "cant",
"value": "U",
"severity": "warning",
"comparison": "regex",
"ruleId": "2d95e538-a4c0-2a5d-e089-5acd5273d143",
"templateVariable": "supV"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"condition": "must",
"value": true,
"severity": "warning",
"comparison": "regex",
"ruleId": "077ac95f-2246-cc90-ee6c-ff5070ee8790",
"templateVariable": "WQAv"
}
]
}
Copied to Clipboard
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "complianceError"
},
"minItems": 1
}
},
"required": [
"errors"
]
}