Update a Device Group
put
/rest/{versionId}/inventory/deviceMgmt/deviceGroups/{groupId}
Use this (PUT) method to rename a device group in Device Manager. You can also use this (PUT) method to move a device group to another parent group within Device Manager.
Request
Supported Media Types
- application/xml
- application/json
Path Parameters
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
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 update the specified device group by submitting a PUT 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 PUT -d@deviceGroup/updateDeviceGroup.xml -H"Content-Type: application/xml" -H"Accept: application/xml" http://localhost:8080/rest/v1.1/inventory/deviceMgmt/deviceGroups/ID24
Example of Request Body
The following shows an example of the user request body input in XML format.
<?xml version="1.0" encoding="UTF-8"?> <deviceGroup> <parentGroupFullName>HG1</parentGroupFullName> <name>testGroup</name> </deviceGroup>
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK Date: Mon, 18 Sep 2017 20:21:46 GMT Server: Apache X-Frame-Options: SAMEORIGIN Content-Length: 257 Vary: Accept-Encoding Content-Type: application/xml
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"?> <deviceGroup> <fullName>HG1/testGroup</fullName> <id>ID24</id> <isHidden>false</isHidden> <name>testGroup</name> <parentGroupFullName>HG1</parentGroupFullName> <parentGroupId>ID3</parentGroupId> </deviceGroup>