Showing a device details

Showing a device details.

To access the API you must provide the `bearer token`.

See API Authentication

This will provide top level details for a device. Using the device's ID you can further control aspects of the device.

Send a GET request to the API endpoint /api/orgs/{org-slug}/device/{device-id}

Replace {org-slug} with your organisations slug.
Replace {device-id} with the device id.

You can find your slug:
  • in the organisations settings page
  • from the organisations API

The device ID is available from the listing devices API.

This will return an array of device objects, for example:

[
  {
    "address": 0,
    "channel": 0,
    "description": "Description-738",
    "enabled": true,
    "id": "0197302f-faa4-7b73-8a82-0a0359b6c518",
    "name": "Sensor-706"
  },
  ...
]

Example:

curl -X 'GET' \
'https://iotsimhub.net/api/orgs/<org-slug>/device/<device-id>' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer <token>" \

API error codes

The endpoint will return errors in the format:

{
  "errors": {
    "details": <error response>
  }
}
Error responseDescription
UnauthorizedThe request was not successful because:
1.You are not authenticated.
2. You are not part of the organisation
Not foundThe device ID was not found in this organisation