NAV
shell python javascript

Introduction

Welcome to NETIO Cloud API documentation.

The latest API version is running on api.cloud.netio-products.com/. Alternatively you can use api.cloud.netio-products.com/v1/ to use the current version. In future there might be v2 which will eventually end up as the default version.

Authentication

All API requests must be authorized with your organization API token. You can generate this token in the "Settings" tab within your organization. This token is then passed In the Authorization: Bearer {.....} header to all request made to the API. Rate limits are associated with a token.

Netio Cloud API v0.1.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Current rate limits are:

Authentication

Device

Get the list of devices and their outputs.

Code samples

# You can also use wget
curl -X GET /device/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/device/', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/device/',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /device/

Example responses

200 Response

{
  "items": [
    {
      "id": "string",
      "directory_id": "string",
      "mqtt_base": "string",
      "name": "string",
      "path": "string",
      "mac": "string",
      "model": "string",
      "local_ip": "string",
      "firmware_version": "string",
      "permissions": [
        "string"
      ],
      "features": {
        "property1": true,
        "property2": true
      },
      "io": [
        {
          "id": "string",
          "socket_id": "string",
          "name": "string",
          "io_type": "string",
          "input_mode": "string",
          "permissions": [
            "string"
          ],
          "features": {
            "property1": true,
            "property2": true
          }
        }
      ]
    }
  ],
  "total": 0,
  "page": 0,
  "per_page": 0
}

Responses

Status Meaning Description Schema
200 OK Successful response ReadDeviceList
400 Bad Request Validation error ValidationError

Read Device Information

Code samples

