Get Device Groups

Retrieve a List of Device Groups:
GET /groups/{aname}

Returns a list of all device groups in a specified account.

Contents

See also:
Get Information about a Device Group
Update a Device Group
Create a Device Group
Delete a Device Group

Request Components

HTTP Request

GET https://thingspace.verizon.com/api/m2m/v1/groups/{aname}

Resource Path and Query Parameters

You must include the account name in the path.

Parameter Name Data Type Description
aname
required
string The name of the account for which you want a list of device groups. An account name is usually numeric, and must include any leading zeros.

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

None.

Success Responses

Status 200 A successful request returns an array of device group objects:

Parameter Name Data Type Description
name string The name of the device group.
description string The description of the device group.
isDefaultGroup boolean Identifies the default device group.
extendedAttributes arry of extendedAttribute objects Any extended attributes for the device group, as Key and Value pairs.
key string The key for an extended attribute.
value string The value of an extended attribute.

Example Success Response

[
  {
    "name": "Unassigned Devices",
    "description": "All devices that are not in another device group.",
    "isDefaultGroup": true,
    "extendedAttributes": null
  },
  {
    "name": "West Coast Devices",
    "description": "",
    "isDefaultGroup": false,
    "extendedAttributes": null
  },
  {
    "name": "East Coast Devices",
    "description": "",
    "isDefaultGroup": false,
    "extendedAttributes": null
  }
]

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!