Make changes to a device group, including changing the name and description, and adding or removing devices.
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
PUT https://thingspace.verizon.com/api/m2m/v1/groups/{accountname}/name/{gname}
You must specify the account name and group name in the resource path.
Parameter Name | Data Type | Description |
---|---|---|
accountname 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. |
The request header must contain a current ThingSpace authorization bearer token and a valid VZ-M2M session token, and must set the content-type to JSON.
Parameter Name | Data Type | Description |
---|---|---|
Authorization required |
string | HTTP Authorization bearer token. |
VZ-M2M-Token required |
string | A valid session token returned by POST /session/login. |
Content-Type required |
string | Must be application/json . |
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.
|
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.
|
{ "newGroupName": "Western region tanks", "groupDescription": "All western region tank level monitors", "devicesToAdd": [ {"kind": "imei", "id": "990003420535537"}, {"kind": "imei", "id": "990005373420535"}, {"kind": "imei", "id": "990003420537355"} ] }
Status 200
Parameter Name | Data Type | Description |
---|---|---|
success | string | A value of “true” indicates that the device group was updated successfully. |
{ "success": true }
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.