Add a Device Group

post

/rest/{versionId}/inventory/deviceMgmt/deviceGroups

Use this (POST) method to add a device group to Device Manager. A device group is a containment group that can contain other device groups or devices maintained in Network Functions (NFs).

Request

Supported Media Types
Path Parameters
Body ()
Root Schema : deviceGroup
Type: object
Show Source
Nested Schema : parameter
Type: array
Show Source
Nested Schema : parameter
Type: object
Show Source
Nested Schema : validValue
Type: array
Show Source
Nested Schema : validLists
Type: array
Show Source
Back to Top

Response

Supported Media Types

200 Response

successful operation
Body ()
Root Schema : deviceGroup
Type: object
Show Source
Nested Schema : parameter
Type: array
Show Source
Nested Schema : parameter
Type: object
Show Source
Nested Schema : validValue
Type: array
Show Source
Nested Schema : validLists
Type: array
Show Source

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.
Back to Top

Examples

The following example shows how to add a device group by submitting a POST 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 POST -d@deviceGroup/createDeviceGroup.xml -H"Content-Type: application/xml" -H"Accept: application/xml" http://localhost:8080/rest/v1.1/inventory/deviceMgmt/deviceGroups

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/HG2</parentGroupFullName>
   <name>testDeviceGroup</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 19:41:15 GMT
Server: Apache
X-Frame-Options: SAMEORIGIN
Content-Length: 277
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/HG2/testDeviceGroup</fullName>
  <id>ID24</id>
  <isHidden>false</isHidden>
  <name>testDeviceGroup</name>
  <parentGroupFullName>HG1/HG2</parentGroupFullName>
  <parentGroupId>ID4</parentGroupId>
</deviceGroup>
Back to Top