Get all Devices of Organization

This endpoint retrieves all Devices of a specific Organization.

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/organizations/<organization_key>/devices/

Path Parameters

ParameterTypeDescription
organization_keyStringThe id or label of the Organization, label should use the prefix ~

Query Parameters

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)
createdAtStringSortSort all Variables based on date created. Default descending.
labelStringSortSort by label
nameStringSortSort by name
variablesCountIntegerSortSort by the number of variables in the device
lastActivityIntegerSortSort by last activity
fieldsComma separated listDynamic FieldsSpecify the fields that should be obtained in the response object.
searchStringSearchAllows to search on the following fields with one request label, name
idStringFilter AttributeFilter by id
labelStringFilter AttributeFilter by label
nameStringFilter AttributeFilter by name
createdAtStringFilter AttributeFilter by date of creation
lastActivityIntegerFilter AttributeFilter by lastActivity
variablesCountIntegerFilter AttributeFilter by the number of the variables in the device

Header

ParameterRequired?Description
X-Auth-TokenYesAuthentication Token of account
$ curl -X GET 'https://industrial.api.ubidots.com/api/v2.0/organizations/<organization_key>/devices/' \
 -H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "url": "https://industrial.ubidots.com/api/v2.0/devices/631803722c3f16000d6f86e3",
      "id": "631803722c3f16000d6f86e3",
      "label": "3347",
      "name": "3347",
      "createdAt": "2022-09-07T02:35:30.497576Z",
      "variablesCount": 5,
      "lastActivity": 1663335764985
    }
  ]
}
{
    "code": 400001,
    "message": "Validation Error.",
    "detail": {
        ....
    }
}
{
    "code": 401001,
    "message": "Authentication credentials were not provided.",
    "detail": "Authentication credentials were not provided."
}

Response

An object with an array results containing all Devices of the specific organization.