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": "gHK",
"ruleId": "c5c92c5c-1213-d759-64c5-646c978d005d"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:ncs:name='os']/ncs:config/ios:hostname itential.com",
"value": "BirV",
"ruleId": "f9600649-7979-0d01-a48a-0a0510720635"
}
]
}
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": "list",
"ns": "http://tail-f.com/ns/ncs",
"prefix": "ios",
"condition": "cant",
"severity": "notices"
},
"_keys": [
"EfI",
"xRcbVku",
"ZWaKCeyc",
"yjMPVgIw",
"uNcNxR"
],
"_children": [
{
"K": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ncs",
"condition": "must",
"severity": "error"
},
"_value": "s"
}
},
{
"y": {
"_attr": {
"type": "keyword",
"ns": "http://tail-f.com/ns/config/1.0",
"prefix": "ncs",
"condition": "cant",
"severity": "notices"
}
}
}
]
}