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": true,
"severity": "error",
"comparison": "regex",
"ruleId": "e914edf0-0583-6a75-3606-820707b81931",
"templateVariable": "SbSuYKCmPMA"
}
]
},
"templateVariables": {
"7A": "ea exercitation sunt",
"UWt1MOQx": "ut est Duis adipisicing sunt",
"1uGTPKWaGe3": "ex aliquip sit in et"
}
}
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:ip/ios:default-gateway",
"condition": "cant",
"value": "QQdtrdPEBqo",
"severity": "warning",
"comparison": "string",
"ruleId": "48adca4a-6c26-dfe7-2052-81e628822b58",
"templateVariable": "NNHlcKLC"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "must",
"value": true,
"severity": "error",
"comparison": "string",
"ruleId": "e1e1598b-f411-531e-57df-e6169cbbe33d",
"templateVariable": "dEQqXIlQTpr"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "must",
"value": false,
"severity": "warning",
"comparison": "string",
"ruleId": "5f387644-1457-0bef-7f9b-a6cfbb772bae",
"templateVariable": "FqbO"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"condition": "cant",
"value": "O",
"severity": "warning",
"comparison": "regex",
"ruleId": "17b44e4f-7efd-69e3-b024-7f8d205cb225",
"templateVariable": "ZMPaEkC"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "must",
"value": false,
"severity": "error",
"comparison": "regex",
"ruleId": "c213902b-3270-f4df-7d41-75528effa993",
"templateVariable": "TOOiTH"
}
]
}
Copied to Clipboard
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "complianceError"
},
"minItems": 1
}
},
"required": [
"errors"
]
}