Summary
Translate XPaths to FAML
Description
Translate XPath expressions to FAML
Route
POST /smart_template/xpath/to/faml
Roles
admin
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
xpath |
array |
yes |
An array of xpath expressions |
Copied to Clipboard
{
"xpath": [
{
"xpath": "/ncs:devices/ncs:device[ncs:ncs:name='os']/ncs:config/ios:hostname itential.com",
"value": "OiwYY",
"ruleId": "914d3913-b76e-c61a-77e9-f2c345595fee"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:ncs:name='os']/ncs:name",
"value": "vh",
"ruleId": "06c9a6d0-97eb-eba5-abd8-d12236fc5efd"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:ncs:name='os']/ncs:config/ios:hostname itential.com",
"value": "glynWnGq",
"ruleId": "274728d1-74e4-f498-d522-15423727d8ee"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:ncs:name='os']/ncs:name",
"value": "cBwHwrAcDSy",
"ruleId": "85ac07ed-b71f-6396-63dc-ce91e2650f28"
}
]
}
Copied to Clipboard
{
"type": "object",
"properties": {
"xpath": {
"type": "array",
"items": {
"type": "object",
"properties": {
"xpath": {
"type": "string",
"enum": [
"/ncs:devices/ncs:device[ncs:ncs:name='os']/ncs:config/ios:hostname itential.com",
"/ncs:devices/ncs:device[ncs:ncs:name='os']/ncs:name"
]
},
"value": {
"type": "string",
"pattern": "[A-Za-z]+"
},
"ruleId": {
"type": "string",
"pattern": "^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$"
}
},
"required": [
"xpath",
"value",
"ruleId"
]
}
}
},
"required": [
"xpath"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
Name |
Type |
Description |
config |
object |
FAML object |
Copied to Clipboard
{
"_attr": {
"type": "leaf",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "cant",
"severity": "notices"
},
"_value": "X"
}