Download OpenAPI specification:
The Wattsense API provides a two way communication channel with devices managed by the platform.
All the paths in this documentation are relative to the base path https://api.wattsense.com/
. We only support HTTPS, all HTTP requests are redirected with a 301.
A global rate limit is currently defined on the Wattsense API. The rate limit is IP based (in the future it will be device based). The current limits are:
Our endpoints are all protected using an HMAC (Hash-Based Message Authentication Codes) mechanism.
Note: OAuth 2.0 Client Credentials grant flow is planned for a later version.
Using our management console, you can create an API Key with an access to your Organization. An API Key is associated to a service account and will inherit the right provided by that service account.
Each API Key comes with an API Secret used to sign the messages you send.
To authenticate, you must add to your request the header X-API-Auth
containing the API Key and a message signature:
X-API-Auth: <your-api-key>:<request-hmac-512-authentication-code>
The authentication code of the request is computed by applying a HMAC_SHA512 on the request you’re about to send to the server. The message to authenticate has to respect the following specification (in pseudo code):
messageToSign = HttpMethod + '\n'
RelativePath + '\n'
CanonicalQuery + '\n'
Body + '\n'
Timestamp
where:
GET
, POST
or PUT
, mandatory in all requestshttps://api.wattsense.com/v1/devices
that would be /v1/devices
,
mandatory in all requestsproperty=temperature&since=1286705410000
X-API-Timestamp
.This message is then authenticated using HMAC_SHA512 and its result base64 encoded. The final result is what
we previously called request-hmac-512-authentication-code
, or in short a "signature". For example, in Python, that would be:
hmac_digest = hmac.new(api_secret, message.encode(), hashlib.sha512).digest()
signature = base64.b64encode(hmac_digest).decode()
For simplicity, we provide the following example that does everything we described above:
#!/usr/bin/python3
import requests
import base64
import hashlib
import hmac
import time
from urllib import parse
url = 'https://api.wattsense.com'
api_key = '132BA4C2309A9E069BDF129138680F89'
api_secret = 'ZTgwZTliMWJhZmQ4NmFhMmM2M2U5MjdkMTI1MzliYzFmMTYyMWZkMzcyOTIxMzRkNzA0MTQ5ZWRmY2JiMDc3Yg=='
class WattsenseAuth(requests.auth.AuthBase):
def __init__(self, api_key, api_secret):
self.api_key = api_key
self.api_secret = api_secret
def __call__(self, r):
timestamp = int(time.time() * 1000)
url = parse.urlparse(r.url)
message = '\n'.join([str(e) for e in [r.method, url.path,
(url.query if url.query else None),
(r.body.decode('utf-8') if r.body else None),
timestamp] if e != None])
hmac_hash = base64.b64encode(hmac.new(self.api_secret.encode(), message.encode(),
hashlib.sha512).digest()).decode()
r.headers['X-API-Auth'] = '{}:{}'.format(self.api_key, hmac_hash)
r.headers['X-API-Timestamp'] = str(timestamp)
return r
if __name__ == '__main__':
print('Getting devices')
req = requests.get(f'{url}/v1/devices', auth=WattsenseAuth(api_key=api_key, api_secret=api_secret))
print(req) // verify status
print(req.json())
device_id = req.json()[0]['deviceId']
print('Setting a property on a device')
req = requests.put(f'{url}/v1/devices/{device_id}/properties/prop_1', auth=WattsenseAuth(api_key=api_key, api_secret=api_secret), payload={'payload': '33'})
print(req) // verify status
print(req.json())
{- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "name": "string",
- "contacts": {
- "BILLING": "string",
- "TECHNICAL": "string"
}, - "type": "TENANT",
- "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
- "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
- "status": "NEW",
- "preventRightsPropagation": true
}
[- {
- "username": "string",
- "fullName": "string",
- "phoneNumber": "string",
- "language": "fr",
- "privileges": {
- "org1": [
- {
- "privilegeId": "random_id",
- "action": "DevicesRead",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "*"
}
}, - {
- "privilegeId": "random_id",
- "action": "DevicesWrite",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "SpecificDeviceId"
}
}
], - "org3": [
- {
- "privilegeId": "random_id",
- "action": "DevicesRead",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "*"
}
}
]
}
}
]
nameFilter | string |
includeDisabled | boolean |
parentId | string <uuid> |
[- {
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "name": "string",
- "contacts": {
- "BILLING": "string",
- "TECHNICAL": "string"
}, - "type": "TENANT",
- "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
- "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
- "status": "NEW",
- "preventRightsPropagation": true
}
]
organizationId required | string <uuid> |
name | string Organization name |
object (OrganizationContactsDTO) Organization contacts | |
preventRightsPropagation | boolean Prevent rights propagation |
parentOrganizationId | string <uuid> Parent organization ID |
{- "name": "string",
- "contacts": {
- "BILLING": "string",
- "TECHNICAL": "string"
}, - "preventRightsPropagation": true,
- "parentOrganizationId": "63f6c742-ce8a-40d9-97e1-7492d05907db"
}
{- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "name": "string",
- "contacts": {
- "BILLING": "string",
- "TECHNICAL": "string"
}, - "type": "TENANT",
- "parentId": "70850378-7d3c-4f45-91b7-942d4dfbbd43",
- "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
- "status": "NEW",
- "preventRightsPropagation": true
}
Create a user API key
username required | string The username of the user |
description | string A description of the API key |
expireInHours | integer <int64> [ 1 .. 17520 ] The number of hours until the API key expires |
{- "description": "string",
- "expireInHours": 1
}
{- "key": "string",
- "secret": "string",
- "belongsTo": "string",
- "description": "string",
- "expiryDate": "2019-08-24T14:15:22Z"
}
Delete an API key belonging to a user
username required | string The username of the user |
key required | string The API Key ID |
{- "deleted": true,
- "apiKey": {
- "key": "string",
- "secret": "string",
- "belongsTo": "string",
- "description": "string",
- "expiryDate": "2019-08-24T14:15:22Z"
}
}
Return the information of the user making the request
organizationId | string <uuid> The organization for which to list the users, if not set, will list the users of the calling user's organization |
{- "username": "string",
- "fullName": "string",
- "phoneNumber": "string",
- "language": "fr",
- "privileges": {
- "org1": [
- {
- "privilegeId": "random_id",
- "action": "DevicesRead",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "*"
}
}, - {
- "privilegeId": "random_id",
- "action": "DevicesWrite",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "SpecificDeviceId"
}
}
], - "org3": [
- {
- "privilegeId": "random_id",
- "action": "DevicesRead",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "*"
}
}
]
}
}
Get a user API key
username required | string The username of the user |
key required | string The API Key ID |
{- "key": "string",
- "secret": "string",
- "belongsTo": "string",
- "description": "string",
- "expiryDate": "2019-08-24T14:15:22Z"
}
List all the users of an organization.
The content of roles
will vary depending on the rights of the user making the call.
Only the Organizations the user has access to will be listed.
organizationId required | string <uuid> The organization for which to list the users, if not set, will list the users of the calling user's organization |
[- {
- "username": "string",
- "fullName": "string",
- "phoneNumber": "string",
- "language": "fr",
- "privileges": {
- "org1": [
- {
- "privilegeId": "random_id",
- "action": "DevicesRead",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "*"
}
}, - {
- "privilegeId": "random_id",
- "action": "DevicesWrite",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "SpecificDeviceId"
}
}
], - "org3": [
- {
- "privilegeId": "random_id",
- "action": "DevicesRead",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "*"
}
}
]
}
}
]
Create a service account
prefix required | string^[a-z0-9_]+(?:-[a-z0-9_]+)*$ A prefix used in the beginning of the username of the service account. This prefix has to be unique. The resulting service account username is in the form prefix@organizationId.svc.acct.wattsense.com |
description | string A description of this service account |
organizationId required | string <uuid> The ID of the organization in which to create the service account |
{- "prefix": "string",
- "description": "string",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9"
}
{- "username": "string",
- "description": "string",
- "enableBasicAuth": true,
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "privileges": {
- "property1": [
- {
- "privilegeId": "string",
- "action": "Admin",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "string"
}
}
], - "property2": [
- {
- "privilegeId": "string",
- "action": "Admin",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "string"
}
}
]
}
}
Create a service account API key
username required | string The username of the service account |
description | string A description of the API key |
expireInHours | integer <int64> [ 1 .. 17520 ] The number of hours until the API key expires |
{- "description": "string",
- "expireInHours": 1
}
{- "key": "string",
- "secret": "string",
- "belongsTo": "string",
- "description": "string",
- "expiryDate": "2019-08-24T14:15:22Z"
}
Delete a service account
username required | string The username of the service account |
{- "username": "string",
- "description": "string",
- "enableBasicAuth": true,
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "privileges": {
- "property1": [
- {
- "privilegeId": "string",
- "action": "Admin",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "string"
}
}
], - "property2": [
- {
- "privilegeId": "string",
- "action": "Admin",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "string"
}
}
]
}
}
Delete an API key belonging to a service account
username required | string The username of the service account |
key required | string The API Key ID |
{- "deleted": true,
- "apiKey": {
- "key": "string",
- "secret": "string",
- "belongsTo": "string",
- "description": "string",
- "expiryDate": "2019-08-24T14:15:22Z"
}
}
Get a specific service account
username required | string The username of the service account to get |
{- "username": "string",
- "description": "string",
- "enableBasicAuth": true,
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "privileges": {
- "property1": [
- {
- "privilegeId": "string",
- "action": "Admin",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "string"
}
}
], - "property2": [
- {
- "privilegeId": "string",
- "action": "Admin",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "string"
}
}
]
}
}
username required | string The username of the service account |
key required | string The API Key ID |
{- "key": "string",
- "secret": "string",
- "belongsTo": "string",
- "description": "string",
- "expiryDate": "2019-08-24T14:15:22Z"
}
List the API keys belonging to a service account
username required | string The username of the service account |
[- {
- "key": "string",
- "secret": "string",
- "belongsTo": "string",
- "description": "string",
- "expiryDate": "2019-08-24T14:15:22Z"
}
]
List all the service accounts of an account
organizationId required | string <uuid> The organization for which to list the service accounts, if not set, will list the service accounts of the calling user's account |
[- {
- "username": "string",
- "description": "string",
- "enableBasicAuth": true,
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "privileges": {
- "property1": [
- {
- "privilegeId": "string",
- "action": "Admin",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "string"
}
}
], - "property2": [
- {
- "privilegeId": "string",
- "action": "Admin",
- "resource": {
- "resourceType": "DEVICE",
- "resourceId": "string"
}
}
]
}
}
]
Get a device information
deviceId required | string The ID of the device |
{- "deviceId": "string",
- "hardwareId": "string",
- "lifecycle": "FACTORY",
- "name": "string",
- "description": "string",
- "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "deviceGroupId": "47103c21-a78d-4990-a233-7f9ad2536254",
- "siteId": "string",
- "externalId": "string",
- "deviceVersionInfo": {
- "software": "string",
- "hardware": "string",
- "bsp": "string",
- "apps": "string",
- "imageId": "string"
}, - "subscription": {
- "startDate": "2019-08-24",
- "endDate": "2019-08-24",
- "isRenewed": true,
- "isExpired": true
}, - "openAlarms": [
- {
- "alarmId": "string",
- "deviceId": "string",
- "name": "string",
- "description": "string",
- "temporalConstraints": {
- "requiredOccurrences": 0,
- "occurrenceTimeIntervalSeconds": 0,
- "currentOccurrences": 0,
- "lastOccurrenceTime": 0,
- "currentOkOccurrences": 0,
- "lastOkOccurrenceTime": 0
}, - "alarmConfig": {
- "type": "PROPERTY_MEASUREMENT"
}, - "alarmNotifications": [
- {
- "nestedNotificationId": "string",
- "notification": {
- "typeOf": "EMAIL"
}, - "notificationIntervalSeconds": 0,
- "lastSentAt": 0,
- "sendForPriority": "CRITICAL",
- "useForTemporization": true
}
], - "occurrenceHistory": [
- {
- "constraintId": "string",
- "lastOccurrenceTime": 0,
- "currentOccurrences": 0
}
], - "status": "ACKNOWLEDGED",
- "enableTemporization": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
], - "activeTasks": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "deviceId": "string",
- "type": {
- "type": "RVL_MIGRATION"
}, - "status": "PENDING",
- "statusChanges": [
- {
- "from": "PENDING",
- "to": "PENDING",
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string"
}
], - "stepsChanges": [
- {
- "from": 0,
- "to": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string"
}
], - "maxSteps": 0,
- "currentStep": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
], - "tags": {
- "property1": "string",
- "property2": "string"
}, - "type": "TOWER",
- "activationDate": "2019-08-24T14:15:22Z",
- "connectivityStatus": {
- "deviceId": "string",
- "connectionStatusInfo": {
- "status": "ONLINE",
- "timestamp": 0
}, - "requestedDataUplink": {
- "command": "string",
- "status": "IN_PROGRESS",
- "timestamp": 0,
- "lastUpdateTimestamp": 0
}, - "currentDataUplink": {
- "status": "DATA_STARTED",
- "startAt": 0,
- "endAt": 0
}, - "modem": {
- "level": {
- "payload": 0,
- "timestamp": 0
}, - "radio": {
- "payload": 0,
- "timestamp": 0
}, - "operator": {
- "payload": 0,
- "timestamp": 0
}
}, - "wwan0": {
- "payload": {
- "link": "string",
- "ip_address": "string",
- "netmask": "string",
- "broadcast": "string"
}, - "timestamp": 0
}, - "eth0": {
- "payload": {
- "link": "string",
- "ip_address": "string",
- "netmask": "string",
- "broadcast": "string"
}, - "timestamp": 0
}, - "eth1": {
- "payload": {
- "link": "string",
- "ip_address": "string",
- "netmask": "string",
- "broadcast": "string"
}, - "timestamp": 0
}
}, - "features": [
- "ENABLE_GATEWAY_SCALING"
], - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
Get the connectivity status of a device
deviceId required | string The ID of the device |
{- "deviceId": "string",
- "connectionStatusInfo": {
- "status": "ONLINE",
- "timestamp": 0
}, - "requestedDataUplink": {
- "command": "string",
- "status": "IN_PROGRESS",
- "timestamp": 0,
- "lastUpdateTimestamp": 0
}, - "currentDataUplink": {
- "status": "DATA_STARTED",
- "startAt": 0,
- "endAt": 0
}, - "modem": {
- "level": {
- "payload": 0,
- "timestamp": 0
}, - "radio": {
- "payload": 0,
- "timestamp": 0
}, - "operator": {
- "payload": 0,
- "timestamp": 0
}
}, - "wwan0": {
- "payload": {
- "link": "string",
- "ip_address": "string",
- "netmask": "string",
- "broadcast": "string"
}, - "timestamp": 0
}, - "eth0": {
- "payload": {
- "link": "string",
- "ip_address": "string",
- "netmask": "string",
- "broadcast": "string"
}, - "timestamp": 0
}, - "eth1": {
- "payload": {
- "link": "string",
- "ip_address": "string",
- "netmask": "string",
- "broadcast": "string"
}, - "timestamp": 0
}
}
This endpoint allows you to list all the devices belonging to an organization.
organizationId | string <uuid> The organization in which to search for devices, if not provided, list all devices the user / apiKey has access to. |
includeChildOrganizations | boolean Include sub organizations and hence their devices |
deviceGroupId | string <uuid> Filter devices by device group |
hardwareId | string Search for a device by its hardwareId. If this is provided, it will ignore all other filters |
tag | string Filter the results by a Tag key and/or a tag value. The filter has to
be in the format Multiple filters can be used, by repeating the query as in
|
deviceType | string (DeviceType) Enum: "TOWER" "BRIDGE" "BOX" "HUB" "CLASSICAL_HUB" List only devices that are of that type, if not provided list devices of all types. Possible values:
BOX and HUB will be removed in a future release. |
lifecycles | Array of strings (DeviceLifecycle) Items Enum: "FACTORY" "READY" "SHIPPED" "ACTIVATED" "SUSPENDED" "UNDER_MAINTENANCE" "RETIRED" "DEVELOPMENT" "HUB" Filter by device lifecycle |
includeOpenAlarms | boolean Include the last 5 currently opened alarms for each device |
includeActiveTasks | boolean Include the active tasks for each device |
includeRetired | boolean Include retired devices |
page | integer >= 1 Default: 1 One-based page index (1..N) |
size | integer >= 1 Default: 20 The size of the page to be returned |
sort | Array of strings Default: "_id,ASC" Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
[- {
- "deviceId": "string",
- "hardwareId": "string",
- "lifecycle": "FACTORY",
- "name": "string",
- "description": "string",
- "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "deviceGroupId": "47103c21-a78d-4990-a233-7f9ad2536254",
- "siteId": "string",
- "externalId": "string",
- "deviceVersionInfo": {
- "software": "string",
- "hardware": "string",
- "bsp": "string",
- "apps": "string",
- "imageId": "string"
}, - "subscription": {
- "startDate": "2019-08-24",
- "endDate": "2019-08-24",
- "isRenewed": true,
- "isExpired": true
}, - "openAlarms": [
- {
- "alarmId": "string",
- "deviceId": "string",
- "name": "string",
- "description": "string",
- "temporalConstraints": {
- "requiredOccurrences": 0,
- "occurrenceTimeIntervalSeconds": 0,
- "currentOccurrences": 0,
- "lastOccurrenceTime": 0,
- "currentOkOccurrences": 0,
- "lastOkOccurrenceTime": 0
}, - "alarmConfig": {
- "type": "PROPERTY_MEASUREMENT"
}, - "alarmNotifications": [
- {
- "nestedNotificationId": "string",
- "notification": {
- "typeOf": "EMAIL"
}, - "notificationIntervalSeconds": 0,
- "lastSentAt": 0,
- "sendForPriority": "CRITICAL",
- "useForTemporization": true
}
], - "occurrenceHistory": [
- {
- "constraintId": "string",
- "lastOccurrenceTime": 0,
- "currentOccurrences": 0
}
], - "status": "ACKNOWLEDGED",
- "enableTemporization": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
], - "activeTasks": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "deviceId": "string",
- "type": {
- "type": "RVL_MIGRATION"
}, - "status": "PENDING",
- "statusChanges": [
- {
- "from": "PENDING",
- "to": "PENDING",
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string"
}
], - "stepsChanges": [
- {
- "from": 0,
- "to": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string"
}
], - "maxSteps": 0,
- "currentStep": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
], - "tags": {
- "property1": "string",
- "property2": "string"
}, - "type": "TOWER",
- "activationDate": "2019-08-24T14:15:22Z",
- "connectivityStatus": {
- "deviceId": "string",
- "connectionStatusInfo": {
- "status": "ONLINE",
- "timestamp": 0
}, - "requestedDataUplink": {
- "command": "string",
- "status": "IN_PROGRESS",
- "timestamp": 0,
- "lastUpdateTimestamp": 0
}, - "currentDataUplink": {
- "status": "DATA_STARTED",
- "startAt": 0,
- "endAt": 0
}, - "modem": {
- "level": {
- "payload": 0,
- "timestamp": 0
}, - "radio": {
- "payload": 0,
- "timestamp": 0
}, - "operator": {
- "payload": 0,
- "timestamp": 0
}
}, - "wwan0": {
- "payload": {
- "link": "string",
- "ip_address": "string",
- "netmask": "string",
- "broadcast": "string"
}, - "timestamp": 0
}, - "eth0": {
- "payload": {
- "link": "string",
- "ip_address": "string",
- "netmask": "string",
- "broadcast": "string"
}, - "timestamp": 0
}, - "eth1": {
- "payload": {
- "link": "string",
- "ip_address": "string",
- "netmask": "string",
- "broadcast": "string"
}, - "timestamp": 0
}
}, - "features": [
- "ENABLE_GATEWAY_SCALING"
], - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
]
Update a device information
deviceId required | string The ID of the device |
name | string A short name for this box |
description | string A long description for this box |
organizationId | string <uuid> The organization this device belongs to |
deviceGroupId | string <uuid> The device group this device belongs to (optional) |
object Tags associated with this device | |
siteId | string The site belongs to (optional) |
externalId | string A user provided id, useful for identifying devices using an id not provided by Wattsense |
{- "name": "string",
- "description": "string",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "deviceGroupId": "47103c21-a78d-4990-a233-7f9ad2536254",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "siteId": "string",
- "externalId": "string"
}
{- "deviceId": "string",
- "hardwareId": "string",
- "lifecycle": "FACTORY",
- "name": "string",
- "description": "string",
- "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "deviceGroupId": "47103c21-a78d-4990-a233-7f9ad2536254",
- "siteId": "string",
- "externalId": "string",
- "deviceVersionInfo": {
- "software": "string",
- "hardware": "string",
- "bsp": "string",
- "apps": "string",
- "imageId": "string"
}, - "subscription": {
- "startDate": "2019-08-24",
- "endDate": "2019-08-24",
- "isRenewed": true,
- "isExpired": true
}, - "openAlarms": [
- {
- "alarmId": "string",
- "deviceId": "string",
- "name": "string",
- "description": "string",
- "temporalConstraints": {
- "requiredOccurrences": 0,
- "occurrenceTimeIntervalSeconds": 0,
- "currentOccurrences": 0,
- "lastOccurrenceTime": 0,
- "currentOkOccurrences": 0,
- "lastOkOccurrenceTime": 0
}, - "alarmConfig": {
- "type": "PROPERTY_MEASUREMENT"
}, - "alarmNotifications": [
- {
- "nestedNotificationId": "string",
- "notification": {
- "typeOf": "EMAIL"
}, - "notificationIntervalSeconds": 0,
- "lastSentAt": 0,
- "sendForPriority": "CRITICAL",
- "useForTemporization": true
}
], - "occurrenceHistory": [
- {
- "constraintId": "string",
- "lastOccurrenceTime": 0,
- "currentOccurrences": 0
}
], - "status": "ACKNOWLEDGED",
- "enableTemporization": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
], - "activeTasks": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "deviceId": "string",
- "type": {
- "type": "RVL_MIGRATION"
}, - "status": "PENDING",
- "statusChanges": [
- {
- "from": "PENDING",
- "to": "PENDING",
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string"
}
], - "stepsChanges": [
- {
- "from": 0,
- "to": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string"
}
], - "maxSteps": 0,
- "currentStep": 0,
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
], - "tags": {
- "property1": "string",
- "property2": "string"
}, - "type": "TOWER",
- "activationDate": "2019-08-24T14:15:22Z",
- "connectivityStatus": {
- "deviceId": "string",
- "connectionStatusInfo": {
- "status": "ONLINE",
- "timestamp": 0
}, - "requestedDataUplink": {
- "command": "string",
- "status": "IN_PROGRESS",
- "timestamp": 0,
- "lastUpdateTimestamp": 0
}, - "currentDataUplink": {
- "status": "DATA_STARTED",
- "startAt": 0,
- "endAt": 0
}, - "modem": {
- "level": {
- "payload": 0,
- "timestamp": 0
}, - "radio": {
- "payload": 0,
- "timestamp": 0
}, - "operator": {
- "payload": 0,
- "timestamp": 0
}
}, - "wwan0": {
- "payload": {
- "link": "string",
- "ip_address": "string",
- "netmask": "string",
- "broadcast": "string"
}, - "timestamp": 0
}, - "eth0": {
- "payload": {
- "link": "string",
- "ip_address": "string",
- "netmask": "string",
- "broadcast": "string"
}, - "timestamp": 0
}, - "eth1": {
- "payload": {
- "link": "string",
- "ip_address": "string",
- "netmask": "string",
- "broadcast": "string"
}, - "timestamp": 0
}
}, - "features": [
- "ENABLE_GATEWAY_SCALING"
], - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
deviceId required | string The ID of the device |
property required | string The ID or the slug of the property to query |
includeHistory | boolean |
{- "deviceId": "string",
- "property": "string",
- "slug": "string",
- "name": "string",
- "timestamp": 0,
- "payload": 23.3,
- "scaledPayload": 2.33,
- "writeTimestamp": 0,
- "writePayload": 33,
- "writeScaledPayload": 2.33,
- "writeOutOfService": true,
- "unit": "null",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "externalId": "string",
- "isOutOfService": true,
- "history": {
- "readValues": [
- {
- "timestamp": 0,
- "payload": 23.3,
- "scaledPayload": 2.33,
- "outOfService": true
}
], - "writeValues": [
- {
- "timestamp": 0,
- "payload": 23.3,
- "scaledPayload": 2.33,
- "outOfService": true
}
]
}
}
DEPRECATED: This endpoint is deprecated in favor of the Search device properties values endpoint because it doesn't limit the number of properties in the filter.
This endpoint allows you to search for measurements sent by a device. If no parameter is passed, it returns all the values for all the properties of the device during the last 24 hours.
This endpoint returns paginated results. The pagination uses Link
header for
defining next
, prev
, first
and last
links. It is presented as a list of
links separated by a comma, as defined in RCF5988, following the pattern:
</v1/devices/deviceId/properties?page=2>; rel="next"
. For performance reasons, there
is no last
item provided. You can use the absence of next
or a status 204 (NO CONTENT)
as a stop.
Parsing the header could be done either manually or using a library such as
Python's requests
:
import requests
result = requests.get("https://api.wattsense.com/v1/devices/my-device/properties", ...)
if result.links.get('next'):
# get next page
result = requests.get(result.links['next']['url'], ...)
The pagination is one-based, i.e. the first page is 1. After the last page we return
an empty list with a status code 204 (NO_CONTENT)
. This could be used as an off-by-one
stop as the absence of the next
url in the header is enough to indicate that there would
be no more content after this.
For simplicity, we provide the following example to query data on a custom time range:
import requests
import base64
import time
import datetime
from urllib.parse import urlparse
requests.packages.urllib3.disable_warnings()
# import the WattsenseAuth class defined earlier
from sign_request import WattsenseAuth
url = 'https://api.wattsense.com'
api_key = '132BA4C2309A9E069BDF129138680F89'
api_secret = 'ZTgwZTliMWJhZmQ4NmFhMmM2M2U5MjdkMTI1MzliYzFmMTYyMWZkMzcyOTIxMzRkNzA0MTQ5ZWRmY2JiMDc3Yg=='
sub_id = '7b7690a2-9d09-4518-909d-83c24f7874eb'
def get_data(device_id, since, until, property_name=None, size_per_request=500):
params = {'since': int(time.mktime(datetime.datetime.strptime(since, "%Y-%m-%d %H:%M").timetuple()) * 1000),
'until': int(time.mktime(datetime.datetime.strptime(until, "%Y-%m-%d %H:%M").timetuple()) * 1000),
'size': size_per_request }
if property_name:
params['property'] = property_name
elements = []
res = requests.get(f'{url}/v1/devices/{device_id}/properties', params=params, auth=WattsenseAuth(api_key=api_key, api_secret=api_secret))
while res.status_code == 200:
elements = elements + res.json()
if res.links.get('next'):
next_url_query = urlparse(res.links['next']['url']).query
# parse next url query parameters
params = dict(x.split('=') for x in next_url_query.split('&'))
res = requests.get(f'{url}/v1/devices/{device_id}/properties', params=params, auth=WattsenseAuth(api_key=api_key, api_secret=api_secret)))
else:
break
return elements
# you can then call it using:
result = get_data("dev-one", "2018-07-12 00:00", "2018-07-13 23:59", size_per_request=10)
# if you have python-tabulate
from tabulate import tabulate
print(tabulate([[e['property'],
datetime.datetime.fromtimestamp(e['timestamp'] / 1000),
e['payload']] for e in result], headers=['property', 'date', 'value']))
which (if you have the library tabulate) will yield a result similar to this:
property date value
---------- -------------------------- -------
temp2 2018-07-12 13:26:12.679000 20.8968
temp2 2018-07-12 13:26:12.578000 20.5863
temp2 2018-07-12 13:26:12.478000 20.7995
temp2 2018-07-12 13:26:12.376000 20.239
temp2 2018-07-12 13:26:12.277000 20.5092
temp2 2018-07-12 13:26:12.175000 20.7335
temp2 2018-07-12 13:26:12.073000 19.0188
temp2 2018-07-12 13:26:11.974000 20.8744
temp2 2018-07-12 13:26:11.871000 20.1135
temp1 2018-07-12 13:26:11.792000 59.3164
temp2 2018-07-12 13:26:11.771000 20.8935
temp1 2018-07-12 13:26:11.690000 59.8559
temp2 2018-07-12 13:26:11.669000 19.5403
temp1 2018-07-12 13:26:11.590000 60.7562
temp2 2018-07-12 13:26:11.570000 19.1456
temp1 2018-07-12 13:26:11.488000 60.3213
temp2 2018-07-12 13:26:11.467000 20.3842
temp1 2018-07-12 13:26:11.389000 60.4053
deviceId required | string The ID of the device |
property | Array of strings [ 0 .. 64 ] items Filter the measurements by one or many properties |
equipmentId | string Filter by equipment ID |
since | integer <int64> Since timestamp |
until | integer <int64> Until timestamp |
page | integer >= 1 Default: 1 One-based page index (1..N) |
size | integer >= 1 Default: 20 The size of the page to be returned |
sort | Array of strings Default: "timestamp,DESC" Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
distinct | boolean Remove duplicates from the result of the current page (does not alter the pagination) |
tag | string Filter the results by a Tag key and/or a tag value. The filter has to
be in the format Multiple filters can be used, by repeating the query as in
|
[- {
- "deviceId": "string",
- "property": "string",
- "slug": "string",
- "name": "string",
- "timestamp": 0,
- "payload": 23.3,
- "scaledPayload": 2.33,
- "writeTimestamp": 0,
- "writePayload": 33,
- "writeScaledPayload": 2.33,
- "writeOutOfService": true,
- "unit": "null",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "externalId": "string",
- "isOutOfService": true,
- "history": {
- "readValues": [
- {
- "timestamp": 0,
- "payload": 23.3,
- "scaledPayload": 2.33,
- "outOfService": true
}
], - "writeValues": [
- {
- "timestamp": 0,
- "payload": 23.3,
- "scaledPayload": 2.33,
- "outOfService": true
}
]
}
}
]
deviceId required | string The ID of the device |
historySize | integer <int32> [ 1 .. 10 ] The number of values to return for each property |
[- {
- "property": {
- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}, - "values": [
- {
- "timestamp": 0,
- "payload": 23.3,
- "scaledPayload": 2.33,
- "outOfService": true
}
]
}
]
deviceId required | string The ID of the device |
page | integer >= 1 Default: 1 One-based page index (1..N) |
size | integer >= 1 Default: 20 The size of the page to be returned |
sort | Array of strings Default: "timestamp,DESC" Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
properties | Array of strings Filter the measurements by one or many properties |
equipmentId | string Filter by equipment ID |
since | integer <int64> Since timestamp |
until | integer <int64> Until timestamp |
distinct required | boolean Remove duplicates from the result of the current page (does not alter the pagination) |
tag | Array of strings Filter the results by a Tag key and/or a tag value. The filter has to
be in the format Multiple filters can be used, by repeating the query as in
|
{- "properties": [
- "string"
], - "equipmentId": "string",
- "since": 0,
- "until": 0,
- "distinct": true,
- "tag": [
- "string"
]
}
[- {
- "property": {
- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}, - "values": [
- {
- "timestamp": 0,
- "payload": 23.3,
- "scaledPayload": 2.33,
- "outOfService": true
}
]
}
]
This endpoint allows you to set the value of a specific property on the device.
The request must contain a payload that can be either string
or a number
.
This operation returns a commandId
that can be used to check the status of the operation
using Get a specific command sent to a device. With the integration of lorawan, the set property can be used to
send a downlink message to a Lorawan sensor. For this a payload that contains the encoded downlink payload and a port separated by
a colon @sys-rawPayload-downlink
.
deviceId required | string The ID of the device |
property required | string The name of the property |
PropertyNumberValue (number) or PropertyStringValue (string) or Array of PropertyArrayValue (integers) or PropertyJsonValue (object) or Date (string) or DateTime (string) or (PropertyDailyScheduleValue (Array of LpbDailySchedule (objects) or Array of SyncoDailySchedule (objects) or Array of BacnetDailySchedule (objects))) or PropertyFreeFormDateTimeValue (object) or PropertyDateTimeRangeValue (object) or PropertySyncoExceptionPeriodValue (object) or (Array of WeeklySchedule (Array of LpbDailySchedule (objects) or Array of SyncoDailySchedule (objects) or Array of BacnetDailySchedule (objects))) or PropertyBacnetScheduleValue (object) The value to set on the device. This has to be a valid JSON type, example of supported values:
If a
| |
nullify | boolean Explicitly ask the device to nullify the value. The payload has to be set to |
setOutOfService | boolean Set the Out Of Service status on the equipment's property. This is protocol specific, only supported on RVLs for the moment |
isScaled | boolean Specifies that the payload value is scaled. Value will be unscaled before sending it to the equipment |
{- "payload": 0,
- "nullify": true,
- "setOutOfService": true,
- "isScaled": true
}
{- "commandId": "string",
- "status": "NEW"
}
Wattsense stores data in two different locations, in a database that we qualify as "hot", i.e. data is immediately accessible via the API, and is archived in a "cold" storage location. Data's lifecycle is as follow:
The data in the archives is exported in bulk and stored in a zip archive. This archive contains a folder named as the requested device id, with one or many files:
yyyy_mm_dd.json
(for json)deviceId
├── 2020_08_29.json
├── 2020_08_30.json
├── 2020_08_31.json
└── 2020_09_01.json
yyyy_mm.json
(for json).deviceId
├── 2020_08.json
└── 2020_09.json
Each file will contain the dates requested. Therfore, if you request data from 29th of August to September 1st, you will obtain two files, in the August file
there will be data for the 29th, 30th, 31st and in the September file there will be the data for the 1st.The extension of the file depends on the export format, json
, csv
, or xlsx
.
Each json contains one row per data value, using the same format as defined in the Get device properties values API endpoint's result:
{"deviceId":"deviceId","property":"AiRP4nLREwpzmzfR","timestamp":1598572800073,"payload":1.0,"name":"prop one"}
{"deviceId":"deviceId","property":"HcwFaXJpcpX84vP1","timestamp":1598572800084,"payload":true,"name":"another prop"}
{"deviceId":"deviceId","property":"7L9dRX8KrDPk3oTJ","timestamp":1598572800175,"payload":9.0,"name":"yet another prop"}
{"deviceId":"deviceId","property":"83kwdnK2UjMA8FmB","timestamp":1598572800187,"payload":0,"name":"a name","description":"a description"}
The same keys will be used for CSV and for Excel exports.
Some important remarks:
Get an operation
operationId required | string The ID of the operation |
{- "operationId": "string",
- "requestDetails": {
- "deviceId": "string",
- "fromDate": "2019-08-24",
- "untilDate": "2019-08-24",
- "format": "JSON",
- "transformation": {
- "transformationType": "NOOP"
}, - "propertyIds": [
- "string"
], - "sendTo": "string",
- "recipients": [
- "string"
], - "dateTimeZone": "Europe/Paris",
- "type": "ONE_TIME",
- "frequency": {
- "type": "WEEKLY"
}, - "requestId": "string",
- "name": "string",
- "endAt": "2019-08-24"
}, - "status": "NEW",
- "startedAt": "2019-08-24T14:15:22Z",
- "finishedAt": "2019-08-24T14:15:22Z",
- "requestedBy": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
List archive requests for a device
deviceId required | string The ID of the device |
type | string (DeviceArchiveRequestType) Enum: "ONE_TIME" "RECURRING" |
[- {
- "id": "string",
- "deviceId": "string",
- "type": "ONE_TIME",
- "format": "JSON",
- "transformation": {
- "transformationType": "NOOP"
}, - "propertyIds": [
- "string"
], - "recipients": [
- "string"
], - "dateTimeZone": "Europe/Paris",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
]
List all operations for a specific device
deviceId required | string The ID of the device |
status | string (OperationStatus) Enum: "NEW" "STARTED" "ENDED" "FAILED" The status of the operation |
[- {
- "operationId": "string",
- "requestDetails": {
- "deviceId": "string",
- "fromDate": "2019-08-24",
- "untilDate": "2019-08-24",
- "format": "JSON",
- "transformation": {
- "transformationType": "NOOP"
}, - "propertyIds": [
- "string"
], - "sendTo": "string",
- "recipients": [
- "string"
], - "dateTimeZone": "Europe/Paris",
- "type": "ONE_TIME",
- "frequency": {
- "type": "WEEKLY"
}, - "requestId": "string",
- "name": "string",
- "endAt": "2019-08-24"
}, - "status": "NEW",
- "startedAt": "2019-08-24T14:15:22Z",
- "finishedAt": "2019-08-24T14:15:22Z",
- "requestedBy": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
]
Request an archive for a device
deviceId required | string The ID of the device |
type | string |
deviceId required | string |
format | string Enum: "JSON" "CSV" "XLSX" |
object | |
propertyIds | Array of strings |
sendTo | string Deprecated only for backward compatibility |
recipients required | Array of strings |
dateTimeZone | string |
fromDate required | string <date> |
untilDate required | string <date> |
id required | string |
createdAt | string <date-time> |
updatedAt | string <date-time> |
{- "type": "ONE_TIME",
- "deviceId": "string",
- "format": "JSON",
- "transformation": {
- "transformationType": "NOOP"
}, - "propertyIds": [
- "string"
], - "sendTo": "string",
- "recipients": [
- "string"
], - "dateTimeZone": "Europe/Paris",
- "fromDate": "2019-08-24",
- "untilDate": "2019-08-24",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
{- "type": "ONE_TIME",
- "deviceId": "string",
- "format": "JSON",
- "transformation": {
- "transformationType": "NOOP"
}, - "propertyIds": [
- "string"
], - "sendTo": "string",
- "recipients": [
- "string"
], - "dateTimeZone": "Europe/Paris",
- "fromDate": "2019-08-24",
- "untilDate": "2019-08-24",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Request an archive for a device.
Note: This endpoint is deprecated and will be removed in a future release. Use this endpoint instead.
type | string |
deviceId required | string |
format | string Enum: "JSON" "CSV" "XLSX" |
object | |
propertyIds | Array of strings |
sendTo | string Deprecated only for backward compatibility |
recipients required | Array of strings |
dateTimeZone | string |
fromDate required | string <date> |
untilDate required | string <date> |
id required | string |
createdAt | string <date-time> |
updatedAt | string <date-time> |
{- "type": "ONE_TIME",
- "deviceId": "string",
- "format": "JSON",
- "transformation": {
- "transformationType": "NOOP"
}, - "propertyIds": [
- "string"
], - "sendTo": "string",
- "recipients": [
- "string"
], - "dateTimeZone": "Europe/Paris",
- "fromDate": "2019-08-24",
- "untilDate": "2019-08-24",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
{- "operationId": "string",
- "requestDetails": {
- "deviceId": "string",
- "fromDate": "2019-08-24",
- "untilDate": "2019-08-24",
- "format": "JSON",
- "transformation": {
- "transformationType": "NOOP"
}, - "propertyIds": [
- "string"
], - "sendTo": "string",
- "recipients": [
- "string"
], - "dateTimeZone": "Europe/Paris",
- "type": "ONE_TIME",
- "frequency": {
- "type": "WEEKLY"
}, - "requestId": "string",
- "name": "string",
- "endAt": "2019-08-24"
}, - "status": "NEW",
- "startedAt": "2019-08-24T14:15:22Z",
- "finishedAt": "2019-08-24T14:15:22Z",
- "requestedBy": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
Update a recurring archive request
deviceId required | string The ID of the device |
requestId required | string The ID of the request |
name | string |
recipients | Array of strings (Email) |
endAt | string |
propertyIds | Array of strings |
{- "name": "string",
- "recipients": [
- "string"
], - "endAt": "string",
- "propertyIds": [
- "string"
]
}
{- "type": "ONE_TIME",
- "deviceId": "string",
- "format": "JSON",
- "transformation": {
- "transformationType": "NOOP"
}, - "propertyIds": [
- "string"
], - "sendTo": "string",
- "recipients": [
- "string"
], - "dateTimeZone": "Europe/Paris",
- "fromDate": "2019-08-24",
- "untilDate": "2019-08-24",
- "id": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z"
}
Get the information about a command
deviceId required | string |
commandId required | string |
{- "commandId": "string",
- "deviceId": "string",
- "commandType": "string",
- "status": "NEW",
- "timestamp": 0,
- "lastUpdateTimestamp": 0,
- "schedulingPayload": { },
- "valuePayload": {
- "propertyId": "string",
- "value": { },
- "propertyConfig": {
- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}, - "requestType": "read",
- "setOutOfService": true,
- "isScaled": true
}, - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
List all the commands sent by the user or the platform to the box.
deviceId required | string |
commandType | string |
status | string (CommandStatus) Enum: "NEW" "SENT" "RECEIVED" "RETRY_SEND" "RETRY_CALLBACK" "ERROR_NOT_RECEIVED" "ERROR_NOT_SENT" "ERROR_TIMEOUT" "ERROR_INVALID_VALUE" "SCHEDULED" "WAITING_FOR_HARDWARE_CONNECTION" "ERROR_RATE_LIMIT" "ERROR_ALREADY_IN_PROGRESS" |
propertyId | string |
createdBy | string |
since | integer <int64> |
until | integer <int64> |
page | integer >= 1 Default: 1 One-based page index (1..N) |
size | integer >= 1 Default: 20 The size of the page to be returned |
sort | Array of strings Default: "timestamp,DESC" Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
[- {
- "commandId": "string",
- "deviceId": "string",
- "commandType": "string",
- "status": "NEW",
- "timestamp": 0,
- "lastUpdateTimestamp": 0,
- "schedulingPayload": { },
- "valuePayload": {
- "propertyId": "string",
- "value": { },
- "propertyConfig": {
- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}, - "requestType": "read",
- "setOutOfService": true,
- "isScaled": true
}, - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
]
List all the events related to a specific device, i.e. the events sent by a device. This include:
deviceId required | string The ID of the device |
codeFrom | integer <int32> Filter the events by their code |
codeTo | integer <int32> Filter the events by their code |
code | integer <int32> Filter the events by their code |
property | string The propertyId to filter the event |
equipmentId | string The equipmentId to filter the event used only for the status and equipment activation event |
since | integer <int64> The starting date for the events to recover, defaults to 1 day in the past |
until | integer <int64> The end date for the events to recover, defaults to current |
page | integer >= 1 Default: 1 One-based page index (1..N) |
size | integer >= 1 Default: 20 The size of the page to be returned |
sort | Array of strings Default: "timestamp,DESC" Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
[- {
- "eventId": "d6703cc8-9e79-415d-ac03-a4dc7f6ab43c",
- "deviceId": "string",
- "code": 0,
- "timestamp": 0,
- "externalId": "string",
- "property": "string",
- "message": "string",
- "bacnetDiscoveryPayload": {
- "discoveryId": {
- "timestamp": 0,
- "date": "2019-08-24T14:15:22Z"
}, - "deviceId": "string",
- "commandId": "string",
- "timestamp": 0,
- "lastUpdateTimestamp": 0,
- "network": "string",
- "payload": {
- "empty": true,
- "property1": {
- "empty": true,
- "property1": {
- "empty": true,
- "property1": {
- "property1": { },
- "property2": { }
}, - "property2": {
- "property1": { },
- "property2": { }
}
}, - "property2": {
- "empty": true,
- "property1": {
- "property1": { },
- "property2": { }
}, - "property2": {
- "property1": { },
- "property2": { }
}
}
}, - "property2": {
- "empty": true,
- "property1": {
- "empty": true,
- "property1": {
- "property1": { },
- "property2": { }
}, - "property2": {
- "property1": { },
- "property2": { }
}
}, - "property2": {
- "empty": true,
- "property1": {
- "property1": { },
- "property2": { }
}, - "property2": {
- "property1": { },
- "property2": { }
}
}
}
}, - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}, - "commandStatusPayload": {
- "commandId": "string",
- "operationStatus": "SENT",
- "transmissionProtocol": "API"
}, - "deviceVersionPayload": {
- "software": "string",
- "hardware": "string",
- "bsp": "string",
- "apps": "string",
- "wsgateway": "string",
- "image_id": "string"
}, - "equipmentStatusPayload": {
- "protocol": "MODBUS_SERIAL",
- "equipmentId": "string"
}, - "equipmentActivationPayload": {
- "protocol": "MODBUS_SERIAL",
- "equipmentId": "string"
}, - "failedPostPayload": {
- "originalPayload": "string",
- "sourceTopic": "string"
}, - "dataUplinkPayload": {
- "startAt": 0,
- "endAt": 0
}, - "webhookFailedPayload": {
- "webhookId": "ed71eef4-4c34-46dc-81fe-954e560454fd",
- "errorMessage": "string",
- "url": "string"
}, - "archiveRetrievalPayload": {
- "operationId": "string",
- "status": "NEW",
- "key": "string"
}, - "downlinkStatusPayload": {
- "propertyId": "string",
- "commandId": "string",
- "success": true
}, - "configOriginInfo": {
- "configOrigin": "da",
- "checksum": "string"
}, - "appliedRoutingTable": {
- "ipv4": [
- {
- "interface": "string",
- "destination": "string",
- "gateway": "string",
- "metric": 0
}
]
}
}
]
Create an alarm
deviceId required | string The ID of the device |
name required | string The name of the alarm |
description | string The description of the alarm |
required | object (AlarmConfig) The conditions to trigger the alarm |
object (TemporalConstraints) The temporal constraints of the alarm | |
required | Array of objects (AlarmNotificationConfig) non-empty The type of notifications to send when the alarm is triggered |
enableTemporization | boolean Indicates if the alarm must be close automatically when the alarm conditions returns to normal |
object The tags of the alarm |
{- "name": "string",
- "description": "string",
- "alarmConfig": {
- "type": "PROPERTY_MEASUREMENT"
}, - "temporalConstraints": {
- "requiredOccurrences": 0,
- "occurrenceTimeIntervalSeconds": 0,
- "currentOccurrences": 0,
- "lastOccurrenceTime": 0,
- "currentOkOccurrences": 0,
- "lastOkOccurrenceTime": 0
}, - "alarmNotifications": [
- {
- "notification": {
- "typeOf": "EMAIL"
}, - "notificationIntervalSeconds": 0,
- "sendForPriority": "CRITICAL",
- "useForTemporization": true
}
], - "enableTemporization": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
{- "alarmId": "string",
- "deviceId": "string",
- "name": "string",
- "description": "string",
- "temporalConstraints": {
- "requiredOccurrences": 0,
- "occurrenceTimeIntervalSeconds": 0,
- "currentOccurrences": 0,
- "lastOccurrenceTime": 0,
- "currentOkOccurrences": 0,
- "lastOkOccurrenceTime": 0
}, - "alarmConfig": {
- "type": "PROPERTY_MEASUREMENT"
}, - "alarmNotifications": [
- {
- "nestedNotificationId": "string",
- "notification": {
- "typeOf": "EMAIL"
}, - "notificationIntervalSeconds": 0,
- "useForTemporization": true,
- "sendForPriority": "CRITICAL"
}
], - "tags": {
- "property1": "string",
- "property2": "string"
}, - "status": "ACKNOWLEDGED",
- "globalPriority": "CRITICAL",
- "lastTriggeredAt": 0,
- "enableTemporization": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
Delete an alarm
deviceId required | string The ID of the device |
alarmId required | string |
{- "alarmId": "string",
- "deviceId": "string",
- "name": "string",
- "description": "string",
- "temporalConstraints": {
- "requiredOccurrences": 0,
- "occurrenceTimeIntervalSeconds": 0,
- "currentOccurrences": 0,
- "lastOccurrenceTime": 0,
- "currentOkOccurrences": 0,
- "lastOkOccurrenceTime": 0
}, - "alarmConfig": {
- "type": "PROPERTY_MEASUREMENT"
}, - "alarmNotifications": [
- {
- "nestedNotificationId": "string",
- "notification": {
- "typeOf": "EMAIL"
}, - "notificationIntervalSeconds": 0,
- "useForTemporization": true,
- "sendForPriority": "CRITICAL"
}
], - "tags": {
- "property1": "string",
- "property2": "string"
}, - "status": "ACKNOWLEDGED",
- "globalPriority": "CRITICAL",
- "lastTriggeredAt": 0,
- "enableTemporization": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
{- "alarmId": "string",
- "deviceId": "string",
- "name": "string",
- "description": "string",
- "temporalConstraints": {
- "requiredOccurrences": 0,
- "occurrenceTimeIntervalSeconds": 0,
- "currentOccurrences": 0,
- "lastOccurrenceTime": 0,
- "currentOkOccurrences": 0,
- "lastOkOccurrenceTime": 0
}, - "alarmConfig": {
- "type": "PROPERTY_MEASUREMENT"
}, - "alarmNotifications": [
- {
- "nestedNotificationId": "string",
- "notification": {
- "typeOf": "EMAIL"
}, - "notificationIntervalSeconds": 0,
- "useForTemporization": true,
- "sendForPriority": "CRITICAL"
}
], - "tags": {
- "property1": "string",
- "property2": "string"
}, - "status": "ACKNOWLEDGED",
- "globalPriority": "CRITICAL",
- "lastTriggeredAt": 0,
- "enableTemporization": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
Get a specific alarm history
deviceId required | string The ID of the device |
alarmId required | string |
historyId required | string |
{- "alarmHistoryId": "string",
- "alarmId": "string",
- "deviceId": "string",
- "triggeringStatus": {
- "type": "PROPERTY_MEASUREMENT"
}, - "details": {
- "status": "ACKNOWLEDGED",
- "priority": "CRITICAL",
- "actions": [
- {
- "actionId": "string",
- "username": "string",
- "message": "string",
- "actionTime": "2019-08-24T14:15:22Z",
- "oldStatus": "ACKNOWLEDGED",
- "newStatus": "ACKNOWLEDGED",
- "oldPriority": "CRITICAL",
- "newPriority": "CRITICAL"
}
], - "updatedAt": "2019-08-24T14:15:22Z"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "triggeredAt": 0
}
Get an alarm with history
deviceId required | string |
alarmId required | string |
{- "alarmResponse": {
- "alarmId": "string",
- "deviceId": "string",
- "name": "string",
- "description": "string",
- "temporalConstraints": {
- "requiredOccurrences": 0,
- "occurrenceTimeIntervalSeconds": 0,
- "currentOccurrences": 0,
- "lastOccurrenceTime": 0,
- "currentOkOccurrences": 0,
- "lastOkOccurrenceTime": 0
}, - "alarmConfig": {
- "type": "PROPERTY_MEASUREMENT"
}, - "alarmNotifications": [
- {
- "nestedNotificationId": "string",
- "notification": {
- "typeOf": "EMAIL"
}, - "notificationIntervalSeconds": 0,
- "useForTemporization": true,
- "sendForPriority": "CRITICAL"
}
], - "tags": {
- "property1": "string",
- "property2": "string"
}, - "status": "ACKNOWLEDGED",
- "globalPriority": "CRITICAL",
- "lastTriggeredAt": 0,
- "enableTemporization": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}, - "lastHistory": {
- "alarmHistoryId": "string",
- "alarmId": "string",
- "deviceId": "string",
- "triggeringStatus": {
- "type": "PROPERTY_MEASUREMENT"
}, - "details": {
- "status": "ACKNOWLEDGED",
- "priority": "CRITICAL",
- "actions": [
- {
- "actionId": "string",
- "username": "string",
- "message": "string",
- "actionTime": "2019-08-24T14:15:22Z",
- "oldStatus": "ACKNOWLEDGED",
- "newStatus": "ACKNOWLEDGED",
- "oldPriority": "CRITICAL",
- "newPriority": "CRITICAL"
}
], - "updatedAt": "2019-08-24T14:15:22Z"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "triggeredAt": 0
}
}
List alarm history for a specific alarm
deviceId required | string The ID of the device |
alarmId required | string |
from | integer <int64> |
to | integer <int64> |
type | string (TypeOfAlarm) Enum: "PROPERTY_MEASUREMENT" "EQUIPMENT_STATUS" |
page | integer >= 1 Default: 1 One-based page index (1..N) |
size | integer >= 1 Default: 20 The size of the page to be returned |
sort | Array of strings Default: "triggeredAt,DESC" Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
[- {
- "alarmHistoryId": "string",
- "alarmId": "string",
- "deviceId": "string",
- "triggeringStatus": {
- "type": "PROPERTY_MEASUREMENT"
}, - "details": {
- "status": "ACKNOWLEDGED",
- "priority": "CRITICAL",
- "actions": [
- {
- "actionId": "string",
- "username": "string",
- "message": "string",
- "actionTime": "2019-08-24T14:15:22Z",
- "oldStatus": "ACKNOWLEDGED",
- "newStatus": "ACKNOWLEDGED",
- "oldPriority": "CRITICAL",
- "newPriority": "CRITICAL"
}
], - "updatedAt": "2019-08-24T14:15:22Z"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "triggeredAt": 0
}
]
List alarms based on the provided criteria
organizationId | string <uuid> ID of the organization |
type | string (TypeOfAlarm) Enum: "PROPERTY_MEASUREMENT" "EQUIPMENT_STATUS" Type of the alarm |
status | string (AlarmStatus) Enum: "ACKNOWLEDGED" "OPEN" "CLOSED" "DISABLED" "ARCHIVED" Status of the alarm |
[- {
- "alarmId": "string",
- "deviceId": "string",
- "name": "string",
- "description": "string",
- "temporalConstraints": {
- "requiredOccurrences": 0,
- "occurrenceTimeIntervalSeconds": 0,
- "currentOccurrences": 0,
- "lastOccurrenceTime": 0,
- "currentOkOccurrences": 0,
- "lastOkOccurrenceTime": 0
}, - "alarmConfig": {
- "type": "PROPERTY_MEASUREMENT"
}, - "alarmNotifications": [
- {
- "nestedNotificationId": "string",
- "notification": {
- "typeOf": "EMAIL"
}, - "notificationIntervalSeconds": 0,
- "useForTemporization": true,
- "sendForPriority": "CRITICAL"
}
], - "tags": {
- "property1": "string",
- "property2": "string"
}, - "status": "ACKNOWLEDGED",
- "globalPriority": "CRITICAL",
- "lastTriggeredAt": 0,
- "enableTemporization": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
]
List alarms for a device
deviceId required | string The ID of the device |
type | string (TypeOfAlarm) Enum: "PROPERTY_MEASUREMENT" "EQUIPMENT_STATUS" |
propertyIds | Array of strings |
equipmentIds | Array of strings |
status | string (AlarmStatus) Enum: "ACKNOWLEDGED" "OPEN" "CLOSED" "DISABLED" "ARCHIVED" |
priority | string (AlarmLevel) Enum: "CRITICAL" "STANDARD" |
tags | Array of strings |
page | integer >= 1 Default: 1 One-based page index (1..N) |
size | integer >= 1 Default: 20 The size of the page to be returned |
sort | Array of strings Default: "updatedAt,DESC" Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
[- {
- "alarmId": "string",
- "deviceId": "string",
- "name": "string",
- "description": "string",
- "temporalConstraints": {
- "requiredOccurrences": 0,
- "occurrenceTimeIntervalSeconds": 0,
- "currentOccurrences": 0,
- "lastOccurrenceTime": 0,
- "currentOkOccurrences": 0,
- "lastOkOccurrenceTime": 0
}, - "alarmConfig": {
- "type": "PROPERTY_MEASUREMENT"
}, - "alarmNotifications": [
- {
- "nestedNotificationId": "string",
- "notification": {
- "typeOf": "EMAIL"
}, - "notificationIntervalSeconds": 0,
- "useForTemporization": true,
- "sendForPriority": "CRITICAL"
}
], - "tags": {
- "property1": "string",
- "property2": "string"
}, - "status": "ACKNOWLEDGED",
- "globalPriority": "CRITICAL",
- "lastTriggeredAt": 0,
- "enableTemporization": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
]
Update an alarm
deviceId required | string The ID of the device |
alarmId required | string |
name | string The name of the alarm |
description | string The description of the alarm |
object (AlarmConfigUpdateRequest) The conditions to trigger the alarm | |
object (TemporalConstraints) The temporal constraints of the alarm | |
Array of objects (AlarmNotificationConfig) The type of notifications to send when the alarm is triggered | |
enableTemporization | boolean Indicates if the alarm must be close automatically when the alarm conditions returns to normal |
object | |
status | string (AlarmStatus) Enum: "ACKNOWLEDGED" "OPEN" "CLOSED" "DISABLED" "ARCHIVED" Indicates the status of the alarm |
{- "name": "string",
- "description": "string",
- "alarmConfig": {
- "type": "PROPERTY_MEASUREMENT"
}, - "temporalConstraints": {
- "requiredOccurrences": 0,
- "occurrenceTimeIntervalSeconds": 0,
- "currentOccurrences": 0,
- "lastOccurrenceTime": 0,
- "currentOkOccurrences": 0,
- "lastOkOccurrenceTime": 0
}, - "alarmNotifications": [
- {
- "notification": {
- "typeOf": "EMAIL"
}, - "notificationIntervalSeconds": 0,
- "sendForPriority": "CRITICAL",
- "useForTemporization": true
}
], - "enableTemporization": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "status": "ACKNOWLEDGED"
}
{- "alarmId": "string",
- "deviceId": "string",
- "name": "string",
- "description": "string",
- "temporalConstraints": {
- "requiredOccurrences": 0,
- "occurrenceTimeIntervalSeconds": 0,
- "currentOccurrences": 0,
- "lastOccurrenceTime": 0,
- "currentOkOccurrences": 0,
- "lastOkOccurrenceTime": 0
}, - "alarmConfig": {
- "type": "PROPERTY_MEASUREMENT"
}, - "alarmNotifications": [
- {
- "nestedNotificationId": "string",
- "notification": {
- "typeOf": "EMAIL"
}, - "notificationIntervalSeconds": 0,
- "useForTemporization": true,
- "sendForPriority": "CRITICAL"
}
], - "tags": {
- "property1": "string",
- "property2": "string"
}, - "status": "ACKNOWLEDGED",
- "globalPriority": "CRITICAL",
- "lastTriggeredAt": 0,
- "enableTemporization": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
Update constraints of an alarm
deviceId required | string |
alarmId required | string |
constraintType required | string (ConfigConstraintType) Value: "PROPERTY_ALARM" |
scheduleId | string |
Array of objects (ConstraintsConfigRequest) | |
removeConstraintIds | Array of strings |
{- "constraintType": "PROPERTY_ALARM",
- "scheduleId": "string",
- "newConstraints": [
- {
- "priority": "CRITICAL",
- "constraint": {
- "type": "RANGE_CONSTRAINT"
}, - "scheduleStateId": "string"
}
], - "removeConstraintIds": [
- "string"
]
}
{- "alarmId": "string",
- "deviceId": "string",
- "name": "string",
- "description": "string",
- "temporalConstraints": {
- "requiredOccurrences": 0,
- "occurrenceTimeIntervalSeconds": 0,
- "currentOccurrences": 0,
- "lastOccurrenceTime": 0,
- "currentOkOccurrences": 0,
- "lastOkOccurrenceTime": 0
}, - "alarmConfig": {
- "type": "PROPERTY_MEASUREMENT"
}, - "alarmNotifications": [
- {
- "nestedNotificationId": "string",
- "notification": {
- "typeOf": "EMAIL"
}, - "notificationIntervalSeconds": 0,
- "useForTemporization": true,
- "sendForPriority": "CRITICAL"
}
], - "tags": {
- "property1": "string",
- "property2": "string"
}, - "status": "ACKNOWLEDGED",
- "globalPriority": "CRITICAL",
- "lastTriggeredAt": 0,
- "enableTemporization": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
Update a specific alarm history
deviceId required | string The ID of the device |
alarmId required | string |
historyId required | string |
priority | string (AlarmLevel) Enum: "CRITICAL" "STANDARD" |
message | string |
status | string (AlarmStatus) Enum: "ACKNOWLEDGED" "OPEN" "CLOSED" "DISABLED" "ARCHIVED" |
applyStatusOnAlarm | boolean |
updateStatusOfPreviousAlarms | boolean |
{- "priority": "CRITICAL",
- "message": "string",
- "status": "ACKNOWLEDGED",
- "applyStatusOnAlarm": true,
- "updateStatusOfPreviousAlarms": true
}
{- "alarmHistoryId": "string",
- "alarmId": "string",
- "deviceId": "string",
- "triggeringStatus": {
- "type": "PROPERTY_MEASUREMENT"
}, - "details": {
- "status": "ACKNOWLEDGED",
- "priority": "CRITICAL",
- "actions": [
- {
- "actionId": "string",
- "username": "string",
- "message": "string",
- "actionTime": "2019-08-24T14:15:22Z",
- "oldStatus": "ACKNOWLEDGED",
- "newStatus": "ACKNOWLEDGED",
- "oldPriority": "CRITICAL",
- "newPriority": "CRITICAL"
}
], - "updatedAt": "2019-08-24T14:15:22Z"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "triggeredAt": 0
}
Update the status of an alarm
deviceId required | string The ID of the device |
alarmId required | string |
status required | string (AlarmStatus) Enum: "ACKNOWLEDGED" "OPEN" "CLOSED" "DISABLED" "ARCHIVED" |
{- "status": "ACKNOWLEDGED"
}
{- "alarmId": "string",
- "deviceId": "string",
- "name": "string",
- "description": "string",
- "temporalConstraints": {
- "requiredOccurrences": 0,
- "occurrenceTimeIntervalSeconds": 0,
- "currentOccurrences": 0,
- "lastOccurrenceTime": 0,
- "currentOkOccurrences": 0,
- "lastOkOccurrenceTime": 0
}, - "alarmConfig": {
- "type": "PROPERTY_MEASUREMENT"
}, - "alarmNotifications": [
- {
- "nestedNotificationId": "string",
- "notification": {
- "typeOf": "EMAIL"
}, - "notificationIntervalSeconds": 0,
- "useForTemporization": true,
- "sendForPriority": "CRITICAL"
}
], - "tags": {
- "property1": "string",
- "property2": "string"
}, - "status": "ACKNOWLEDGED",
- "globalPriority": "CRITICAL",
- "lastTriggeredAt": 0,
- "enableTemporization": true,
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
The Configuration Management API helps you to track the revisions (history) of configurations of your device. We, also, track the revision status:
Every device has a set of configurations:
Configuring a Wattsense box goes through multiple steps, as shown in the following diagram (this is not a physical connection schema). The arrows in the diagram define the dependencies, which defines the order in which the configuration should be done:
Editing is limited to DRAFT revision only. Therefore, when creating or updating a resource configuration, the platform checks if there is a draft or not. If not, we will automatically create a draft revision for you based on the current config revision.
Check the corresponding API.
This endpoint allows to create a new config revision, either from the current
revision (default) or from a specific revision (using parentRevisionId
).
Common use cases:
parentRevisionId
has
to be set to the exact revision id.publish
has to be set to true
. Combined
with parentRevisionId
, one can publish any revision. In this case the resulting revision
will skip the draft stage.deviceId required | string The ID of the device |
parentRevisionId | string <uuid> A revision to use as a basis. By default we use the current revision. If a value is set, we copy the config revision whose id is This has no effect if |
fromScratch | boolean Create a new revision from scratch by passing any older configuration. This will not keep any link with previous revisions. Any property created for this revision will not be linked to a previous property. Use this option only if you really want to restart from scratch. |
notes | string A description of this revision. Useful for listing the changes the user made in this revision |
publish | boolean Whether to publish immediately the revision after creation or not. This is useful when we want to re-publish an old revision. For more about publishing a revision see Publish the draft revision. NoteSome configuration changes will not trigger a send to device. Like changing the name, the slug, the units, transformations, and tags. |
object An object to tag this revision. This value will override the existing tags, you have to send all the tags you want to set. |
{- "parentRevisionId": "1fb68043-00cb-4434-923f-6cf26adb0f19",
- "fromScratch": true,
- "notes": "string",
- "publish": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
{- "revisionId": "bae12d01-48af-47b3-9304-b09ef0081cd6",
- "deviceId": "string",
- "parentRevisionId": "1fb68043-00cb-4434-923f-6cf26adb0f19",
- "notes": "string",
- "status": "DRAFT",
- "errors": [
- "string"
], - "properties": [
- {
- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "equipments": [
- {
- "equipmentId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "networks": [
- {
- "networkId": "string",
- "name": "string",
- "description": "string",
- "equipments": [
- "string"
], - "config": {
- "protocol": "MODBUS_SERIAL"
}, - "interFrameDelay": 1000000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "gatewayInterfaces": [
- {
- "gatewayInterfaceId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "BACNET_IP_GATEWAY"
}, - "interFrameDelay": 1000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "connectors": {
- "property1": {
- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}, - "property2": {
- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}
}, - "pinnedResources": {
- "property1": {
- "resourceId": "string",
- "versionId": "string",
- "useDefault": true
}, - "property2": {
- "resourceId": "string",
- "versionId": "string",
- "useDefault": true
}
}, - "commandId": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "scheduler": {
- "schedules": [
- {
- "scheduleId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "defaultStateId": "string",
- "weekly": [
- [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
]
], - "exceptions": [
- "string"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "disabled": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "drivenProperties": [
- {
- "propertyId": "string",
- "applicationPeriodId": "string",
- "values": [
- {
- "stateId": "string",
- "value": { }
}
]
}
]
}
], - "states": [
- {
- "stateId": "string",
- "name": "string",
- "color": "string"
}
], - "applicationPeriods": [
- {
- "applicationPeriodId": "string",
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}
], - "exceptions": [
- {
- "exceptionId": "string",
- "name": "string",
- "daily": [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - "period": {
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}, - "description": "string"
}
]
}, - "timeZone": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
Discarding the draft means that the draft is no longer useful for you. The status of the revision will change to DISCARDED. Discarded draft will be definitively removed after 30 days from being discarded.
Archiving the draft means that you no longer need to work on this revision for the moment and might come back to it later on. The status will change to ARCHIVED.
The endpoint returns the discarded/archived revision with its id. To restore a discarded revision, one has to create a new draft using this revisionId as source.
deviceId required | string The ID of the device |
archive | boolean |
{- "revisionId": "bae12d01-48af-47b3-9304-b09ef0081cd6",
- "deviceId": "string",
- "parentRevisionId": "1fb68043-00cb-4434-923f-6cf26adb0f19",
- "notes": "string",
- "status": "DRAFT",
- "errors": [
- "string"
], - "properties": [
- {
- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "equipments": [
- {
- "equipmentId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "networks": [
- {
- "networkId": "string",
- "name": "string",
- "description": "string",
- "equipments": [
- "string"
], - "config": {
- "protocol": "MODBUS_SERIAL"
}, - "interFrameDelay": 1000000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "gatewayInterfaces": [
- {
- "gatewayInterfaceId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "BACNET_IP_GATEWAY"
}, - "interFrameDelay": 1000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "connectors": {
- "property1": {
- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}, - "property2": {
- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}
}, - "pinnedResources": {
- "property1": {
- "resourceId": "string",
- "versionId": "string",
- "useDefault": true
}, - "property2": {
- "resourceId": "string",
- "versionId": "string",
- "useDefault": true
}
}, - "commandId": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "scheduler": {
- "schedules": [
- {
- "scheduleId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "defaultStateId": "string",
- "weekly": [
- [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
]
], - "exceptions": [
- "string"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "disabled": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "drivenProperties": [
- {
- "propertyId": "string",
- "applicationPeriodId": "string",
- "values": [
- {
- "stateId": "string",
- "value": { }
}
]
}
]
}
], - "states": [
- {
- "stateId": "string",
- "name": "string",
- "color": "string"
}
], - "applicationPeriods": [
- {
- "applicationPeriodId": "string",
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}
], - "exceptions": [
- {
- "exceptionId": "string",
- "name": "string",
- "daily": [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - "period": {
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}, - "description": "string"
}
]
}, - "timeZone": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
Export the equipment and properties differences between two configurations
deviceId required | string The ID of the device |
source | string (RevisionStatus) Default: "DRAFT" Enum: "DRAFT" "SENT" "CURRENT" "DISCARDED" "ERROR" "ARCHIVED" The status of the revision. The possible values are :
| ||||||||||||||
target | string (RevisionStatus) Default: "CURRENT" Enum: "DRAFT" "SENT" "CURRENT" "DISCARDED" "ERROR" "ARCHIVED" The status of the revision. The possible values are :
|
"string"
Get a specific config revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
{- "revisionId": "bae12d01-48af-47b3-9304-b09ef0081cd6",
- "deviceId": "string",
- "parentRevisionId": "1fb68043-00cb-4434-923f-6cf26adb0f19",
- "notes": "string",
- "status": "DRAFT",
- "errors": [
- "string"
], - "properties": [
- {
- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "equipments": [
- {
- "equipmentId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "networks": [
- {
- "networkId": "string",
- "name": "string",
- "description": "string",
- "equipments": [
- "string"
], - "config": {
- "protocol": "MODBUS_SERIAL"
}, - "interFrameDelay": 1000000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "gatewayInterfaces": [
- {
- "gatewayInterfaceId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "BACNET_IP_GATEWAY"
}, - "interFrameDelay": 1000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "connectors": {
- "property1": {
- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}, - "property2": {
- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}
}, - "pinnedResources": {
- "property1": {
- "resourceId": "string",
- "versionId": "string",
- "useDefault": true
}, - "property2": {
- "resourceId": "string",
- "versionId": "string",
- "useDefault": true
}
}, - "commandId": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "scheduler": {
- "schedules": [
- {
- "scheduleId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "defaultStateId": "string",
- "weekly": [
- [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
]
], - "exceptions": [
- "string"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "disabled": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "drivenProperties": [
- {
- "propertyId": "string",
- "applicationPeriodId": "string",
- "values": [
- {
- "stateId": "string",
- "value": { }
}
]
}
]
}
], - "states": [
- {
- "stateId": "string",
- "name": "string",
- "color": "string"
}
], - "applicationPeriods": [
- {
- "applicationPeriodId": "string",
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}
], - "exceptions": [
- {
- "exceptionId": "string",
- "name": "string",
- "daily": [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - "period": {
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}, - "description": "string"
}
]
}, - "timeZone": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
Get data points count for a specific revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
{- "current": 0,
- "max": 0,
- "hourlyBasedComputation": true
}
Get virtual properties count for a specific revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
{- "current": 0,
- "max": 0
}
Import a config to the draft revision
deviceId required | string The ID of the device |
force | boolean If there exists another configuration this parameter force it to override it |
revisionId required | string <uuid> The id of the revision | ||||||||||||||
deviceId required | string The device id associated with the revision | ||||||||||||||
parentRevisionId | string <uuid> The id of the parent revision | ||||||||||||||
notes | string A description of the revision | ||||||||||||||
status required | string (RevisionStatus) Enum: "DRAFT" "SENT" "CURRENT" "DISCARDED" "ERROR" "ARCHIVED" The status of the revision. The possible values are :
| ||||||||||||||
errors | Array of strings This contains the error messages coming from the device when we deploy the configuration | ||||||||||||||
required | Array of objects (Property) A list of properties configurations | ||||||||||||||
required | Array of objects (Equipment) A list of equipment configurations | ||||||||||||||
required | Array of objects (Network) A list of networks configurations | ||||||||||||||
required | Array of objects (GatewayInterface) A list of gateway interfaces configurations | ||||||||||||||
required | object An object containing the configured connectors, the key is the connector name, and the value is its configuration | ||||||||||||||
required | object Resources associated with the revision | ||||||||||||||
commandId | string The identifier of the command created to send the configuration to the box. Use the Command API to track the status | ||||||||||||||
required | object The tags of the revision | ||||||||||||||
required | object (Scheduler) The associated schedulers configurations | ||||||||||||||
timeZone required | string |
{- "revisionId": "bae12d01-48af-47b3-9304-b09ef0081cd6",
- "deviceId": "string",
- "parentRevisionId": "1fb68043-00cb-4434-923f-6cf26adb0f19",
- "notes": "string",
- "status": "DRAFT",
- "errors": [
- "string"
], - "properties": [
- {
- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "equipments": [
- {
- "equipmentId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "networks": [
- {
- "networkId": "string",
- "name": "string",
- "description": "string",
- "equipments": [
- "string"
], - "config": {
- "protocol": "MODBUS_SERIAL"
}, - "interFrameDelay": 1000000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "gatewayInterfaces": [
- {
- "gatewayInterfaceId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "BACNET_IP_GATEWAY"
}, - "interFrameDelay": 1000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "connectors": {
- "property1": {
- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}, - "property2": {
- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}
}, - "pinnedResources": {
- "property1": {
- "resourceId": "string",
- "versionId": "string",
- "useDefault": true
}, - "property2": {
- "resourceId": "string",
- "versionId": "string",
- "useDefault": true
}
}, - "commandId": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "scheduler": {
- "schedules": [
- {
- "scheduleId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "defaultStateId": "string",
- "weekly": [
- [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
]
], - "exceptions": [
- "string"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "disabled": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "drivenProperties": [
- {
- "propertyId": "string",
- "applicationPeriodId": "string",
- "values": [
- {
- "stateId": "string",
- "value": { }
}
]
}
]
}
], - "states": [
- {
- "stateId": "string",
- "name": "string",
- "color": "string"
}
], - "applicationPeriods": [
- {
- "applicationPeriodId": "string",
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}
], - "exceptions": [
- {
- "exceptionId": "string",
- "name": "string",
- "daily": [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - "period": {
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}, - "description": "string"
}
]
}, - "timeZone": "string"
}
{- "revisionId": "bae12d01-48af-47b3-9304-b09ef0081cd6",
- "deviceId": "string",
- "parentRevisionId": "1fb68043-00cb-4434-923f-6cf26adb0f19",
- "notes": "string",
- "status": "DRAFT",
- "errors": [
- "string"
], - "properties": [
- {
- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "equipments": [
- {
- "equipmentId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "networks": [
- {
- "networkId": "string",
- "name": "string",
- "description": "string",
- "equipments": [
- "string"
], - "config": {
- "protocol": "MODBUS_SERIAL"
}, - "interFrameDelay": 1000000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "gatewayInterfaces": [
- {
- "gatewayInterfaceId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "BACNET_IP_GATEWAY"
}, - "interFrameDelay": 1000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "connectors": {
- "property1": {
- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}, - "property2": {
- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}
}, - "pinnedResources": {
- "property1": {
- "resourceId": "string",
- "versionId": "string",
- "useDefault": true
}, - "property2": {
- "resourceId": "string",
- "versionId": "string",
- "useDefault": true
}
}, - "commandId": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "scheduler": {
- "schedules": [
- {
- "scheduleId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "defaultStateId": "string",
- "weekly": [
- [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
]
], - "exceptions": [
- "string"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "disabled": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "drivenProperties": [
- {
- "propertyId": "string",
- "applicationPeriodId": "string",
- "values": [
- {
- "stateId": "string",
- "value": { }
}
]
}
]
}
], - "states": [
- {
- "stateId": "string",
- "name": "string",
- "color": "string"
}
], - "applicationPeriods": [
- {
- "applicationPeriodId": "string",
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}
], - "exceptions": [
- {
- "exceptionId": "string",
- "name": "string",
- "daily": [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - "period": {
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}, - "description": "string"
}
]
}, - "timeZone": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
List all config revisions
deviceId required | string The ID of the device |
status | Array of strings (RevisionStatus) Items Enum: "DRAFT" "SENT" "CURRENT" "DISCARDED" "ERROR" "ARCHIVED" |
since | integer <int64> The timestamp (in millis) from which to start querying (default is one day ago timestamp) |
until | integer <int64> The timestamp (in millis) to which to end querying (default is now timestamp) |
page | integer >= 1 Default: 1 One-based page index (1..N) |
size | integer >= 1 Default: 2 The size of the page to be returned |
sort | Array of strings Default: "createdAt,DESC" Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. |
[- {
- "revisionId": "bae12d01-48af-47b3-9304-b09ef0081cd6",
- "deviceId": "string",
- "parentRevisionId": "1fb68043-00cb-4434-923f-6cf26adb0f19",
- "notes": "string",
- "status": "DRAFT",
- "errors": [
- "string"
], - "properties": [
- {
- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "equipments": [
- {
- "equipmentId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "networks": [
- {
- "networkId": "string",
- "name": "string",
- "description": "string",
- "equipments": [
- "string"
], - "config": {
- "protocol": "MODBUS_SERIAL"
}, - "interFrameDelay": 1000000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "gatewayInterfaces": [
- {
- "gatewayInterfaceId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "BACNET_IP_GATEWAY"
}, - "interFrameDelay": 1000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "connectors": {
- "property1": {
- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}, - "property2": {
- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}
}, - "pinnedResources": {
- "property1": {
- "resourceId": "string",
- "versionId": "string",
- "useDefault": true
}, - "property2": {
- "resourceId": "string",
- "versionId": "string",
- "useDefault": true
}
}, - "commandId": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "scheduler": {
- "schedules": [
- {
- "scheduleId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "defaultStateId": "string",
- "weekly": [
- [
- {
- "timeSpan": {
- "start": null,
- "end": null
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": null,
- "end": null
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": null,
- "end": null
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": null,
- "end": null
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": null,
- "end": null
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": null,
- "end": null
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": null,
- "end": null
}, - "stateId": "string"
}
]
], - "exceptions": [
- "string"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "disabled": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "drivenProperties": [
- {
- "propertyId": "string",
- "applicationPeriodId": "string",
- "values": [
- {
- "stateId": "string",
- "value": { }
}
]
}
]
}
], - "states": [
- {
- "stateId": "string",
- "name": "string",
- "color": "string"
}
], - "applicationPeriods": [
- {
- "applicationPeriodId": "string",
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}
], - "exceptions": [
- {
- "exceptionId": "string",
- "name": "string",
- "daily": [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - "period": {
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}, - "description": "string"
}
]
}, - "timeZone": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
]
This endpoint allows to update and to send the configurations to the device.
To send the configuration to the device and then setting the configuration as current, one has
to set the boolean publish
to true. All changes in Equipments, Properties, Networks and Connectors
will be sent to the device. Once the device confirms that the configurations are valid, with no
issues, we set the revision as current and restart the services on the device (this is not a
reboot of the device).
Between the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to CURRENT. After a confirmation from the device, the platform will send a RESTART command so that the embedded software take into account the changes.
If the Wattsense box does not acknowledge, we retry 3 times to send the configuration. If it fails, the revision goes back to the status DRAFT.
The revision with status CURRENT, will still be considered as the current one until the acknowledgment from the device. Once the new revision is flagged as CURRENT the previous revision changes to ARCHIVED.
If the published configurations errors out on the box, it will still be set to CURRENT with an additional
flag error = true
. The list of errors will be in the list errors
.
Some configuration changes will not trigger a send to device. Like changing the name, the slug, the units, transformations, and tags. In this case, the revision will be marked as current.
deviceId required | string The ID of the device |
notes | string A description of this revision. Useful for listing the changes the user made in this revision |
publish | boolean Whether to publish immediately the revision after creation or not. This is useful when we want to re-publish an old revision. For more about publishing a revision see Publish the draft revision. NoteSome configuration changes will not trigger a send to device. Like changing the name, the slug, the units, transformations, and tags. |
object An object to tag this revision. This value will override the existing tags, you have to send all the tags you want to set. |
{- "notes": "string",
- "publish": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
{- "revisionId": "bae12d01-48af-47b3-9304-b09ef0081cd6",
- "deviceId": "string",
- "parentRevisionId": "1fb68043-00cb-4434-923f-6cf26adb0f19",
- "notes": "string",
- "status": "DRAFT",
- "errors": [
- "string"
], - "properties": [
- {
- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "equipments": [
- {
- "equipmentId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "networks": [
- {
- "networkId": "string",
- "name": "string",
- "description": "string",
- "equipments": [
- "string"
], - "config": {
- "protocol": "MODBUS_SERIAL"
}, - "interFrameDelay": 1000000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "gatewayInterfaces": [
- {
- "gatewayInterfaceId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "BACNET_IP_GATEWAY"
}, - "interFrameDelay": 1000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
], - "connectors": {
- "property1": {
- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}, - "property2": {
- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}
}, - "pinnedResources": {
- "property1": {
- "resourceId": "string",
- "versionId": "string",
- "useDefault": true
}, - "property2": {
- "resourceId": "string",
- "versionId": "string",
- "useDefault": true
}
}, - "commandId": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "scheduler": {
- "schedules": [
- {
- "scheduleId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "defaultStateId": "string",
- "weekly": [
- [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
]
], - "exceptions": [
- "string"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "disabled": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "drivenProperties": [
- {
- "propertyId": "string",
- "applicationPeriodId": "string",
- "values": [
- {
- "stateId": "string",
- "value": { }
}
]
}
]
}
], - "states": [
- {
- "stateId": "string",
- "name": "string",
- "color": "string"
}
], - "applicationPeriods": [
- {
- "applicationPeriodId": "string",
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}
], - "exceptions": [
- {
- "exceptionId": "string",
- "name": "string",
- "daily": [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - "period": {
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}, - "description": "string"
}
]
}, - "timeZone": "string",
- "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
Create a new equipment in the draft config revision
deviceId required | string The ID of the device |
validateOnly | boolean If set to true, will only validate the configuration |
name required | string non-empty Name of the equipment |
description | string Description of the equipment |
required | object (EquipmentConfiguration) Configuration of the equipment |
object Tags associated with the equipment |
{- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}
}
{- "equipmentId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
Create multiple new equipment in the draft config revision
deviceId required | string The ID of the device |
validateOnly | boolean |
required | Array of objects (EquipmentCreationRequest) |
{- "insert": [
- {
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}
}
]
}
{- "equipments": [
- {
- "equipmentId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
]
}
Delete an equipment in the draft config revision. If the equipment has properties or a network linked to it, one has to remove those properties beforehand.
The only exception is when the network is connected to more than one equipment. In that case, the last equipment of that network cannot be removed until that network is removed.
deviceId required | string The ID of the device |
equipmentId required | string The ID of the equipment |
updateDependentNetworks | boolean Whether or not to update dependent networks |
{- "equipmentId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
Delete multiple equipment in the draft config revision
deviceId required | string The ID of the device |
equipments required | Array of strings |
{- "equipments": [
- "string"
]
}
{- "deleted": [
- {
- "equipmentId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
]
}
Get an equipment in a specific revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
equipmentId required | string The ID of the equipment |
{- "equipmentId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
Get the statuses of all properties of an equipment
Note: this endpoint is deprecated and should be replaced by the getEquipmentStatus endpoint
deviceId required | string The ID of the device |
equipmentId required | string The ID of the equipment |
[- {
- "propertyId": "string",
- "protocol": "MODBUS_SERIAL",
- "status": "DOWN",
- "equipmentId": "string",
- "dataPointExpected": 0,
- "dataPointGot": 0
}
]
Get an equipment status
deviceId required | string The ID of the device |
equipmentId required | string The ID of the equipment |
{- "equipmentId": "string",
- "protocol": "MODBUS_SERIAL",
- "status": "DOWN",
- "equipmentDownInfo": {
- "totalDataPointExpected": 0,
- "totalDataPointGot": 0
}, - "lastDataPointReceivedAt": 0,
- "lorawanStatusInfo": {
- "lastActivationEventReceivedAt": 0,
- "signals": [
- {
- "value": { },
- "type": "SNR",
- "timestamp": 0
}
]
}, - "reportedAt": 0,
- "equipmentDataSummary": {
- "expected": 0,
- "got": 0
}
}
List equipment in a specific revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
protocol | string (EquipmentProtocol) Enum: "MODBUS_SERIAL" "MODBUS_IP" "MBUS" "BACNET_IP" "LON_IP852" "LORAWAN_V1_0" "LPB" "KNX" Filter the equipments by their communication protocol |
tag | string Filter the results by a Tag key and/or a tag value. The filter has to
be in the format Multiple filters can be used, by repeating the query as in
|
[- {
- "equipmentId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
]
List all equipment statuses
deviceId required | string The ID of the device |
[- {
- "equipmentId": "string",
- "protocol": "MODBUS_SERIAL",
- "status": "DOWN",
- "equipmentDownInfo": {
- "totalDataPointExpected": 0,
- "totalDataPointGot": 0
}, - "lastDataPointReceivedAt": 0,
- "lorawanStatusInfo": {
- "lastActivationEventReceivedAt": 0,
- "signals": [
- {
- "value": { },
- "type": "SNR",
- "timestamp": 0
}
]
}, - "reportedAt": 0,
- "equipmentDataSummary": {
- "expected": 0,
- "got": 0
}
}
]
Update an equipment in the draft config revision
deviceId required | string The ID of the device |
equipmentId required | string The ID of the equipment |
validateOnly | boolean If set to true, will only validate the configuration |
forceLorawanCodecUpdate | boolean Forces LoRaWAN codec updates (codec changes are not allowed by default) |
applyChangesToGateways | boolean Whether or not to reflect name changes to redirected properties in gateways |
name | string Name of the equipment |
description | string Description of the equipment |
object (EquipmentConfiguration) Configuration of the equipment | |
object Tags associated with the equipment |
{- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}
}
{- "equipmentId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
Update multiple equipment in the draft config revision
deviceId required | string The ID of the device |
validateOnly | boolean If set to true, will only validate the configuration |
forceLorawanCodecUpdate | boolean Forces LoRaWAN codec updates (codec changes are not allowed by default) |
applyChangesToGateways | boolean Whether or not to reflect name changes to redirected properties in gateways |
required | Array of objects (BulkEquipmentUpdateItem) |
{- "update": [
- {
- "equipmentId": "string",
- "update": {
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}
}
}
]
}
{- "equipments": [
- {
- "equipmentId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
]
}
A Gateway Interface allows you to use the box as a gateway. You can, for instance, define a BACnet Gateway interface, which will make the box act as a BACnet server, and redirect data from other one or many networks defined on the box.
Create a new gateway interface in the draft config revision
deviceId required | string The ID of the device |
name required | string non-empty A name for this gateway interface |
description | string A short description of this gateway interface. For BACnet gateway interfaces, this value is used as a description of the BACnet device. |
required | object (GatewayInterfaceConfiguration) |
interFrameDelay | integer <int64> [ 0 .. 1000000 ] The delay in micro seconds to wait after a frame is sent |
responseTimeout | integer <int64> [ 100 .. 1000000 ] Request response timeout in micro seconds |
retryNumber | integer <int32> [ 0 .. 1000000 ] The number of retries if the request was lost |
object Tags associated with the gateway interface |
{- "name": "string",
- "description": "string",
- "config": {
- "protocol": "BACNET_IP_GATEWAY"
}, - "interFrameDelay": 1000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
{- "gatewayInterfaceId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "BACNET_IP_GATEWAY"
}, - "interFrameDelay": 1000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
Delete a gateway interface in the draft config revision
deviceId required | string The ID of the device |
gatewayInterfaceId required | string The ID of the gateway interface |
{- "gatewayInterfaceId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "BACNET_IP_GATEWAY"
}, - "interFrameDelay": 1000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
Get a specific gateway interface from a specific config revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
gatewayInterfaceId required | string The ID of the gateway interface |
{- "gatewayInterfaceId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "BACNET_IP_GATEWAY"
}, - "interFrameDelay": 1000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
List all gateway interfaces present in a specific config revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
connector | string Filter the gateway interfaces by the connector they're connected to |
protocol | string (GatewayProtocol) Enum: "BACNET_IP_GATEWAY" "MODBUS_IP_GATEWAY" "MQTT_GATEWAY" "PLUGIN_GATEWAY" Filter the gateway interfaces by their communication protocol |
tag | string Filter the results by a Tag key and/or a tag value. The filter has to
be in the format Multiple filters can be used, by repeating the query as in
|
[- {
- "gatewayInterfaceId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "BACNET_IP_GATEWAY"
}, - "interFrameDelay": 1000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
]
Update a gateway interface in the draft config revision
Editing a gateway interface is limited to draft configuration revisions. Therefore, when creating a new gateway, the platform checks if the current configuration revision is in draft mode or not. If it's the latter, we will automatically create a draft revision for you based on the current config revision.
Check the corresponding API.
deviceId required | string The ID of the device |
gatewayInterfaceId required | string The ID of the gateway interface |
name | string A name for this gateway interface |
description | string A short description of this gateway interface. For BACnet gateway interfaces, this value is used as a description of the BACnet device. |
object (GatewayInterfaceConfiguration) | |
interFrameDelay | integer <int64> [ 0 .. 1000000 ] The delay in micro seconds to wait after a frame is sent |
responseTimeout | integer <int64> [ 100 .. 1000000 ] Request response timeout in micro seconds |
retryNumber | integer <int32> [ 0 .. 1000000 ] The number of retries if the request was lost |
object Tags associated with the gateway interface |
{- "name": "string",
- "description": "string",
- "config": {
- "protocol": "BACNET_IP_GATEWAY"
}, - "interFrameDelay": 1000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
{- "gatewayInterfaceId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "protocol": "BACNET_IP_GATEWAY"
}, - "interFrameDelay": 1000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
A property, also called "point" in the BMS jargon, can be either a read source (eg. sensor), write target (eg. actuator), or read and write.
The Wattsense box will get (or set, in case of write) a property's values from the equipment using a predefined network.
Each property has two attributes that are used to define the direction in which data flows:
accessType
defines whether data is read / written from Wattsense or stays locally on the box.redirectToProperties
this is used to send data to other properties in addition to the behavior
defined by the accessType
. When used with REMOTE_xxx data flows to/from Wattsense cloud to
the target property, and also flows from the property itself to other properties. When used with
LOCAL, data only flows out-of the property.Some examples of how to use the access type and redirections:
Write / Read data to an equipment or gateway interface:
+-----------+ +----------+ +-----------+
|equipment A+------->+property A+------------>+ Wattsense |
+-----------+ +----+-----+ +---+-------+
|
|
+-----------------------+
|
+-----------+ +----v-----+
|gateway int+<-------+property B|
+-----------+ +----------+
Here, property A is in read and sending data to Wattsense cloud and property B is in write, taking data Wattsense and writing it to the target gateway interface. Notice that you can read and write data to/from equipments or gateway interfaces.
The used configuration is:
accessType
= REMOTE_READ_ONLYaccessType
= REMOTE_WRITE_ONLYRedirect a REMOTE_READ_ONLY property from one equipment to a LOCAL property linked to another equipment:
+-----------+ +----------+ +-----------+
|equipment A+------->+property A+------------>+ Wattsense |
+-----------+ +----+-----+ +-----------+
|
|
+-----------+ +----v-----+
|equipment B+<-------+property B|
+-----------+ +----------+
Here, property A is defined as REMOTE_READ_ONLY with a redirectToProperties
containing property B.
Data will be read every timer
seconds, forwarded to the Wattsense cloud and also to the property B, which
will send it to the equipment equipment B
The used configuration is:
accessType
= REMOTE_READ_ONLY and redirectToProperties
= [property B]accessType
= LOCALRedirect a REMOTE_READ_ONLY property to a LOCAL property linked to a gateway interface
+-----------+ +----------+ +-----------+
|equipment A+------->+property A+------------>+ Wattsense |
+-----------+ +----+-----+ +-----------+
|
|
+------------+ +----v-----+
|gateway int.+<-------+property B|
+------------+ +----------+
Here, property A is defined as REMOTE_READ_ONLY with a redirectToProperties
containing property B.
Data will be read every timer
seconds, forwarded to the Wattsense cloud and also to the property B, which
will send it to the gateway interface gateway int.
The used configuration is:
accessType
= REMOTE_READ_ONLY and redirectToProperties
= [property B]accessType
= LOCALA more complex, non-realistic case, that shows how far we can combine properties:
+--------------+ +----------+
|gateway int. C+------->+property C|
+--------------+ +----------+
|
|
+-----------+ +----v-----+ +-----------+
|equipment A+<-------+property A+<------------+ Wattsense |
+-----------+ +----------+ +-----------+
|
|
+--------------+ +----v-----+
|gateway int. B+<-------+property B|
+--------------+ +----------+
Here, property A is defined as REMOTE_WRITE_ONLY with a redirectToProperties
containing property B:
The used configuration is:
accessType
= REMOTE_WRITE_ONLY and redirectToProperties
= [property B]accessType
= LOCALaccessType
= LOCAL and redirectToProperties
= [property A]One can also make data exchange fully local:
+--------------+ +----------+
|gateway int. C+------->+property C|
+--------------+ +----------+
|
|
+-----------+ +----v-----+
|equipment A+<-------+property A|
+-----------+ +----------+
|
|
+--------------+ +----v-----+
|gateway int. B+<-------+property B|
+--------------+ +----------+
In this case, the property property A is defined as a LOCAL property.
The used configuration is:
accessType
= LOCAL and redirectToProperties
= [property B]accessType
= LOCALaccessType
= LOCAL and redirectToProperties
= [property A]Create properties in bulk, return the created properties
deviceId required | string The ID of the device |
required | Array of objects (PropertyCreationRequest) |
{- "insert": [
- {
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "name": "string",
- "slug": "string",
- "description": "string",
- "disabled": true,
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "unit": "string",
- "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "kind": "NONE"
}
]
}
{- "inserted": [
- {
- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
]
}
Create a new property in the draft config revision
deviceId required | string The ID of the device |
equipmentId | string The equipment this property is linked to. This is mutually exclusive with the | ||||||||||||||
gatewayInterfaceId | string The id of the gateway interface this property is linked to. This is mutually exclusive with the | ||||||||||||||
name required | string non-empty The name of the property | ||||||||||||||
slug required | string^[a-zA-Z0-9_]+(?:-[a-zA-Z0-9_]+)*$ A unique (per device) keyword used to query this property. The possible values are:
If two properties have the same slug, the API will respond with a conflict 409 response. Moreover, the slug must not be in conflict with the propertyId. The slug is used to request the property values via the api | ||||||||||||||
description | string A short description | ||||||||||||||
disabled | boolean If set to true, the property will not be sent to the box | ||||||||||||||
redirectToProperties | Array of strings Contains a list of | ||||||||||||||
accessType required | string (PropertyAccessType) Enum: "REMOTE_READ_ONLY" "REMOTE_WRITE_ONLY" "REMOTE_READ_WRITE" "LOCAL" Defines how the property behaves:
See Property configuration for examples. | ||||||||||||||
timer | integer <int32> >= 1 The number of seconds between two polls of data. This is used by the device when reading data from an equipment NOTE: Not used for virtual properties, as virtual properties are computed each time a new value is emitted for the related properties. | ||||||||||||||
required | object (PropertyConfiguration) The configuration of the property to read from or write to an equipment or a gateway interface | ||||||||||||||
unit | string The engineering unit of this property | ||||||||||||||
object (ValueTransformation) An operation to apply on the property value received through the API, Webhooks and MQTT, on read. The data is
transformed only when the user read from the platform. The scaling is a slope-intercept formula | |||||||||||||||
object Tags for this resource. Keys and Values have to be strings. | |||||||||||||||
kind | string (PropertyValueKindType) Enum: "NONE" "date" "date-time" "date-time-range" "free-form-date-time" "daily-schedule" "synco-exception-period" "weekly-schedule" "bacnet-schedule" "bacnet-calendar" "bacnet-exception-schedule" Defines how the data is to be interpreted and encoded on the equipment.
NOTES:
|
{- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "name": "string",
- "slug": "string",
- "description": "string",
- "disabled": true,
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "unit": "string",
- "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "kind": "NONE"
}
{- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
Delete properties in bulk, return the deleted properties
deviceId required | string The ID of the device |
delete required | Array of strings A list of properties to delete |
force required | boolean Whether to force the deletion if it is still in use |
{- "delete": [
- "string"
], - "force": true
}
{- "deleted": [
- {
- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
]
}
Delete a property in the draft config revision
deviceId required | string |
propertyId required | string |
force | boolean |
{- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
Get a property configuration from a specific config revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
propertyId required | string The ID of the property |
{- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
List all properties present in a specific config revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
protocol | string (PropertyProtocol) Enum: "MODBUS_SERIAL" "MODBUS_IP" "MBUS" "BACNET_IP" "LON_IP852" "LORAWAN_V1_0" "LPB" "KNX" "VIRTUAL" "BACNET_IP_GATEWAY" "MODBUS_IP_GATEWAY" "MQTT_GATEWAY" "PLUGIN_GATEWAY" Filter the properties by their communication protocol |
gatewayInterfaceId | string |
equipmentId | string |
enabledOnly | boolean List only enabled properties |
tag | string Filter the results by a Tag key and/or a tag value. The filter has to
be in the format Multiple filters can be used, by repeating the query as in
|
[- {
- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
]
Update properties in bulk, return the updated properties
deviceId required | string The ID of the device |
applyChangesToGateways | boolean Whether or not to reflect name changes to redirected properties in gateways |
required | Array of objects (BulkUpdatePropertyItem) |
{- "update": [
- {
- "propertyId": "string",
- "update": {
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "name": "string",
- "slug": "string",
- "disabled": true,
- "redirectToProperties": [
- "string"
], - "description": "string",
- "timer": 1,
- "accessType": "REMOTE_READ_ONLY",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "unit": "string",
- "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "kind": "NONE"
}
}
]
}
{- "updated": [
- {
- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
]
}
Update a specific property configuration in the draft config revision
deviceId required | string The ID of the device |
propertyId required | string The ID of the property |
applyChangesToGateways | boolean Whether or not to reflect name changes to redirected properties in gateways |
equipmentId | string The equipment this property is linked to. This is mutually exclusive with the | ||||||||||||||
gatewayInterfaceId | string The id of the gateway interface this property is linked to. This is mutually exclusive with the | ||||||||||||||
name | string The name of the property | ||||||||||||||
slug | string^[a-zA-Z0-9_]+(?:-[a-zA-Z0-9_]+)*$ A unique (per device) keyword used to query this property. The possible values are:
If two properties have the same slug, the API will respond with a conflict 409 response. Moreover, the slug must not be in conflict with the propertyId. The slug is used to request the property values via the api | ||||||||||||||
disabled | boolean If set to true, the property will not be sent to the box | ||||||||||||||
redirectToProperties | Array of strings Contains a list of | ||||||||||||||
description | string A short description | ||||||||||||||
timer | integer <int32> >= 1 The number of seconds between two polls of data. This is used by the device when reading data from an equipment NOTE: Not used for virtual properties, as virtual properties are computed each time a new value is emitted for the related properties. | ||||||||||||||
accessType | string (PropertyAccessType) Enum: "REMOTE_READ_ONLY" "REMOTE_WRITE_ONLY" "REMOTE_READ_WRITE" "LOCAL" Defines how the property behaves:
See Property configuration for examples. | ||||||||||||||
object (PropertyConfiguration) The configuration of the property to read from or write to an equipment or a gateway interface | |||||||||||||||
unit | string The engineering unit of this property | ||||||||||||||
object (ValueTransformation) An operation to apply on the property value received through the API, Webhooks and MQTT, on read. The data is
transformed only when the user read from the platform. The scaling is a slope-intercept formula | |||||||||||||||
object Tags for this resource. Keys and Values have to be strings. | |||||||||||||||
kind | string (PropertyValueKindType) Enum: "NONE" "date" "date-time" "date-time-range" "free-form-date-time" "daily-schedule" "synco-exception-period" "weekly-schedule" "bacnet-schedule" "bacnet-calendar" "bacnet-exception-schedule" Defines how the data is to be interpreted and encoded on the equipment.
NOTES:
|
{- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "name": "string",
- "slug": "string",
- "disabled": true,
- "redirectToProperties": [
- "string"
], - "description": "string",
- "timer": 1,
- "accessType": "REMOTE_READ_ONLY",
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "unit": "string",
- "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "kind": "NONE"
}
{- "propertyId": "string",
- "equipmentId": "string",
- "gatewayInterfaceId": "string",
- "redirectToProperties": [
- "string"
], - "accessType": "REMOTE_READ_ONLY",
- "disabled": true,
- "name": "string",
- "slug": "string",
- "description": "string",
- "timer": 1,
- "config": {
- "protocol": "MODBUS_SERIAL"
}, - "scaling": {
- "a": 0.1,
- "b": 0.1
}, - "unit": "string",
- "kind": "NONE",
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
There are a specific set of physical connectors on a Wattsense box. Each has a specific set of compatible communication protocols and the possibility to have one or many networks linked to it. Serial connectors support at max one network, whereas IP connectors have no specified limit.
Connector ID | Compatible Network protocols | Type | Required before use in network | Configurable |
---|---|---|---|---|
rs485_1 | MODBUS_SERIAL | Serial | Yes | Yes |
rs485_2 | MODBUS_SERIAL | Serial | Yes | Yes |
mbus | MBUS | Serial | Yes | Yes (since embedded software version 2.6) |
eth1 | MODBUS_IP, BACNET_IP | IP | No | Yes (since embedded software version 2.5) |
eth2 | MODBUS_IP, BACNET_IP | IP | No | Yes (since embedded software version 2.5) |
In case of IP, some protocols support being run on the same connectors, and others do not require a connector to be set
In the case of Serial, only one network can be run by connector
Create an IPv4 route
deviceId required | string The ID of the device | ||||||
physicalConnector required | string (IpPhysicalConnector) Enum: "eth1" "eth2" The physical connector is the network interface used for this gateway interface
|
destination required | string |
gateway required | string non-empty |
metric required | integer <int32> >= 1000 |
{- "destination": "string",
- "gateway": "string",
- "metric": 1000
}
{- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}
Delete an IPv4 route
deviceId required | string The ID of the device | ||||||
physicalConnector required | string (IpPhysicalConnector) Enum: "eth1" "eth2" The physical connector is the network interface used for this gateway interface
| ||||||
routeId required | string |
{- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}
Get a connector in a specific revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
physicalConnector required | string The name of the connector to get |
{- "config": {
- "physicalConnector": "string"
}, - "networks": [
- "string"
], - "gatewayInterfaces": [
- "string"
], - "updatedAt": "2019-08-24T14:15:22Z",
- "id": "string",
- "type": "HTTP",
- "name": "string",
- "authentication": {
- "type": "BASIC"
}, - "tags": {
- "property1": "string",
- "property2": "string"
}, - "errorCount": 0,
- "status": "ACTIVE",
- "lastError": {
- "message": "string",
- "cause": "string",
- "timestamp": 0
}, - "baseUrl": "string",
- "routes": {
- "events": "/webhooks/events",
- "alarms": "/webhooks/alarms",
- "values": "/webhooks/values"
}, - "secretKey": "string"
}
List connectors in a specific revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
[- {
- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}
]
Update a connector in the draft revision
deviceId required | string The ID of the device |
physicalConnector required | string The name of the connector to get |
physicalConnector required | string |
baudrate required | integer <int32> [ 1200 .. 115200 ] Enum: "1200" "1800" "2400" "4800" "9600" "19200" "38400" "57600" "115200" Bits per seconds |
parity required | string (RSParity) Enum: "NO_PARITY" "EVEN" "ODD" The parity |
numberDataBits required | integer <int32> [ 5 .. 8 ] The number of data bits |
numberStopBits required | integer <int32> [ 1 .. 2 ] The number of stop bits |
{- "physicalConnector": "rs485_1",
- "baudrate": "1200",
- "parity": "NO_PARITY",
- "numberDataBits": 5,
- "numberStopBits": 1
}
{- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}
Update an IPv4 route
deviceId required | string The ID of the device | ||||||
physicalConnector required | string (IpPhysicalConnector) Enum: "eth1" "eth2" The physical connector is the network interface used for this gateway interface
| ||||||
routeId required | string |
destination required | string |
gateway required | string non-empty |
metric required | integer <int32> >= 1000 |
{- "destination": "string",
- "gateway": "string",
- "metric": 1000
}
{- "config": {
- "physicalConnector": "string"
}, - "updatedAt": "2019-08-24T14:15:22Z"
}
After having configured the equipments and connectors. The user can link them using a Network. Some networks do not work unless the connector has been correctly configured.
Create a new network in the draft config revision
deviceId required | string ID of the device |
validateOnly | boolean If set to true, will only validate the configuration |
name required | string non-empty The network name |
description | string A short description |
equipments | Array of strings The list of equipments connected through this network |
required | object (NetworkConfiguration) The configuration for this network entry |
interFrameDelay | integer <int64> [ 0 .. 1000000000 ] The delay in micro seconds to wait after a frame is sent |
responseTimeout | integer <int64> [ 100 .. 1000000000 ] Request response timeout in micro seconds |
retryNumber | integer <int32> [ 0 .. 1000000 ] |
object Tags associated with the network |
{- "name": "string",
- "description": "string",
- "equipments": [
- "string"
], - "config": {
- "protocol": "MODBUS_SERIAL"
}, - "interFrameDelay": 1000000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
{- "networkId": "string",
- "name": "string",
- "description": "string",
- "equipments": [
- "string"
], - "config": {
- "protocol": "MODBUS_SERIAL"
}, - "interFrameDelay": 1000000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
Delete a network in the draft config revision
deviceId required | string The ID of the device |
networkId required | string The ID of the network |
{- "networkId": "string",
- "name": "string",
- "description": "string",
- "equipments": [
- "string"
], - "config": {
- "protocol": "MODBUS_SERIAL"
}, - "interFrameDelay": 1000000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
Get a specific network configuration from a specific config revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
networkId required | string The ID of the network |
{- "networkId": "string",
- "name": "string",
- "description": "string",
- "equipments": [
- "string"
], - "config": {
- "protocol": "MODBUS_SERIAL"
}, - "interFrameDelay": 1000000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
List all network configurations available in the network configuration management interface
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
equipmentId | string Filter the networks by the equipmentId they're connected to |
connector | string Filter the networks by the connector they're connected to |
protocol | string (EquipmentProtocol) Enum: "MODBUS_SERIAL" "MODBUS_IP" "MBUS" "BACNET_IP" "LON_IP852" "LORAWAN_V1_0" "LPB" "KNX" Filter the networks by their communication protocol |
tag | string Filter the results by a Tag key and/or a tag value. The filter has to
be in the format Multiple filters can be used, by repeating the query as in
|
[- {
- "networkId": "string",
- "name": "string",
- "description": "string",
- "equipments": [
- "string"
], - "config": {
- "protocol": "MODBUS_SERIAL"
}, - "interFrameDelay": 1000000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
]
Update a network in the draft config revision
deviceId required | string ID of the device |
networkId required | string ID of the network |
validateOnly | boolean If set to true, will only validate the configuration |
name | string The network name |
description | string A short description |
equipments | Array of strings The list of equipments connected through this network |
object (NetworkConfiguration) The configuration for this network entry | |
interFrameDelay | integer <int64> [ 0 .. 1000000000 ] The delay in micro seconds to wait after a frame is sent |
responseTimeout | integer <int64> [ 100 .. 1000000000 ] Request response timeout in micro seconds |
retryNumber | integer <int32> [ 0 .. 1000000 ] |
object Tags associated with the network |
{- "name": "string",
- "description": "string",
- "equipments": [
- "string"
], - "config": {
- "protocol": "MODBUS_SERIAL"
}, - "interFrameDelay": 1000000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
{- "networkId": "string",
- "name": "string",
- "description": "string",
- "equipments": [
- "string"
], - "config": {
- "protocol": "MODBUS_SERIAL"
}, - "interFrameDelay": 1000000000,
- "responseTimeout": 100,
- "retryNumber": 1000000,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "tags": {
- "property1": "string",
- "property2": "string"
}
}
Create an application period in the draft configuration
deviceId required | string The ID of the device |
required | object (ApplicationPeriodDate) |
required | object (ApplicationPeriodDate) |
{- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}
{- "applicationPeriodId": "string",
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}
Create an exception in the draft revision
deviceId required | string The ID of the device |
name required | string non-empty |
required | Array of objects (StateTimeSpan) |
required | object (PeriodDateInterval) |
description | string |
{- "name": "string",
- "daily": [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - "period": {
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}, - "description": "string"
}
{- "exceptionId": "string",
- "name": "string",
- "daily": [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - "period": {
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}, - "description": "string"
}
Create a schedule in the draft revision
deviceId required | string The ID of the device |
name required | string non-empty |
description | string |
required | object (ScheduleConfig) |
required | Array of objects (PropertyStateValue) |
required | object |
{- "name": "string",
- "description": "string",
- "config": {
- "defaultStateId": "string",
- "weekly": [
- [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
]
], - "exceptions": [
- "string"
]
}, - "drivenProperties": [
- {
- "propertyId": "string",
- "applicationPeriodId": "string",
- "values": [
- {
- "stateId": "string",
- "value": { }
}
]
}
], - "tags": {
- "property1": "string",
- "property2": "string"
}
}
{- "scheduleId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "defaultStateId": "string",
- "weekly": [
- [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
]
], - "exceptions": [
- "string"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "disabled": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "drivenProperties": [
- {
- "propertyId": "string",
- "applicationPeriodId": "string",
- "values": [
- {
- "stateId": "string",
- "value": { }
}
]
}
]
}
Create a state in the draft revision
deviceId required | string The ID of the device |
name required | string non-empty |
color required | string non-empty |
{- "name": "string",
- "color": "string"
}
{- "stateId": "string",
- "name": "string",
- "color": "string"
}
Get an exception for a specific revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
exceptionId required | string |
{- "exceptionId": "string",
- "name": "string",
- "daily": [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - "period": {
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}, - "description": "string"
}
Get a schedule for a specific revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
scheduleId required | string |
{- "scheduleId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "defaultStateId": "string",
- "weekly": [
- [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
]
], - "exceptions": [
- "string"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "disabled": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "drivenProperties": [
- {
- "propertyId": "string",
- "applicationPeriodId": "string",
- "values": [
- {
- "stateId": "string",
- "value": { }
}
]
}
]
}
Get the scheduler for a specific revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
{- "schedules": [
- {
- "scheduleId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "defaultStateId": "string",
- "weekly": [
- [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
]
], - "exceptions": [
- "string"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "disabled": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "drivenProperties": [
- {
- "propertyId": "string",
- "applicationPeriodId": "string",
- "values": [
- {
- "stateId": "string",
- "value": { }
}
]
}
]
}
], - "states": [
- {
- "stateId": "string",
- "name": "string",
- "color": "string"
}
], - "applicationPeriods": [
- {
- "applicationPeriodId": "string",
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}
], - "exceptions": [
- {
- "exceptionId": "string",
- "name": "string",
- "daily": [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - "period": {
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}, - "description": "string"
}
]
}
Get a state for a specific revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
stateId required | string |
{- "stateId": "string",
- "name": "string",
- "color": "string"
}
List application periods in a specific revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
[- {
- "applicationPeriodId": "string",
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}
]
List the exceptions for a specific revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
tag | string Filter the results by a Tag key and/or a tag value. The filter has to
be in the format Multiple filters can be used, by repeating the query as in
|
[- {
- "exceptionId": "string",
- "name": "string",
- "daily": [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - "period": {
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}, - "description": "string"
}
]
List the schedules for a specific revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
tag | string Filter the results by a Tag key and/or a tag value. The filter has to
be in the format Multiple filters can be used, by repeating the query as in
|
[- {
- "scheduleId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "defaultStateId": "string",
- "weekly": [
- [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
]
], - "exceptions": [
- "string"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "disabled": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "drivenProperties": [
- {
- "propertyId": "string",
- "applicationPeriodId": "string",
- "values": [
- {
- "stateId": "string",
- "value": { }
}
]
}
]
}
]
List the states for a specific revision
deviceId required | string The ID of the device |
revisionId required | string Default: "current" The revision id of the configuration to get. Two special cases:
NoteBetween the publish action and the acknowledgment. The draft revision will switch its status to SENT. While in that status, the revision will still be called "draft", but no update will be authorized. Therefore, trying to create a new draft will result in a conflict until the status changes to either CURRENT or ERROR. |
tag | string Filter the results by a Tag key and/or a tag value. The filter has to
be in the format Multiple filters can be used, by repeating the query as in
|
[- {
- "stateId": "string",
- "name": "string",
- "color": "string"
}
]
Update an exception in the draft revision
deviceId required | string The ID of the device |
exceptionId required | string |
name | string non-empty |
Array of objects (StateTimeSpan) | |
object (PeriodDateInterval) | |
description | string |
{- "name": "string",
- "daily": [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - "period": {
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}, - "description": "string"
}
{- "exceptionId": "string",
- "name": "string",
- "daily": [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - "period": {
- "start": {
- "year": 1,
- "day": 1,
- "month": 1
}, - "end": {
- "year": 1,
- "day": 1,
- "month": 1
}
}, - "description": "string"
}
Update a schedule in the draft revision
deviceId required | string The ID of the device |
scheduleId required | string |
name | string |
description | string |
object (ScheduleConfig) | |
Array of objects (PropertyStateValue) | |
object | |
disabled | boolean |
{- "name": "string",
- "description": "string",
- "config": {
- "defaultStateId": "string",
- "weekly": [
- [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
]
], - "exceptions": [
- "string"
]
}, - "drivenProperties": [
- {
- "propertyId": "string",
- "applicationPeriodId": "string",
- "values": [
- {
- "stateId": "string",
- "value": { }
}
]
}
], - "tags": {
- "property1": "string",
- "property2": "string"
}, - "disabled": true
}
{- "scheduleId": "string",
- "name": "string",
- "description": "string",
- "config": {
- "defaultStateId": "string",
- "weekly": [
- [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
], - [
- {
- "timeSpan": {
- "start": "14:30:00",
- "end": "14:30:00"
}, - "stateId": "string"
}
]
], - "exceptions": [
- "string"
]
}, - "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "disabled": true,
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "drivenProperties": [
- {
- "propertyId": "string",
- "applicationPeriodId": "string",
- "values": [
- {
- "stateId": "string",
- "value": { }
}
]
}
]
}
Update a state in the draft revision
deviceId required | string The ID of the device |
stateId required | string |
name | string non-empty |
color | string non-empty |
{- "name": "string",
- "color": "string"
}
{- "stateId": "string",
- "name": "string",
- "color": "string"
}
Create a file resource
fileResourceType required | string (FileResourceType) Enum: "MQTT_CLIENT_CERTIFICATE" "MQTT_PRIVATE_KEY" "MQTT_CA_CERTIFICATE" "PLUGIN" The type of resource he's creating |
level required | string (FileResourceVisibilityLevel) Enum: "DEVICE" "ORGANIZATION" The visibility of the resource |
name required | string The name of the file resource |
description | string A short description of this resource |
organizationId | string <uuid> The ID of organization this resource will be visible to |
deviceId | string The ID of device unit this resource will be visible to |
packageName | string A globally unique slug for the resource |
requiredOptions | Array of strings (RatePlanOption) unique Items Enum: "HEATING_OPTIMISER" "MINI_BMS" "HOURLY_BASED_COMPUTATION" "FREE_LORAWAN_DL" License options this resource will be visible to |
file required | string <binary> The content of the file to be uploaded. Has to be MultipartFile. |
{- "file": "string"
}
{- "versionId": "string",
- "fileResourceId": "string",
- "fileResourceType": "MQTT_CLIENT_CERTIFICATE",
- "packageName": "moving-average",
- "visibility": {
- "level": "DEVICE",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "deviceId": "string",
- "requiredSubscriptionOption": [
- "HEATING_OPTIMISER"
]
}, - "sequenceNumber": 0,
- "default": true,
- "name": "string",
- "description": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
Create a new file resource version. This will keep the same visibility level as the default file resource.
fileResourceId required | string The ID of the file resource to create a version for |
versionId | string The version id of this resource |
name | string The name of the file resource |
description | string A short description of this resource |
default | boolean Whether this version will be set as default |
file required | string <binary> The content of the file to be uploaded |
{- "file": "string"
}
{- "versionId": "string",
- "fileResourceId": "string",
- "fileResourceType": "MQTT_CLIENT_CERTIFICATE",
- "packageName": "moving-average",
- "visibility": {
- "level": "DEVICE",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "deviceId": "string",
- "requiredSubscriptionOption": [
- "HEATING_OPTIMISER"
]
}, - "sequenceNumber": 0,
- "default": true,
- "name": "string",
- "description": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
Delete the file resource
fileResourceId required | string The ID of the file resource to delete |
{- "versionId": "string",
- "fileResourceId": "string",
- "fileResourceType": "MQTT_CLIENT_CERTIFICATE",
- "packageName": "moving-average",
- "visibility": {
- "level": "DEVICE",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "deviceId": "string",
- "requiredSubscriptionOption": [
- "HEATING_OPTIMISER"
]
}, - "sequenceNumber": 0,
- "default": true,
- "name": "string",
- "description": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
Removes a specific version of a file resource. If this version is the default one, will mark the previous non-deleted resource as default.
fileResourceId required | string The ID of the file resource to delete the version for |
versionId required | string The ID of the version to delete |
{- "versionId": "string",
- "fileResourceId": "string",
- "fileResourceType": "MQTT_CLIENT_CERTIFICATE",
- "packageName": "moving-average",
- "visibility": {
- "level": "DEVICE",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "deviceId": "string",
- "requiredSubscriptionOption": [
- "HEATING_OPTIMISER"
]
}, - "sequenceNumber": 0,
- "default": true,
- "name": "string",
- "description": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
Get the default version of the file resource
fileResourceId required | string The ID of the file resource |
{- "versionId": "string",
- "fileResourceId": "string",
- "fileResourceType": "MQTT_CLIENT_CERTIFICATE",
- "packageName": "moving-average",
- "visibility": {
- "level": "DEVICE",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "deviceId": "string",
- "requiredSubscriptionOption": [
- "HEATING_OPTIMISER"
]
}, - "sequenceNumber": 0,
- "default": true,
- "name": "string",
- "description": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
Get a specific version of the file resource. If the versionId
is "default", this will return the default version
fileResourceId required | string The ID of the file resource to get the version for |
versionId required | string The ID of the version to get. If set to "default", will target the default version. |
{- "versionId": "string",
- "fileResourceId": "string",
- "fileResourceType": "MQTT_CLIENT_CERTIFICATE",
- "packageName": "moving-average",
- "visibility": {
- "level": "DEVICE",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "deviceId": "string",
- "requiredSubscriptionOption": [
- "HEATING_OPTIMISER"
]
}, - "sequenceNumber": 0,
- "default": true,
- "name": "string",
- "description": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
List all configs using this file resource. This lists only the the configs with status CURRENT, DRAFT and SENT.
fileResourceId required | string The ID of the file resource to list configs for |
versionId | string The ID of the version to list configs for |
[- {
- "deviceId": "string",
- "configRevisionId": "5cf225f0-de39-4670-929c-9b1d0af5c879",
- "configRevisionStatus": "DRAFT",
- "pinnedResource": {
- "resourceId": "string",
- "versionId": "string",
- "useDefault": true
}
}
]
List all the versions of a file resource, sorted by sequenceNumber
.
fileResourceId required | string The ID of the file resource to list versions for |
[- {
- "versionId": "string",
- "fileResourceId": "string",
- "fileResourceType": "MQTT_CLIENT_CERTIFICATE",
- "packageName": "moving-average",
- "visibility": {
- "level": "DEVICE",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "deviceId": "string",
- "requiredSubscriptionOption": [
- "HEATING_OPTIMISER"
]
}, - "sequenceNumber": 0,
- "default": true,
- "name": "string",
- "description": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
]
List all the file resources one has access to
organizationId | string <uuid> |
resourceType | string (FileResourceType) Enum: "MQTT_CLIENT_CERTIFICATE" "MQTT_PRIVATE_KEY" "MQTT_CA_CERTIFICATE" "PLUGIN" The type of resource. This determines the maximum visibility level (see
|
[- {
- "versionId": "string",
- "fileResourceId": "string",
- "fileResourceType": "MQTT_CLIENT_CERTIFICATE",
- "packageName": "moving-average",
- "visibility": {
- "level": "DEVICE",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "deviceId": "string",
- "requiredSubscriptionOption": [
- "HEATING_OPTIMISER"
]
}, - "sequenceNumber": 0,
- "default": true,
- "name": "string",
- "description": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
]
Update metadata of a file resource version, or mark a version as the default one
fileResourceId required | string The ID of the file resource to update the version for |
versionId required | string The ID of the version to update |
name | string non-empty The new name |
description | string The new description |
object Tags for this resource | |
default | boolean Mark this version as default |
{- "name": "string",
- "description": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "default": true
}
{- "versionId": "string",
- "fileResourceId": "string",
- "fileResourceType": "MQTT_CLIENT_CERTIFICATE",
- "packageName": "moving-average",
- "visibility": {
- "level": "DEVICE",
- "organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
- "deviceId": "string",
- "requiredSubscriptionOption": [
- "HEATING_OPTIMISER"
]
}, - "sequenceNumber": 0,
- "default": true,
- "name": "string",
- "description": "string",
- "tags": {
- "property1": "string",
- "property2": "string"
}, - "createdAt": "2019-08-24T14:15:22Z",
- "createdBy": "string",
- "updatedAt": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
Return a specific BACnet object and all its corresponding properties
objectType required | integer <int64> The type of the object to get |
{- "name": "string",
- "identifier": 0,
- "properties": [
- {
- "identifier": 0,
- "name": "string",
- "optional": true,
- "dataType": 0,
- "dataTypeName": "string",
- "dataTypeSupported": true
}
]
}
Return all available data types in BACnet, by default it returns only the supported ones
supportedOnly | boolean Whether to filter by only the supported data types or not |
[- {
- "name": "string",
- "identifier": 0,
- "supported": true,
- "aliasedBy": "string"
}
]
Return all available objects and their corresponding properties in BACnet
[- {
- "name": "string",
- "identifier": 0,
- "properties": [
- {
- "identifier": 0,
- "name": "string",
- "optional": true,
- "dataType": 0,
- "dataTypeName": "string",
- "dataTypeSupported": true
}
]
}
]
Get a specific SNVT type from LON including all the supported subfields
index required | integer <int32> The SNVT index to query |
[- {
- "snvt_index": 0,
- "path": "string",
- "type": "string",
- "description": "string",
- "supported": true,
- "array-size": 0,
- "formula": {
- "a": 0,
- "b": 0,
- "c": 0,
- "s": 0.1
}, - "range": {
- "min": 0,
- "max": 0
}, - "comments": "string"
}
]
Return all available SNVT types in LON, by default it returns only the supported ones
supportedOnly | boolean Whether to filter by only the supported data types or not |
[- {
- "snvt_index": 0,
- "subfields": [
- {
- "snvt_index": 0,
- "path": "string",
- "type": "string",
- "description": "string",
- "supported": true,
- "array-size": 0,
- "formula": {
- "a": 0,
- "b": 0,
- "c": 0,
- "s": 0.1
}, - "range": {
- "min": 0,
- "max": 0
}, - "comments": "string"
}
]
}
]