Get the metadata for a configuration element type
get
/rest/{version}/configuration/elementTypes/metadata
Retrieves the metadata (schema) for the specified configuration element type. The metadata enables the client to know the characteristics of each attribute/sub-element that comprises the element type, so the client can self-validate its instance data before submitting a POST or PUT request. Note that the values for certain metadata tags may vary based on the platform or entitlements of the target system, as certain attribute ranges depend on the platform. The metadata returned for a given element type by one system may not be identical to the metadata returned by a different system.
Request
Path Parameters
-
version:
REST API version string.
Available values: v1.2
Query Parameters
-
elementType:
Specifies the configuration element type whose metadata is being requested.
Header Parameters
-
Authorization:
The value in the Authorization header must be the string "
Bearer {access token}
", where{access token}
is a valid, unexpired token received in response to a prior/rest/{version}/auth/token
request.
Response
200 Response
The metadata for the requested configuration element type is returned in the data section of the response.
400 Response
The request is malformed in some way or is missing required information and therefore cannot be processed.
401 Response
Unauthorized - Request lacks valid authentication credentials.
404 Response
Unsupported versionId in URI, or requested element type not supported.
Examples
Example of Accessing the API with cURL
The following example shows how to get the metadata for a configuration element type by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL.
curl -X GET \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://${SBCIP}/rest/v1.1/configuration/elementTypes/metadata?elementType=access-control"
Example of Accessing the API with Python
The following example shows how to get the metadata for a configuration element type by submitting a GET request on the REST resource using Python. This example assumes you have a valid token stored in the token
variable. For an example of authenticating with Python, see Authenticate.
import requests
headers = { "Accept":"application/xml", "Authorization":"Bearer " + token }
url = "https://" + sbcip + "/rest/v1.1/configuration/elementTypes/metadata?elementType=access-control"
resp = requests.get(url, headers=headers)
Example of the Response Body
The following example shows the contents of the response body in XML format.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<data>
<elementType>access-control</elementType>
<singleInstance>false</singleInstance>
<attributeMetadata>
<name>realm-id</name>
<help>ingress realm</help>
<descriptions>name of realm for access control</descriptions>
<required>true</required>
<key>true</key>
<valueType>string</valueType>
</attributeMetadata>
<attributeMetadata>
<name>description</name>
<help>access control description</help>
<descriptions>access control description</descriptions>
<required>false</required>
<key>false</key>
<valueType>string</valueType>
</attributeMetadata>
<attributeMetadata>
<name>untrust-cac-failure-threshold</name>
<help>allowed maximum cac failures within tolerance window, untrusted</help>
<descriptions>
<description>allowed maximum number of admission failures within tolerance window, untrusted</description>
<description>e.g. 1000</description>
</descriptions>
<required>false</required>
<key>false</key>
<defaultValue>0</defaultValue>
<valueType>uint</valueType>
<validNumericRanges>
<validNumericRange>
<min>0</min>
<max>4294967295</max>
</validNumericRange>
</validNumericRanges>
</attributeMetadata>
</data>
<messages/>
<links/>
</response>