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 Method

URL

GET

https://industrial.api.ubidots.com/api/v2.0/organizations/<organization_key>/devices/

Path Parameters

Parameter

Type

Description

organization_key

String

The id or label of the Organization, label should use the prefix ~

Query Parameters

Parameter

Type

Use

Description

token

String

Authentication

Authentication Token can optionally be sent as a query parameter.

page

Number

Pagination

Returns the corresponding page of the result

page_size

Number

Pagination

Number of items per page, if not provided takes default values of 50 (for variables 200)

created_at

String

Sort

Sort all Variables based on date created. Default descending.

label

String

Sort

Sort by label

name

String

Sort

Sort by name

fields

Comma separated list

Dynamic Fields

Specify the fields that should be obtained in the response object.

search

String

Search

Allows to search on the following fields with one request label, name, description, username, firstName, lastName

id

String

Filter Attribute

Filter by id

label

String

Filter Attribute

Filter by label

name

String

Filter Attribute

Filter by name

description

String

Filter Attribute

Filter by description

description__isempty

Boolean

Filter Attribute

If True, filters for Devices with an empty description field

tags

Array

Filter Attribute

Filter by tags

context

Json

Filter Attribute

Filter by context

createdAt

String

Filter Attribute

Filter by date of creation

isActive

Boolean

Filter Attribute

Filter for devices that are (not) active

variables

Related Variables Filter

Related Filter Attribute

Filter by Related Variables Filter (variables__<variable_attribute>__<filter>)

deviceGroup

Related Device Group Filter

Related Filter Attribute

Filter by Related Device Group Filter (deviceGroup__<deviceGroup_attribute>__<filter>)

Header

Parameter

Required?

Description

X-Auth-Token

Yes

Authentication 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": [
        {
            "context": {},
            "createdAt": "2019-11-25T19:35:08.975270Z",
            "description": "some description",
            "id": "6e309da44fc8455a9cceb5aa",
            "isActive": true,
            "label": "first-device",
            "lastActivity": null,
            "name": "First Device",
            "tags": ["first"],
            "url": "http://industrial.ubidots.com/api/v2.0/devices/6e309da44fc8455a9cceb5aa",
            "variables": "http://industrial.ubidots.com/api/v2.0/devices/6e309da44fc8455a9cceb5aa/variables",
            "variablesNumber": 1
        },
    ]
}
{
    "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.