Summary
Translate FAML to XPaths
Description
Translate FAML to XPath expressions
Route
POST /smart_template/phcfg/to/xpath
Roles
admin
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
phcfg |
object |
yes |
FAML object |
Copied to Clipboard
{
"phcfg": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "cant",
"severity": "notices"
},
"_keys": [
"lTfBsO"
],
"_children": [
{
"u": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "must",
"severity": "warning"
},
"_value": "K"
}
},
{
"Z": {
"_attr": {
"type": "list",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "must",
"severity": "notices"
}
}
},
{
"G": {
"_attr": {
"type": "leaf",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ncs",
"condition": "must",
"severity": "notices"
}
}
},
{
"W": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ncs",
"condition": "must",
"severity": "warning"
},
"_value": "f"
}
},
{
"L": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ncs",
"condition": "must",
"severity": "error"
},
"_value": "k"
}
}
]
}
}
Return
DetailsExampleSchema
Name |
Type |
Description |
xpath |
array |
Array of xpath expressions |
Copied to Clipboard
[
"/ncs:devices/ncs:device[ncs:ncs:name='os']/ncs:name",
"/ncs:devices/ncs:device[ncs:ncs:name='os']/ncs:name"
]
Copied to Clipboard
{
"type": "array",
"items": {
"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"
]
}
}