Listing device registers
Show all registers for a device.
To access the API you must provide the `bearer token`.
Send a GET
request to the API endpoint /api/orgs/{org-slug}/device/{device-id}/registers
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 register objects, for example:
[
{
"id": "01973134-5a13-7e60-a162-1c1c858c8956",
"name": "Register-1506",
"value": 4778,
"length": 1,
"description": "Description-1538",
"data_type": "int16",
"register_type": "holding",
"start_address": 500,
"end_address": 500
},
...
]
Example:
curl -X 'GET' \
'https://iotsimhub.net/api/orgs/<org-slug>/device/<device-id>/registers' \
-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 response | Description |
---|---|
Unauthorized | The request was not successful because: 1.You are not authenticated. 2. You are not part of the organisation |
Not found | The device ID was not found in this organisation |