Get Additional Attribute Metadata

post

/rest/{versionId}/configuration/device-configs/{deviceId}/element-types/attribute-metadata

Use this (POST) method to retrieve additional meta-data information about a targeted attribute for a targeted configuration element. OSDMC 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 summary it supports, the range of summaries, 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

Retrieved attribute metadata for device configuration with deviceId successfully.

400 Response

The user input is invalid.

401 Response

The user is unauthorized.

403 Response

The user doesn't have the required permission.

404 Response

The object (resource URI, device, and so on) of your input request cannot be found.

500 Response

An internal server error has occurred while processing the request.
Back to Top

Examples

Examples of Accessing the API

See Authenticate page to acquire a token.

The following example shows how to use curl to get Additional Attribute Metadata.

curl -X POST \
    -d @request.json \
    -H @auth_header.txt \
    "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/configuration/device-configs/<deviceId>/element-types/attribute-metadata"

The following example shows how to use Python to get Additional Attribute Metadata.

import requests
import json
headers = {
	"Accept": "application/json",
	"Authorization": "Bearer <auth-token>"
}
with open("request.json") as f: data = json.load(f)
url  = "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/configuration/device-configs/<deviceId>/element-types/attribute-metadata"
resp = requests.post(url, headers=headers, data=data)

Note:

Use the Get a List of Devices Associated with Config Manager API to find the deviceId parameter.

Example of the Request Body

The following shows an example of the contents of the request file sent as the request body.

{
  "elementTypePath": "accessControl",
  "attributeName": "maxMsgThreshold"
}

Example of the Response Body

The following example shows the contents of the response body.

{
  "cliName": "maximum-signal-threshold",
  "defaultValue": "0",
  "key": false,
  "name": "maxMsgThreshold",
  "required": false,
  "validNumericRange": [
    "0-4294967295"
  ],
  "valueType": "NUMERIC"
}

Example 2 of Accessing this API

This example shows getting additional attribute metadata.

curl -X POST \
    -d @request.json \
    -H @auth_header.txt \
    "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/configuration/device-configs/<deviceId>/element-types/attribute-metadata"

The following shows an example of the request body.

{
  "elementTypePath": "mediaPolicy/tosSetting",
  "attributeName": "mediaType"
}

The following shows an example response.

{
  "cliName": "media-type",
  "defaultValue": "",
  "key": true,
  "name": "mediaType",
  "required": true,
  "valueType": "STRING"
}
Back to Top