Device Groups

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

PUT
/m2m/v1/groups/{aname}/name/{gname}

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

Authorization

thingspace_oauth VZ-M2M-Token
AuthorizationBearer <token>

This is the ThingSpace token, from Credentials and Tokens is used

In: header

VZ-M2M-Token<token>

M2M Session Token (How to generate an M2M session token?)

In: header

Path Parameters

aname*string

Account name.

gname*string

Group name.

Request Body

application/json

Request to update device group.

Request to update device group.

devicesToAdd?array<>

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.

devicesToRemove?array<>

Zero or more devices to remove from the device group, specified by device ID. The devices will be added to the default device group.

newGroupDescription?string

A new description for the device group. Do not include this parameter to leave the group description unchanged.

newGroupName?string

A new name for the device group. Do not include this parameter if you want to leave the group name unchanged.

Response Body

application/json

application/json

curl -X PUT "https://example.com/m2m/v1/groups/0252012345-00001/name/string" \  -H "Content-Type: application/json" \  -d '{    "newGroupName": "Western region tanks",    "newGroupDescription": "All western region tank level monitors.",    "devicesToAdd": [      {        "kind": "imei",        "id": "990003420535537"      }    ]  }'
{  "success": true}