Summary
Translate XPaths to FAML
Description
Translate XPath expressions to FAML
Route
POST /smart_template/xpaths/to/faml
Roles
admin
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
xpaths |
object |
yes |
Array of objects that contain xpath expressions and values |
Copied to Clipboard
{
"xpaths": [
{
"xpath": "/ncs:devices/ncs:device[ncs:ncs:name='os']/ncs:name",
"value": "SpbXwV",
"ruleId": "825e04db-37b2-2ee6-332a-655c0eb02abb"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:ncs:name='os']/ncs:config/ios:hostname itential.com",
"value": "sGRGRmArDSN",
"ruleId": "6eb2e9f3-4997-3653-03fb-7062166bf790"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:ncs:name='os']/ncs:name",
"value": "DAIHuFBtRk",
"ruleId": "dff5e357-cbc8-aac3-0252-4c5683bb2c4c"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:ncs:name='os']/ncs:config/ios:hostname itential.com",
"value": "iIlDsF",
"ruleId": "4dc3d303-5e5c-2437-2cb0-24e53c2ad89a"
},
{
"xpath": "/ncs:devices/ncs:device[ncs:ncs:name='os']/ncs:config/ios:hostname itential.com",
"value": "iNFbL",
"ruleId": "a0db8730-1085-398d-ef5e-ad146caecbee"
}
]
}
Copied to Clipboard
{
"type": "object",
"properties": {
"xpaths": {
"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": [
"xpaths"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
Name |
Type |
Description |
config |
object |
Pronghorn Config object |
Copied to Clipboard
"\"ios:hostname\": { \"_attr\": {\"type\": \"leaf\",\"ns\": \"http://tail-f.com/ns/ncs\", \"prefix\": \"ios\", \"xpath\": \"/ncs:devices/ncs:device[ncs:name='os']/ncs:config/ios:hostname\", \"condition\": \"must\", \"severity\": \"error\" }, \"_value\": \"itential.com\" }"
Copied to Clipboard
{
"type": "string",
"enum": [
"\"ios:hostname\": { \"_attr\": {\"type\": \"leaf\",\"ns\": \"http://tail-f.com/ns/ncs\", \"prefix\": \"ios\", \"xpath\": \"/ncs:devices/ncs:device[ncs:name='os']/ncs:config/ios:hostname\", \"condition\": \"must\", \"severity\": \"error\" }, \"_value\": \"itential.com\" }"
]
}