POST /groups
Create a new device group and optionally add devices to the group. Device groups can make it easier to manage similar devices and to get reports on their usage.
See also:
Get a List of Device Groups
Get Information about a Device Group
Update a Device Group
Delete a Device Group
Change Device Custom Fields
POST https://thingspace.verizon.com/api/m2m/v1/groups
None.
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 |
---|---|---|
accountName required |
string | The Verizon billing account that the device group will belong to. An account name is usually numeric, and must include any leading zeros. |
groupName required |
string | The name for the new device group. This name must be unique within the specified account. |
groupDescription required |
string | A description for the device group. |
devicesToAdd optional |
array of deviceId objects | Zero or more devices to add to the device group. You can use POST /devices/actions/list to get a list of all devices in the account. |
kind,
id required for devicesToAdd |
string | The type and value of the device identifier.
|
{
"accountName": "10001234-0001",
"groupName": "NV tanks",
"groupDescription": "Nevada tank level monitors",
"devicesToAdd": [
{"kind": "imei", "identifier", "990003420535537"},
{"kind": "imei", "identifier", "990005373420535"},
{"kind": "imei", "identifier", "990003420537355"}
]
}
Status 200
Parameter Name | Data Type | Description |
---|---|---|
success | Boolean | A value of “true” indicates that the device group was created 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.