Devices are a representation of objects that are connected to the Wia platform and can be used to collect data from the environment. The objects can be physical sensors, cloud integrations or manual uploads.
Wia REST API reference (v1)
A REST API to interact with Wia platform to enable external applications to analyse energy consumption and to automate internal operations relating to the capturing and grouping of energy consumption.
To get started, please ensure you have the correct permissions and appropriate key. If you have not been provided a key, please contact your representative.
The API is organised around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
- Mock server
https://docs.wia.io/_mock/apis/wia-rest-api/docs/devices
- Production
https://api.wia.io/v1/devices
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.wia.io/_mock/apis/wia-rest-api/docs/devices?space.id=string&place.id=string&gateway.id=string&product.id=string&organisation.id=string&limit=20&page=0&sort=ASC&order=string' \
-H 'Authorization: Bearer <YOUR_Bearer_HERE>'
[ { "id": "dev_abc123", "isMain": true, "isActive": true, "name": "Test Device", "customId": "custom-id", "serialNumber": "abc12345678", "batchNumber": "123", "space": { … }, "product": { … }, "events": [ … ], "location": { … }, "state": {}, "meta": {}, "wifi": { … }, "cellular": { … }, "bluetooth": { … }, "lora": { … }, "sigfox": { … }, "lastSeenAt": 1631707207000, "lastUnprocessedEventTimestamp": 1631707207000, "lastProcessedEventTimestamp": 1631707207000, "createdAt": 1631707207000, "updatedAt": 1631707207000 } ]
- Mock server
https://docs.wia.io/_mock/apis/wia-rest-api/docs/devices/{id}
- Production
https://api.wia.io/v1/devices/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.wia.io/_mock/apis/wia-rest-api/docs/devices/{id}' \
-H 'Authorization: Bearer <YOUR_Bearer_HERE>'
{ "id": "dev_abc123", "isMain": true, "isActive": true, "name": "Test Device", "customId": "custom-id", "serialNumber": "abc12345678", "batchNumber": "123", "space": { "id": "spc_abc123", "clientId": "client-specific-id", "name": "Test Space", "isPublic": false, "disabled": false, "avatar": { … }, "owner": { … } }, "product": { "id": "pro_abc123def", "name": "Test Product", "description": "This is a Test Product", "manufacturer": "Wia", "model": "v1", "colour": "#2E7DFF", "category": "test", "image": "7170506d-5759-400e-a5d1-073c5d175abc", "state": { … } }, "events": [ { … } ], "location": { "id": "1234-abcd-5678-efgh", "latitude": "4.67", "longitude": "54.2", "altitude": "1.23", "timestamp": 1631707200000 }, "state": {}, "meta": {}, "wifi": { "macAddress": "00:00:00:B5:D5:A5", "rssi": -90 }, "cellular": { "network": "vodafone", "rssi": -67, "imei": "10A12345677890", "iccid": "891004234814455936F" }, "bluetooth": { "macAddress": "00:00:00:B5:D5:A5", "rssi": -90 }, "lora": { "devEui": "10A12345678910234", "devAddr": "10A123456", "appEui": "10A12345678910234567890", "appKey": "1234404C696E6B4C6F52613230313823" }, "sigfox": { "id": "123456AD" }, "lastSeenAt": 1631707207000, "lastUnprocessedEventTimestamp": 1631707207000, "lastProcessedEventTimestamp": 1631707207000, "createdAt": 1631707207000, "updatedAt": 1631707207000 }