Get Device Group Information

Get Information about a Device Group:
GET /groups/{aname}/name/{gname}

Returns the name, description, and list of devices in a device group.

Contents

See also:
Get a List of Device Groups
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}/name/{gname}?next={deviceId}

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. An account name is usually numeric, and must include any leading zeros.
gname
required
string The name of the device group.
next
optional
int64 (Output paging parameter) Only return information about devices that have an ID greater than this value.
  • For the first request, don’t include this parameter in order to retrieve the devices with the smallest IDs.
  • If the response status code is 200 then you have received the complete list of devices in the device group.
  • If the response status code is 202, use the URL from the Location header in the response to send another request – it contains the correct value for the next parameter.
  • Continue sending requests with the latest Location URL until you get a response with a status code of 200. This ensures that all devices are retrieved exactly once, with no gaps or overlaps in devices returned by multiple requests.

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 or 202 The devices in a device group are returned sorted by device ID, with the smallest ID first.

Parameter Name Data Type Description
name string The name of the device group.
description string The description of the device group.
devices Array of deviceIds objects The devices in the device group.
kind string The type of the device identifier.
id string The value of the device identifier.
hasMoreData boolean False for a status 200 response.
True for a status 202 response, indicating that there is more data to be retrieved. Send another request and include the next parameter to get the next block of records.

Example Success Response

{  
   "name":"Nebraska Trucks",
   "description":"All service trucks in Nebraska",
   "hasMoreData":false,
   "devices":[  
      {  
         "deviceIds":[  
            {  
               "id":"12345",
               "kind":"meid"
            },
            {  
               "id":"54321",
               "kind":"mdn"
            }
         ]
      },
      {  
         "deviceIds":[  
            {  
               "id":"456789",
               "kind":"meid"
            },
            {  
               "id":"987654",
               "kind":"mdn"
            }
         ]
      }
   ]
}

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!