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": "must",
"value": 17900480.962471515,
"severity": "error",
"comparison": "regex",
"ruleId": "2e5a6720-49b0-d71e-0336-d1410bd2d2ad",
"templateVariable": "ilLZLXC"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"condition": "must",
"value": "avK",
"severity": "error",
"comparison": "string",
"ruleId": "c478ebe6-e403-aa89-f7bd-5c63df9dd12a",
"templateVariable": "pqwQsbvBvm"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "must",
"value": "ydDQJlYq",
"severity": "warning",
"comparison": "regex",
"ruleId": "d4b66aa7-3662-f85f-e0ca-fbffd74b3704",
"templateVariable": "nf"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "must",
"value": true,
"severity": "notices",
"comparison": "string",
"ruleId": "d8170ea4-a9cd-cbfc-6f34-e4f1703874b4",
"templateVariable": "RRjySDY"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "cant",
"value": "lKWSLW",
"severity": "error",
"comparison": "regex",
"ruleId": "13779edb-8d73-c877-e563-e982474fd5ba",
"templateVariable": "MlSvZ"
}
]
},
"templateVariables": {
"z": "Excepteur",
"zx": "Excepteur ex consectetur laborum velit",
"p5": "ut amet"
}
}
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": "cant",
"value": "dEb",
"severity": "error",
"comparison": "regex",
"ruleId": "65dc289d-a2a4-e973-6f30-5f0d57fd9c77",
"templateVariable": "QbyeQacgZ"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:ip/ios:default-gateway",
"condition": "must",
"value": "SgXqT",
"severity": "notices",
"comparison": "string",
"ruleId": "df7a209c-b09e-870d-9a71-f655b3efa5c6",
"templateVariable": "wKIMoJPqK"
}
]
}
Copied to Clipboard
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "complianceError"
},
"minItems": 1
}
},
"required": [
"errors"
]
}