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": "must",
"value": true,
"severity": "error",
"comparison": "string",
"ruleId": "d01e18df-e530-bf35-a7f5-0f4c79e2e75c",
"templateVariable": "YTi"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"condition": "must",
"value": "fjDXkLjHd",
"severity": "warning",
"comparison": "regex",
"ruleId": "6c19828c-6c68-3c12-7f98-bb78a48dfcd4",
"templateVariable": "aQArGrE"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "must",
"value": "kvo",
"severity": "warning",
"comparison": "regex",
"ruleId": "34d0c58d-d16b-bf66-a13c-1f6626e7f9e9",
"templateVariable": "jpUgpzX"
}
]
},
"templateVariables": {
"2aJYed5": "exercitation culpa ullamco",
"tKKWi7GFmk": "veniam nostrud ut sed Duis",
"H6bqixs2rzb": "eu adipisicing nulla qui"
}
}
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": "must",
"value": -22865805.32898377,
"severity": "notices",
"comparison": "regex",
"ruleId": "6470ec0d-c0ec-4e2c-4cdc-567037bd13b6",
"templateVariable": "nFXQonyQJ"
}
]
}
Copied to Clipboard
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "complianceError"
},
"minItems": 1
}
},
"required": [
"errors"
]
}