Get Existing Device Groups
get
/rest/{versionId}/inventory/deviceMgmt/deviceGroups
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
Supported Media Types
- application/xml
- application/json
200 Response
successful operation
Nested Schema : parameter
Type:
Show Source
object
-
description(optional):
string
-
label(optional):
string
-
maxValue(optional):
integer(int64)
-
minValue(optional):
integer(int64)
-
name(optional):
string
-
readOnly(optional):
boolean
Default Value:
false
-
validValues(optional):
array validValue
-
value(optional):
string
-
valueList(optional):
array validLists
-
valueType(optional):
string
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
The following example shows how to display existing device groups with query parameters by submitting a GET request on the REST resource using cURL. For more information about cURL, see Use cURL
Example of cURL Data
The following shows an example of cURL data sent with the request.
curl -v -b sessionid.txt -X GET -H"Content-Type: application/xml" -H"Accept: application/xml" http://localhost:8080/rest/v1.1/inventory/deviceMgmt/deviceGroups
Example of Response Body
The following example shows the contents of the response body in XML format.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <deviceGroups> <deviceGroup> <fullName>Home</fullName> <id>ID1</id> <isHidden>false</isHidden> <name>Home</name> <parentGroupId>ID0</parentGroupId> </deviceGroup> <deviceGroup> <fullName>HG1</fullName> <id>ID3</id> <isHidden>false</isHidden> <name>HG1</name> <parentGroupId>ID0</parentGroupId> </deviceGroup> <deviceGroup> <fullName>HG1/HG2</fullName> <id>ID4</id> <isHidden>false</isHidden> <name>HG2</name> <parentGroupFullName>HG1</parentGroupFullName> <parentGroupId>ID3</parentGroupId> </deviceGroup> <deviceGroup> <fullName>HG3</fullName> <id>ID20</id> <isHidden>false</isHidden> <name>HG3</name> <parentGroupId>ID0</parentGroupId> </deviceGroup> <deviceGroup> <fullName>HG3/HG4</fullName> <id>ID21</id> <isHidden>false</isHidden> <name>HG4</name> <parentGroupFullName>HG3</parentGroupFullName> <parentGroupId>ID20</parentGroupId> </deviceGroup> </deviceGroups>