Get Additional Attribute Metadata
post
/{versionId}/configuration/deviceConfigs/{deviceId}/elementTypes/attributeMetadata
Retrieve additional metadata information about a targeted attribute for a targeted configuration element. SDM configuration support is model driven to allow a user to query any attribute supported by a release, and get additional information on that attribute such as what type of values it supports, the range of values, if it is a required attribute, if the attribute is part of a primary or foreign key relationship, and so on. A client can be configured use this metadata to describe the characteristics of all attributes supported by a device release.
Request
Path Parameters
Back to Top
Response
200 Response
400 Response
The user input is invalid.
401 Response
The session ID is invalid.
404 Response
The object (resource URI, device, and so on) of your input request cannot be found.
Examples
Examples of Accessing the API
See Authenticate for how to acquire a session cookie.
The following example shows how to get additional attribute metadata using curl.
curl -X POST \
-b sessionid.txt \
--header "Accept: application/xml" \
--header "Content-Type: application/xml" \
"https://example.com:8443/rest/v1.3/configuration/deviceConfigs/{deviceId}/elementTypes/attributeMetadata"
The following example shows how to get additional attribute metadata using Python.
import requests
from lxml import etree
url = "https://example.com:8443/rest/v1.3/configuration/deviceConfigs/{deviceId}/elementTypes/attributeMetadata"
headers = { "Accept":"application/xml", "Content-Type: application/xml", "Cookie":cookie }
data = etree.tostring(etree.parse("request.json"))
resp = requests.post(url, headers=headers, data=data)
Example of the Request Body
The following example shows the contents of the request body in XML.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<attributeTypeRequest>
<attributeName>access</attributeName>
<elementTypePath>accessControl</elementTypePath>
</attributeTypeRequest>
The following example shows the contents of the request body in JSON.
{
"attributeName": "customerRoute",
"elementTypePath": "surrogateAgent"
}
Example of the Response Body
The following example shows the contents of the response body in XML.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<attributeMetadata>
<cliName>access</cliName>
<defaultValue>permit</defaultValue>
<enumeratedValues>deny</enumeratedValues>
<enumeratedValues>permit</enumeratedValues>
<key>false</key>
<name>access</name>
<required>false</required>
<valueType>ENUMERATED_VALUE</valueType>
</attributeMetadata>
The following example shows the contents of the response body in JSON.
{
"cliName": "customer-next-hop",
"defaultValue": "",
"key": false,
"name": "customerRoute",
"required": true,
"valueType": "STRING"
}