Update Device Group

Update a Device Group:
PUT /groups/{aname}/name/{gname}

Make changes to a device group, including changing the name and description, and adding or removing devices.

Contents

See also:
Get a List of Device Groups
Get Information about a Device Group
Create a Device Group
Delete a Device Group
Change Device Custom Fields

Request Components

HTTP Request

PUT https://thingspace.verizon.com/api/m2m/v1/groups/{aname}/name/{gname}

Resource and Query Parameters

You must specify the account name and group name in the resource path.

Parameter Name Data Type Description
aname
required
string The name of the account that contains the device group that you want to update. An account name is usually numeric, and must include any leading zeros.
gname
required
string The name of the device group that you want to update.

Header Parameters

The request header must contain the current session token.

Parameter Name Data Type Description
VZ-M2M-Token
required
string A valid session token returned by POST /session/login.

Request Body

The information about the device group that you want to create.

Parameter Name Data Type Description
newGroupName
optional
string A new name for the device group. Do not include this parameter if you want to leave the group name unchanged.
newGroupDescription
optional
string A new description for the device group. Do not include this parameter to leave the group description unchanged.
devicesToAdd
optional
array of deviceId objects Zero or more devices to add to the device group, specified by device ID. The devices will be removed from their current device groups. You can use POST /devices/actions/list to get a list of all devices in the account.
kind,
id

required for devicesToAdd
strings The type and value of the device identifier.
  • ESN - decimal, 11 digits
  • ICCID - decimal, up to 20 digits
  • IMEI - decimal, up to 15 digits
  • MDN - decimal, 10 digits
  • MEID - hexadecimal, 14 characters
  • MSISDN - decimal, 11 digits
devicesToRemove
optional
array of deviceId objects Zero or more devices to remove from the device group, specified by device ID. The devices will be added to the default device group.
kind,
id

required for devicesToRemove
strings The type and value of the device identifier.
  • ESN - decimal, 11 digits
  • ICCID - decimal, up to 20 digits
  • IMEI - decimal, up to 15 digits
  • MDN - decimal, 10 digits
  • MEID - hexadecimal, 14 characters
  • MSISDN - decimal, 11 digits

Example Request Body

{
  "newGroupName": "Western region tanks",
  "groupDescription": "All western region tank level monitors",
  "devicesToAdd": [
    {"kind": "imei", "id": "990003420535537"},
    {"kind": "imei", "id": "990005373420535"},
    {"kind": "imei", "id": "990003420537355"}
  ]
}

Success Responses

Status 200

Parameter Name Data Type Description
success string A value of “true” indicates that the device group was updated successfully.

Example Success Response

{
  "success": true
}

Failure Responses

Status 400

All error messages are returned in this format:

{
  "errorCode": "error code string",
  "errorMessage": "error message string"
}

Error codes and messages are listed on the Error Messages page, along with explanations and suggestions for corrective actions.

Try It Out!