Para obtener todos los Devices de una Organization específica, haz una petición GET a la siguiente URL:
HTTP Method | URL |
---|
GET | https://api.netux.com/api/v2.0/organizations/<organization_key>/devices/ |
Parameter | Type | Description |
---|
organization_key | String | The id or label of the Organization, label should use the prefix ~ |
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> ) |
$ curl -X GET 'https://api.netux.com/api/v2.0/organizations/<organization_key>/devices/' \
-H 'X-Auth-Token: oaXBo6ODhIjPsusNRPUGIK4d72bc73' \
Devuelve un objeto con un array results
que contiene todos los Devices de la Organization específica.
{
"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://api.netux.com/api/v2.0/devices/6e309da44fc8455a9cceb5aa",
"variables": "http://api.netux.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."
}