Get Existing Device Groups
get
/rest/{versionId}/inventory/device-mgmt/device-groups
Use this (GET) method to retrieve all device groups created and maintained in Device Manager. Folder groups that are defined within Network Function (NF) device groups are not returned.
Request
Path Parameters
Query Parameters
Back to Top
Response
200 Response
All device groups retrieved successfully.
400 Response
The user input is invalid.
401 Response
The user is not authorized.
403 Response
The user does not have permission for the attempted action.
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.
Examples
Examples of Accessing the API
See Authenticate page to acquire a token.
The following example shows how to use curl to get Existing Device Groups.
curl -X GET \
-H @auth_header.txt \
"https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/inventory/device-mgmt/device-groups"The following example shows how to use Python to get Existing Device Groups.
import requests
headers = { "Authorization": "Bearer <auth-token>" }
url = "https://<tenant-url>/<tenant-name>/osdmc/ums/rest/<versionId>/inventory/device-mgmt/device-groups"
resp = requests.get(url, headers=headers)Example of the Response Body
The following example shows the contents of the response body.
{
"deviceGroups": [
{
"fullName": "Home",
"id": "1",
"name": "Home",
"parentGroupId": "ID0"
},
{
"fullName": "qa-test",
"id": "161",
"name": "qa-test",
"parentGroupId": "ID0"
},
{
"fullName": "testGroup",
"id": "23",
"name": "testGroup",
"parentGroupId": "ID0"
},
{
"fullName": "qa-test/sbc-test",
"id": "162",
"name": "sbc-test",
"parentGroupFullName": "qa-test",
"parentGroupId": "161"
},
{
"fullName": "qa-test/devgrp1",
"id": "181",
"name": "devgrp1",
"parentGroupFullName": "qa-test",
"parentGroupId": "161"
}
]
}