Get all Devices of Device Group

This endpoint retrieves all Devices of a specific Device Group.

Request

To retrieve all Devices of a specific Organization please make a GET request to the following URL:

HTTP MethodURL
GEThttps://industrial.api.ubidots.com/api/v2.0/device_groups/<device_group_key>/devices/

Path Parameters

ParameterTypeDescription
device_group_keyStringThe id or label of the Device Group, label should use the prefix ~

Query Parameter

ParameterTypeUseDescription
tokenStringAuthenticationAuthentication Token can optionally be sent as a query parameter.
pageNumberPaginationReturns the corresponding page of the result
page_sizeNumberPaginationNumber of items per page, if not provided takes default values of 50 (for variables 200)
created_atStringSortSort all Variables based on date created. Default descending.
labelStringSortSort by label
nameStringSortSort by name
fieldsComma separated listDynamic FieldsAllows to dynamically specify the fields that should be included in the response object
searchStringSearchAllows to search on the following fields with one request label, name, description, username, firstName, lastName

Header

ParameterRequired?Description
X-Auth-TokenYes[Authentication Token] (/reference/authentication) of account
$ curl -X GET 'https://industrial.api.ubidots.com/api/v2.0/device_groups/<device_groups_key>/devices/' \
 -H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "url": "https://industrial.api.ubidots.com/api/v2.0/devices/12345a791d847273ee3f06c1",
            "id": "12345a791d847273ee3f06c1",
            "label": "dev0",
            "name": "Dev0"
        }
    ]
}
{
    "code": 400001,
    "message": "Validation Error.",
    "detail": {
        ....
    }
}
{
    "code": 401001,
    "message": "Authentication credentials were not provided.",
    "detail": "Authentication credentials were not provided."
}

Response

Returns an object with an array results containing all devices pertaining to the specific Device Group.