# You can also use wget
curl -X GET /device/{device_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/device/{device_id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/device/{device_id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /device/{device_id}

Parameters

Name In Type Required Description
device_id path string true none

Example responses

200 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "directory_id": "dca58562-24cf-4cbc-aa50-5a4039358aa5",
  "name": "string",
  "note": "string",
  "name_on_device": "string",
  "path": "string",
  "mqtt_base": "string",
  "mac": "string",
  "model": "string",
  "local_ip": "string",
  "firmware_version": "string",
  "retention": true,
  "last_activity_ts": 0,
  "permissions": [
    "string"
  ],
  "features": {
    "property1": true,
    "property2": true
  },
  "outputs": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "name_on_device": "string",
      "mqtt_base": "string",
      "io_id": 0,
      "io_type": "output",
      "state": 0,
      "consumption": 0,
      "load": 0,
      "s0_count": 0,
      "temp_celsius": 0,
      "last_state_ts": 0,
      "permissions": [
        "string"
      ],
      "features": {
        "property1": true,
        "property2": true
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful response DeviceRead
404 Not Found Not found HTTPError

Update device information.

Code samples

# You can also use wget
curl -X PATCH /device/{device_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('/device/{device_id}', headers = headers)

print(r.json())

const inputBody = '{
  "name": null,
  "note": null,
  "retention": null,
  "directory_id": null,
  "permissions": {}
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/device/{device_id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /device/{device_id}

requires the role to have permission DEVICE_MANAGE on the device. For directory transfer the DEVICE_MANAGE permissions is required in the target directory as well.

Body parameter

{
  "name": null,
  "note": null,
  "retention": null,
  "directory_id": null,
  "permissions": {}
}

Parameters

Name In Type Required Description
device_id path string true none
body body DeviceUpdate false none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Successful response DeviceUpdate
400 Bad Request Validation error ValidationError
404 Not Found Not found HTTPError

Remove device from the organization.

Code samples

# You can also use wget
curl -X DELETE /device/{device_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('/device/{device_id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/device/{device_id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /device/{device_id}

Parameters

Name In Type Required Description
device_id path string true none

Example responses

404 Response

{
  "detail": {},
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content Successful response None
404 Not Found Not found HTTPError

Directory

Create new (sub)directory.

Code samples

# You can also use wget
curl -X POST /directory/ \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('/directory/', headers = headers)

print(r.json())

const inputBody = '{
  "name": "string",
  "parent_id": "string",
  "permissions": {}
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/directory/',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /directory/

Body parameter

{
  "name": "string",
  "parent_id": "string",
  "permissions": {}
}

Parameters

Name In Type Required Description
body body DirectoryCreateRequest false none

Example responses

201 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "path": "string",
  "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef",
  "device_token": "e3a60cc1-a174-4a91-94bb-4787fedd2c76"
}

Responses

Status Meaning Description Schema
201 Created Successful response DirectoryRead
400 Bad Request Validation error ValidationError

Read Directory Information

Code samples

# You can also use wget
curl -X GET /directory/{directory_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/directory/{directory_id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/directory/{directory_id}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /directory/{directory_id}

Parameters

Name In Type Required Description
directory_id path string true none

Example responses

200 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "path": "string",
  "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef",
  "device_token": "e3a60cc1-a174-4a91-94bb-4787fedd2c76"
}

Responses

Status Meaning Description Schema
200 OK Successful response DirectoryRead
404 Not Found Not found HTTPError

Update directory information.

Code samples

# You can also use wget
curl -X PATCH /directory/{directory_id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.patch('/directory/{directory_id}', headers = headers)

print(r.json())

const inputBody = '{
  "name": null,
  "parent_id": null,
  "permissions": {}
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/directory/{directory_id}',
{
  method: 'PATCH',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PATCH /directory/{directory_id}

Body parameter

{
  "name": null,
  "parent_id": null,
  "permissions": {}
}

Parameters

Name In Type Required Description
directory_id path string true none
body body DirectoryUpdate false none

Example responses

200 Response

{}

Responses

Status Meaning Description Schema
200 OK Successful response DirectoryUpdate
400 Bad Request Validation error ValidationError
404 Not Found Not found HTTPError

Remove directory from organization.

Code samples

# You can also use wget
curl -X DELETE /directory/{directory_id} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('/directory/{directory_id}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/directory/{directory_id}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /directory/{directory_id}

Parameters

Name In Type Required Description
directory_id path string true none

Example responses

404 Response

{
  "detail": {},
  "message": "string"
}

Responses

Status Meaning Description Schema
204 No Content Successful response None
404 Not Found Not found HTTPError

Read Directory Structure

Code samples

# You can also use wget
curl -X GET /directory/{directory_id}/structure \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/directory/{directory_id}/structure', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/directory/{directory_id}/structure',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /directory/{directory_id}/structure

Parameters

Name In Type Required Description
directory_id path string true none

Example responses

200 Response

{
  "name": "string",
  "full_path": "string",
  "directory_id": "string",
  "parent_directory_id": "string",
  "device_count": 0,
  "permissions": {
    "property1": true,
    "property2": true
  },
  "children": [
    {
      "name": "string",
      "full_path": "string",
      "directory_id": "string",
      "parent_directory_id": "string",
      "device_count": 0,
      "permissions": {
        "property1": true,
        "property2": true
      },
      "children": [],
      "devices": [
        {
          "name": "string",
          "full_path": "string",
          "device_id": "string",
          "type_name": "string",
          "permissions": {
            "property1": true,
            "property2": true
          }
        }
      ]
    }
  ],
  "devices": [
    {
      "name": "string",
      "full_path": "string",
      "device_id": "string",
      "type_name": "string",
      "permissions": {
        "property1": true,
        "property2": true
      }
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful response DirectoryStructure
404 Not Found Not found HTTPError

Firmware

Returns a list of all available firmware versions for a specific device or a model.

Code samples

# You can also use wget
curl -X GET /firmware/?version=string \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/firmware/', params={
  'version': 'string'
}, headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/firmware/?version=string',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /firmware/

Either serial or combination of serial+model has to be provided.

download_url, download_url_no_mcu can be null if the firmware variant is not available for the device.

No authentication is required.

Parameters

Name In Type Required Description
serial query string false Serial number of the device.
model query string false (e.g.: PowerPDU 3KF
version query string true Current firmware version.
latest query boolean false return only latest firmware version.

Example responses

200 Response

{
  "items": [
    {
      "name": "string",
      "version": "string",
      "download_url": "string",
      "download_url_no_mcu": "string",
      "release_note_cz": "string",
      "release_note_en": "string",
      "update_message": "string",
      "tags": [
        "string"
      ]
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Successful response ReadFirmwareList
400 Bad Request Validation error ValidationError

Returns the binary firmware file.

Code samples

# You can also use wget
curl -X GET /firmware/{name} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/firmware/{name}', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/firmware/{name}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /firmware/{name}

Specify the variant "no_mcu" to get the specific version of the firmware. If the firmware name or its variant does not exist, 404 is returned.

No authentication is required.

Parameters

Name In Type Required Description
name path string true none
variant query string false none

Example responses

200 Response

null

Responses

Status Meaning Description Schema
200 OK Successful response Inline
400 Bad Request Validation error ValidationError
404 Not Found Not found HTTPError

Response Schema

Organization

Read detailed information about the organization.

Code samples

# You can also use wget
curl -X GET /organization/ \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/organization/', headers = headers)

print(r.json())


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/organization/',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /organization/

Example responses

200 Response

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "credits": 0,
  "root_directory_id": "536990d8-c379-4e57-a79f-349d3371f6ea",
  "subscription": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "string"
  },
  "mqtt": {
    "username": "string",
    "password": "string",
    "hostname": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK Successful response OrganizationRead

Schemas

ValidationError

{
  "detail": {
    "<location>": {
      "<field_name>": [
        "string"
      ]
    }
  },
  "message": "string"
}

Properties

Name Type Required Restrictions Description
detail object false none none
» object false none none
»» [string] false none none
message string false none none

HTTPError

{
  "detail": {},
  "message": "string"
}

Properties

Name Type Required Restrictions Description
detail object false none none
message string false none none

DeviceIO

{
  "id": "string",
  "socket_id": "string",
  "name": "string",
  "io_type": "string",
  "input_mode": "string",
  "permissions": [
    "string"
  ],
  "features": {
    "property1": true,
    "property2": true
  }
}

Properties

Name Type Required Restrictions Description
id string false none none
socket_id string false none none
name string false none none
io_type string false none none
input_mode string false none none
permissions [string] false none none
features object false none none
» additionalProperties boolean false none none

Device

{
  "id": "string",
  "directory_id": "string",
  "mqtt_base": "string",
  "name": "string",
  "path": "string",
  "mac": "string",
  "model": "string",
  "local_ip": "string",
  "firmware_version": "string",
  "permissions": [
    "string"
  ],
  "features": {
    "property1": true,
    "property2": true
  },
  "io": [
    {
      "id": "string",
      "socket_id": "string",
      "name": "string",
      "io_type": "string",
      "input_mode": "string",
      "permissions": [
        "string"
      ],
      "features": {
        "property1": true,
        "property2": true
      }
    }
  ]
}

Properties

Name Type Required Restrictions Description
id string false none none
directory_id string false none none
mqtt_base string false none none
name string false none none
path string false none none
mac string false none none
model string false none none
local_ip string false none none
firmware_version string false none none
permissions [string] false none none
features object false none none
» additionalProperties boolean false none none
io [DeviceIO] false none none

ReadDeviceList

{
  "items": [
    {
      "id": "string",
      "directory_id": "string",
      "mqtt_base": "string",
      "name": "string",
      "path": "string",
      "mac": "string",
      "model": "string",
      "local_ip": "string",
      "firmware_version": "string",
      "permissions": [
        "string"
      ],
      "features": {
        "property1": true,
        "property2": true
      },
      "io": [
        {
          "id": "string",
          "socket_id": "string",
          "name": "string",
          "io_type": "string",
          "input_mode": "string",
          "permissions": [
            "string"
          ],
          "features": {
            "property1": true,
            "property2": true
          }
        }
      ]
    }
  ],
  "total": 0,
  "page": 0,
  "per_page": 0
}

Properties

Name Type Required Restrictions Description
items [Device] false read-only none
total integer false read-only none
page integer false read-only none
per_page integer false read-only none

Firmware

{
  "name": "string",
  "version": "string",
  "download_url": "string",
  "download_url_no_mcu": "string",
  "release_note_cz": "string",
  "release_note_en": "string",
  "update_message": "string",
  "tags": [
    "string"
  ]
}

Properties

Name Type Required Restrictions Description
name string false none none
version string false none none
download_url string false none none
download_url_no_mcu string false none none
release_note_cz string false none none
release_note_en string false none none
update_message string false none none
tags [string] false none none

ReadFirmwareList

{
  "items": [
    {
      "name": "string",
      "version": "string",
      "download_url": "string",
      "download_url_no_mcu": "string",
      "release_note_cz": "string",
      "release_note_en": "string",
      "update_message": "string",
      "tags": [
        "string"
      ]
    }
  ],
  "serial": "",
  "model": "",
  "version": "string",
  "latest": false
}

Properties

Name Type Required Restrictions Description
items [Firmware] false read-only none
serial string false write-only Serial number of the device.
model string false write-only (e.g.: PowerPDU 3KF
version string true write-only Current firmware version.
latest boolean false write-only return only latest firmware version.

DirectoryCreateRequest

{
  "name": "string",
  "parent_id": "string",
  "permissions": {}
}

Properties

Name Type Required Restrictions Description
name string true none Directory name. Should not be duplicate within the where it will be created.
parent_id string true none Directory in which to create the new directory. Use "root" as shorthand for top level directory.
permissions object false none Permissions to set for specified roles in the directory. Other roles are set to inherit from the parent directory.
» additionalProperties object false none set of permissions for the role.
»» additionalProperties boolean¦null false none none

DirectoryRead

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "path": "string",
  "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef",
  "device_token": "e3a60cc1-a174-4a91-94bb-4787fedd2c76"
}

Properties

Name Type Required Restrictions Description
id string(uuid) false none ID which uniquely identifies the directory
name string false none Directory name.
path string false none Directory full path
parent_id string(uuid) false none parent ID
device_token string(uuid) false none Device registration token for the directory

OrganizationSubscription

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string"
}

Properties

Name Type Required Restrictions Description
id string(uuid) false none Subscription identifier.
name string false none Name of the subscription

MqttCredentials

{
  "username": "string",
  "password": "string",
  "hostname": "string"
}

Properties

Name Type Required Restrictions Description
username string false none MQTT username.
password string false none MQTT password.
hostname string false none MQTT hostname.

OrganizationRead

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "credits": 0,
  "root_directory_id": "536990d8-c379-4e57-a79f-349d3371f6ea",
  "subscription": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "string"
  },
  "mqtt": {
    "username": "string",
    "password": "string",
    "hostname": "string"
  }
}

Properties

Name Type Required Restrictions Description
id string(uuid) false none Organizations unique identifier.
name string false none Current Organization name.
credits integer false none State of the credits in the account.
root_directory_id string(uuid) false none Root directory identifier.
subscription OrganizationSubscription false none Current Organization subscription.
mqtt any false none MQTT credentials for the organization.

anyOf

Name Type Required Restrictions Description
» anonymous MqttCredentials false none none

or

Name Type Required Restrictions Description
» anonymous object¦null false none none

DeviceReadOutput

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "name_on_device": "string",
  "mqtt_base": "string",
  "io_id": 0,
  "io_type": "output",
  "state": 0,
  "consumption": 0,
  "load": 0,
  "s0_count": 0,
  "temp_celsius": 0,
  "last_state_ts": 0,
  "permissions": [
    "string"
  ],
  "features": {
    "property1": true,
    "property2": true
  }
}

Properties

Name Type Required Restrictions Description
id string(uuid) false none none
name string false none none
name_on_device string false none none
mqtt_base string false none none
io_id integer false none none
io_type string false none none
state integer false none none
consumption integer false none none
load integer false none none
s0_count integer false none none
temp_celsius integer false none none
last_state_ts integer false none none
permissions [string] false none none
features object false none none
» additionalProperties boolean false none none

Enumerated Values

Property Value
io_type output
io_type outputZero
io_type input

DeviceRead

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "directory_id": "dca58562-24cf-4cbc-aa50-5a4039358aa5",
  "name": "string",
  "note": "string",
  "name_on_device": "string",
  "path": "string",
  "mqtt_base": "string",
  "mac": "string",
  "model": "string",
  "local_ip": "string",
  "firmware_version": "string",
  "retention": true,
  "last_activity_ts": 0,
  "permissions": [
    "string"
  ],
  "features": {
    "property1": true,
    "property2": true
  },
  "outputs": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "name_on_device": "string",
      "mqtt_base": "string",
      "io_id": 0,
      "io_type": "output",
      "state": 0,
      "consumption": 0,
      "load": 0,
      "s0_count": 0,
      "temp_celsius": 0,
      "last_state_ts": 0,
      "permissions": [
        "string"
      ],
      "features": {
        "property1": true,
        "property2": true
      }
    }
  ]
}

Properties

Name Type Required Restrictions Description
id string(uuid) false none none
directory_id string(uuid) false none none
name string false none none
note string false none none
name_on_device string false none none
path string false none none
mqtt_base string false none none
mac string false none none
model string false none none
local_ip string false none none
firmware_version string false none none
retention boolean false none none
last_activity_ts integer false none none
permissions [string] false none none
features object false none none
» additionalProperties boolean false none none
outputs [DeviceReadOutput] false none none

DeviceUpdate

{
  "name": null,
  "note": null,
  "retention": null,
  "directory_id": null,
  "permissions": {}
}

Properties

Name Type Required Restrictions Description
name string¦null false write-only New name of the device
note string¦null false write-only New note
retention boolean¦null false write-only New retention policy
directory_id string¦null false write-only Directory ID to move the device to. Cross-organization move is allowed as well.
permissions object false write-only Permissions to set for specified roles. Sets permissions only for the roles sent in the request, others are kept as they are.
» additionalProperties object false write-only set of permissions for the role
»» additionalProperties boolean¦null false none none

DirectoryUpdate

{
  "name": null,
  "parent_id": null,
  "permissions": {}
}

Properties

Name Type Required Restrictions Description
name string¦null false write-only New directory name
parent_id string¦null false write-only Directory in which to move the directory into
permissions object false write-only Permissions to set for specified roles in the directory. Sets permissions only for the roles sent in the request.The set can be only a subset of the roles in the directory, when permissions are not specified they are inherited from the parent .
» additionalProperties object false write-only set of permissions for the role
»» additionalProperties boolean¦null false none none

DirectoryStructureDevice

{
  "name": "string",
  "full_path": "string",
  "device_id": "string",
  "type_name": "string",
  "permissions": {
    "property1": true,
    "property2": true
  }
}

Properties

Name Type Required Restrictions Description
name string false none Name of the device
full_path string false none full directory path
device_id string false none Unique device identification
type_name string false none Type of the device
permissions object false none set of available permissions
» additionalProperties boolean false none none

DirectoryStructure

{
  "name": "string",
  "full_path": "string",
  "directory_id": "string",
  "parent_directory_id": "string",
  "device_count": 0,
  "permissions": {
    "property1": true,
    "property2": true
  },
  "children": [
    {
      "name": "string",
      "full_path": "string",
      "directory_id": "string",
      "parent_directory_id": "string",
      "device_count": 0,
      "permissions": {
        "property1": true,
        "property2": true
      },
      "children": [],
      "devices": [
        {
          "name": "string",
          "full_path": "string",
          "device_id": "string",
          "type_name": "string",
          "permissions": {
            "property1": true,
            "property2": true
          }
        }
      ]
    }
  ],
  "devices": [
    {
      "name": "string",
      "full_path": "string",
      "device_id": "string",
      "type_name": "string",
      "permissions": {
        "property1": true,
        "property2": true
      }
    }
  ]
}

Properties

Name Type Required Restrictions Description
name string false none Name of the directory
full_path string false none full directory path
directory_id string false none Unique directory identification
parent_directory_id string false none Unique identification of the parent directory
device_count integer false none Number of devices in the directory
permissions object false none set of available permissions
» additionalProperties boolean false none none
children [DirectoryStructure] false none List of subdirectories
devices [DirectoryStructureDevice] false none List of devices in the directory