Rest API (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.

Download OpenAPI description
Languages
Servers
Mock server
https://docs.wia.io/_mock/apis/wia-rest-api/docs/
Production
https://api.wia.io/v1/

Alert

Alerts provide information about devices that have gone offline or exhibited anomalies in their data, helping to monitor system health and identify potential issues.
Alerts can be resolved by acknowledging them, and can be filtered by their resolution status.

Operations

Device

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.

Operations

Retrieves a list of devices in a Model e.g. Device

Request

Retrieves a list of devices in a Model e.g. Device, Gateway, Flow, Workplace, Space, Organisation, Product, User, etc.

Query
space.idstring

Id of Space

place.idstring

Id of Place

gateway.idstring

Id of Gateway

product.idstring

Id of Product

organisation.idstring

Id of Organisation

limitinteger(int32)

Max number of rows to return

Example: limit=20
pageinteger(int32)

Section of rows to return e.g. 0, 1 or 2

sortstring

Sort by Ascending or Descending order Default: DESC

Enum"ASC""DESC"
orderstring

Order by column e.g. id

curl -i -X GET \
  'https://docs.wia.io/_mock/apis/wia-rest-api/docs/devices?gateway.id=string&limit=20&order=string&organisation.id=string&page=0&place.id=string&product.id=string&sort=ASC&space.id=string' \
  -H 'Authorization: Bearer <YOUR_Bearer_HERE>'

Responses

OK

Bodyapplication/jsonArray [
idstring
Example: "dev_abc123"
isMainboolean
Example: true
namestring
Example: "Test Device"
customIdstring
Example: "custom-id"
serialNumberstring
Example: "abc12345678"
batchNumberstring
Example: "123"
spaceobject(Space)
productobject(Product)
eventsArray of objects(Event)
locationobject(Location)
stateobject
metaobject
wifiobject
cellularobject
bluetoothobject
loraobject
sigfoxobject
lastSeenAtinteger
Example: 1631707207000
lastUnprocessedEventTimestampinteger
Example: 1631707207000
lastProcessedEventTimestampinteger
Example: 1631707207000
createdAtinteger
Example: 1631707207000
updatedAtinteger
Example: 1631707207000
]
Response
application/json
[ { "id": "dev_abc123", "isMain": 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 } ]

Retrieve a Device

Request

Retrieve a Device

Path
idstringrequired

Id of the device

curl -i -X GET \
  'https://docs.wia.io/_mock/apis/wia-rest-api/docs/devices/{id}' \
  -H 'Authorization: Bearer <YOUR_Bearer_HERE>'

Responses

OK

Bodyapplication/json
idstring
Example: "dev_abc123"
isMainboolean
Example: true
namestring
Example: "Test Device"
customIdstring
Example: "custom-id"
serialNumberstring
Example: "abc12345678"
batchNumberstring
Example: "123"
spaceobject(Space)
productobject(Product)
eventsArray of objects(Event)
locationobject(Location)
stateobject
metaobject
wifiobject
cellularobject
bluetoothobject
loraobject
sigfoxobject
lastSeenAtinteger
Example: 1631707207000
lastUnprocessedEventTimestampinteger
Example: 1631707207000
lastProcessedEventTimestampinteger
Example: 1631707207000
createdAtinteger
Example: 1631707207000
updatedAtinteger
Example: 1631707207000
Response
application/json
{ "id": "dev_abc123", "isMain": true, "name": "Test Device", "customId": "custom-id", "serialNumber": "abc12345678", "batchNumber": "123", "space": { "id": "spc_abc123", "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 }

Energy

Energy consumption data is used to track the amount of energy used by a customer over a given time period.
The data can be used to identify energy-saving opportunities, monitor energy usage for sustainability initiatives, and track energy usage for billing purposes.

Operations

Gateway

Gateways are devices that connect to the Wia platform and are used to transport data from other devices in the environment to the Wia platform.

Operations

Space

Spaces are physical locations that are monitored by the Wia platform and house all devices and gateways that represent that location.

Operations