Summary
Applies value to the errors from templateVariables
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": -64289429.56085311,
"severity": "warning",
"comparison": "string",
"ruleId": "b41fa78a-48a7-0b2b-995a-2a0a8fd4907f",
"templateVariable": "qbm"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:version",
"condition": "must",
"value": "vyETDZgkPbH",
"severity": "notices",
"comparison": "string",
"ruleId": "2be56403-018c-0973-e1b7-baaca9a217c4",
"templateVariable": "oEjuf"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "must",
"value": -48949212.04624501,
"severity": "error",
"comparison": "regex",
"ruleId": "c4bfcfbc-494f-e1cf-6d35-857a848c54c2",
"templateVariable": "zFUFpg"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "cant",
"value": -70643942.18609662,
"severity": "notices",
"comparison": "string",
"ruleId": "00a1c0f3-bccf-4a0d-685d-161dda27e4ec",
"templateVariable": "g"
},
{
"query": "/ncs:devices/ncs:device[ncs:name='ios0']/ncs:config/ios:hostname",
"condition": "cant",
"value": "rKnynXGtTw",
"severity": "notices",
"comparison": "regex",
"ruleId": "64fa626a-a663-7e78-7e50-819560ac2f78",
"templateVariable": "xGNpvq"
}
]
},
"templateVariables": {
"6": "elit Lorem pariatur ut irure",
"A2mc": "Duis amet",
"cLdX31G3uhI": "consequat"
}
}
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": 66524514.44378126,
"severity": "error",
"comparison": "regex",
"ruleId": "85e2b55b-9bb1-89af-ff5f-7670f6a5ad78",
"templateVariable": "B"
}
]
}
Copied to Clipboard
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"$ref": "complianceError"
},
"minItems": 1
}
},
"required": [
"errors"
]
}