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:ip/ios:default-gateway",
"condition": "cant",
"value": true,
"severity": "error",
"comparison": "regex",
"ruleId": "fc182147-cf4e-ce13-4b2c-b10074bd03f9",
"templateVariable": "psuXu"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "must",
"value": "oNZIWiXV",
"severity": "error",
"comparison": "regex",
"ruleId": "16188d64-d570-01fb-5ef4-3ed150ff7d9a",
"templateVariable": "oZCTirCoFP"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "must",
"value": 65303631.541249126,
"severity": "error",
"comparison": "string",
"ruleId": "d0b425a8-4846-de03-5f41-09ceca55761e",
"templateVariable": "XfZINrPuOT"
}
]
},
"templateVariables": {
"9l": "eiusmod id est Duis ut",
"2kr3": "dolore",
"Y": "Ut pariatur Duis consectetur"
}
}
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": false,
"severity": "error",
"comparison": "string",
"ruleId": "8dbfab3b-59da-b320-94eb-b49b7a1893f3",
"templateVariable": "MHt"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "cant",
"value": false,
"severity": "notices",
"comparison": "regex",
"ruleId": "7fac2156-aeae-7a14-b7ea-fbc5734cffde",
"templateVariable": "SfgqsUEDV"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "cant",
"value": true,
"severity": "warning",
"comparison": "regex",
"ruleId": "d76eff21-dee0-d6fa-e433-c9196411bf70",
"templateVariable": "WEBfBQzkWpR"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"condition": "must",
"value": -78952417.74119745,
"severity": "error",
"comparison": "regex",
"ruleId": "105dca04-3217-7ccf-940d-7f0428859dba",
"templateVariable": "PKMlhYEa"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "cant",
"value": 33599652.50746924,
"severity": "warning",
"comparison": "regex",
"ruleId": "5a1572d1-0f9f-0900-c4b5-8dee967d7d02",
"templateVariable": "vhfnB"
}
]
}
Copied to Clipboard
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "complianceError"
},
"minItems": 1
}
},
"required": [
"errors"
]
}