The relayr Cloud is a computing platform designed for industrial IoT. It is a managed multi-tenant environment available on one of relayr's infrastructure partners.
The different endpoints offered by the relayr Cloud can be used to build your own solutions or to integrate the relayr Cloud with your existing solutions or other relayr technology products (Dashboards, Analytics and Gateway solutions). This website lists all of the Cloud endpoints and explains how to use them.
The relayr Cloud architecture revolves around devices, which are the most basic elements of the platform. Devices are entities that can transmit and receive data to and from the Cloud. They represent a machine, or any other industrial asset connected to the Cloud.
The data sent and received to and from the Cloud is then represented as measurement and alert values you can leverage according to your use case, using the different Cloud endpoints. User services also allow you to control who can access the Cloud services used in your solution. Browse the left navigation panel of this website to get a complete overview of the Cloud features.
The relayr API is usually updated at each release and follows the below rules:
The relayr API uses standard HTTP status codes to indicate the success or failure of a call. The body of the response is a JSON in the following format:
{
"error": {
"id": "e75ec4f4772ebdcc5c73f50cda9a8a78",
"message": "Old password is not valid",
"details": "More about what a valid password looks like",
"code": "PASSWORD_MALFORMED"
}
}
The error fields code
and details
are optional and not always present.
The numbers in the table below indicate the number of requests you can send to the Cloud per second per IP.
Rate limit | Burst limit | |
---|---|---|
Login endpoints | 25 | 50 |
All other endpoints | 25 | 50 |
NOTE: If you try to login and fail 5 times in a row within an hour, your account gets blocked for 5 mins even if you haven’t reached 50 requests.
NOTE: The request URL for these endpoints is: https://login.relayr.io/.
The relayr Cloud uses OAuth 2.0 as its main authorization protocol. Your relayr credentials (user name, password and organization) are required to acquire the following tokens:
Tokens are used in the authorization header when sending API calls to the Cloud,
as follows: Authorization: Bearer <token>
.
The endpoints presented in this section allow you to acquire and manage access
and refresh tokens for the Cloud and/or your websites connected to the Cloud.
Changes the password you are currently using. You must acquire a new access token after the change.
New and Old Password
oldPassword required | string Password has to be at least 8 characters long and contain at least one uppercase, one lowercase letter and a number |
password required | string Password has to be at least 8 characters long and contain at least one uppercase, one lowercase letter and a number |
{- "oldPassword": "Such5ecret",
- "password": "Such5ecret"
}
{- "error": {
- "code": "string",
- "details": "string",
- "id": "d413c853-4b66-405b-8363-ab0d9f86f354",
- "message": "string"
}
}
Acquires a refresh token for the Cloud or the website specified in the query. Use "api-client"
for the client_id
parameter to acquire a refresh token for the Cloud. Refresh tokens are valid for 15 years.
client_id required | string^[A-Za-z0-9_.-]+$ Example: client_id=asset-services-dashboard ID of the website that the user wants to log into. |
refresh_token required | string |
{- "refresh_token": "79c53f11d0c44fb79ef9596b917c3dbf-r"
}
{- "accessToken": "070b35231966488ab07f11822c6ef162",
- "expiresIn": 43199,
- "refreshToken": "cd98b3dea6044470b0a6dfccc0e370ee-r",
- "tokenType": "Bearer"
}
Deletes the access tokens and refresh tokens specified in the query
access_token | string Access token |
refresh_token | string Refresh token |
{- "access_token": "070b35231966488ab07f11822c6ef162",
- "refresh_token": "cd98b3dea6044470b0a6dfccc0e370ee-r"
}
{- "error": {
- "details": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "message": "string"
}
}
Acquires an access token for the Cloud or the website specified in the query from scripts, SDKs and backend services. Use "api-client"
for the client_id
parameter to acquire an access token for the Cloud. Access tokens are valid for 100 minutes. This endpoint is not allowed to be called in browsers (enforced using CORS). If you want to authorize a frontend application, use the form of the /oauth/authorize
endpoint on this service.
client_id required | string^[A-Za-z0-9_.-]+$ Example: client_id=asset-services-dashboard ID of the website that the user wants to log into. |
username required | string Must be url encoded |
password required | string Must be url encoded |
{- "password": "IContainLettersAndNumbers1",
- "username": "user@example.com"
}
{- "accessToken": "070b35231966488ab07f11822c6ef162",
- "expiresIn": 43199,
- "refreshToken": "cd98b3dea6044470b0a6dfccc0e370ee-r",
- "tokenType": "Bearer"
}
Returns the information associated with the token you are currently using, such as the organizations to which you belong, the device groups to which you have access in the Cloud, etc.
{- "organizations": [
- {
- "id": "d413c853-4b66-405b-8363-ab0d9f86f354",
- "name": "new_org"
}
], - "permissions": [
- "string"
], - "deviceGroups": [
- {
- "id": null,
- "name": null,
- "orgId": null
}
], - "orgId": "d413c853-4b66-405b-8363-ab0d9f86f354",
- "orgName": "new_org",
- "product": "franz",
- "roles": [
- {
- "id": "d413c853-4b66-405b-8363-ab0d9f86f354",
- "name": "admin"
}
], - "familyName": "User",
- "givenName": "Test",
- "userEmail": "user@test.org",
- "userId": "d413c853-4b66-405b-8363-ab0d9f86f354",
- "userName": "user@test.org"
}
The relayr Cloud lets you create API keys as an alternative way to access
the Cloud. API keys are used in the following header when making calls to the
Cloud: X-Api-Key: <api-key>
. The endpoints presented in this section allow you
to create and manage API keys.
As there is no concept of Api-key permissions in the relayr cloud. When using Api-key caller will get exactly the same permissions as the user that has created the Api-key. Permissions will be resolved at the moment of the call. This means that if the role of the user that created the key gets updated or changed, a caller that uses api-key will get an updated list of permissions.
{- "data": [
- {
- "createdAt": "2017-07-26T09:14:19.732+0000",
- "id": "86eb2cfe-5f9a-4459-9011-009c35e47fb5",
- "name": "Charts dasboard key",
- "orgId": "c6ae95e2-a0d2-46a3-9360-6f260de9c46f",
- "userId": "62bda597-3a27-484d-b633-1eaea47d9f0a"
}
]
}
Creates an API key for the Cloud
name | string Name of the API key for humans, can be used as description |
{- "name": "Charts dasboard key"
}
{- "id": "86eb2cfe-5f9a-4459-9011-009c35e47fb5",
- "key": "536713cb-e599-44fa-8230-7a59370c9cb4"
}
Deletes the API key specified in the path
keyId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 86eb2cfe-5f9a-4459-9011-009c35e47fb5 Id of the API key |
{- "error": {
- "details": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "message": "string"
}
}
Returns the API key specified in the path
keyId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 86eb2cfe-5f9a-4459-9011-009c35e47fb5 Id of the API key |
{- "createdAt": "2017-07-26T09:14:19.732+0000",
- "id": "86eb2cfe-5f9a-4459-9011-009c35e47fb5",
- "name": "Charts dasboard key",
- "orgId": "c6ae95e2-a0d2-46a3-9360-6f260de9c46f",
- "userId": "62bda597-3a27-484d-b633-1eaea47d9f0a"
}
NOTE: The request URL for these endpoints is: https://login.relayr.io/.
The relayr Cloud provides endpoints to create website pages for user authorization. Pages can be branded according to your use case. The endpoints presented in this section allow you to create website pages where logged in users can send invitations to a website to other users, users can accept invitations to different platforms and create and reset their passwords.
Displays an HTML page allowing users to enter a new password, for the website specified in the query.
client_id required | string^[A-Za-z0-9_.-]+$ Example: client_id=asset-services-dashboard ID of the website that the user wants to log into. |
code required | string^[A-Za-z0-9_.-]+$ Example: code=xertdw1234 Code which is used to change the password |
{- "error": {
- "details": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "message": "string"
}
}
Resets the password of the user and sends them an email informing them of the password change
redirect_uri | string Example: redirect_uri=https://login.relayr.io/user/settings URL to include in the email sent after user finished with the password change process. If not provided, a default one (if specified) is used. |
code required | string >= 8 characters |
newPassword required | string >= 8 characters |
{- "code": "N2172PdH8Y",
- "newPassword": "SuperSafePa55"
}
{- "error": {
- "details": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "message": "string"
}
}
Sends a temporary password by email to the user, that can be used for a single login and change of the password.
client_id required | string^[A-Za-z0-9_.-]+$ Example: client_id=asset-services-dashboard ID of the website that the user wants to log into. |
redirect_uri | string Example: redirect_uri=https://login.relayr.io/password/change URL to include in the email to send to the user to reset the password. If not provided, a default one (if specified) is used. |
username required | string <email> >= 4 characters Username for login (email) used to validate the account and to send an email with the temporary password (if username exists). Must be url encoded. |
{- "username": "user@example.com"
}
{- "error": {
- "details": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "message": "string"
}
}
Displays an HTML page allowing new users to enter a password and accept the invitation, for the website specified in the query.
client_id required | string^[A-Za-z0-9_.-]+$ Example: client_id=asset-services-dashboard ID of the website that the user wants to log into. |
redirect_uri required | string Example: redirect_uri=https://login.relayr.io/user/settings URL to include in the email sent after user is finished with the password change process. If not provided, a default one (if specified) is used. |
code required | string^[A-Za-z0-9_.-]+$ Example: code=xertdw1234 Code which is used to change the password |
{- "error": {
- "details": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "message": "string"
}
}
Sets the password of the user and activates them on the website specified in the query. The user also receives a welcome email and is redirected to the website.
client_id required | string^[A-Za-z0-9_.-]+$ Example: client_id=asset-services-dashboard ID of the website that the user wants to log into. |
redirect_uri | string |
code required | string |
password required | string >= 8 characters |
familyName required | string non-empty |
givenName required | string non-empty |
phoneNumber | string |
{- "code": "N2172PdH8Y",
- "familyName": "Test",
- "givenName": "User",
- "password": "SuperSafePa55",
- "phoneNumber": "555-555-555"
}
{- "error": {
- "details": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "message": "string"
}
}
The relayr Cloud supports the MQTT protocol for a variety of purposes. The endpoints presented in this section allow you to create and delete MQTT credentials for devices.
For more information on the MQTT topics available on the relayr MQTT broker, please go to our MQTT documentation website.
Deletes the MQTT credentials for the device specified in the path
deviceId required | string^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Id of the device for which to delete existing credentials |
{- "error": {
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Not authorised"
}
}
Creates or returns the existing MQTT credentials for the device specified in the path
deviceId required | string^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Id of the device for which to retrieve the credentials |
{- "password": "oijijaoiasoiakjdnasjdkasddnask",
- "username": "be3faaa1-6165-4439-93b8-ecfb8febc0b7"
}
The relayr Cloud supports the MQTT protocol for a variety of purposes. The endpoints presented in this section allow you to create and delete MQTT credentials for device groups.
For more information on the MQTT topics available on the relayr MQTT broker, please go to our MQTT documentation website.
Deletes the MQTT credentials for the device group specified in the path
groupId required | string^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Id of the group for which to delete existing credentials |
{- "error": {
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Not authorised"
}
}
Creates or returns the existing MQTT credentials for the device group specified in the path
groupId required | string^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Id of the group for which to retrieve the credentials |
{- "password": "oijijaoiasoiakjdnasjdkasddnask",
- "username": "be3faaa1-6165-4439-93b8-ecfb8febc0b7"
}
Device models are entities which enable the relayr Cloud to make sense of the data received and transmitted by your devices. They essentially provide the semantics of the data to display.
A device model has a name and a description, while the actual information on the data a device can send/receive is defined in a version of a device model. Creating a device model and a device model version is hence your first step to create a device.
The endpoints presented in this section let you create and manage device models and their versions.
Returns all device models to which you have access
fileModelId | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: fileModelId=a9eb4f33-4538-49a1-b6bf-b9c363502cda file model id to filter for |
limit | string [ 1 .. 100 ] ^\d+$ Example: limit=10 pagination limit - max number of entities to return |
offset | string >= 0 ^\d+$ Example: offset=20 pagination offset |
{- "data": [
- {
- "createdAt": "2017-07-26T09:14:19.732+0000",
- "description": "Model X furnace from manufacturer Y",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "latestVersion": {
- "alerts": [
- {
- "displayName": "Default temperature",
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "string"
], - "severity": 0
}
], - "commands": [
- {
- "displayName": "Default temperature",
- "max": 0,
- "min": 0,
- "name": "Burner 1 Temperature",
- "parameter": "string",
- "schema": { }
}
], - "createdAt": "2017-07-26T09:14:19.732+0000",
- "description": "Update model with new maximum values for burner tempratures",
- "fileModelIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "measurementCounters": [
- {
- "displayName": "Default temperature",
- "name": "string",
- "reset": "string",
- "trigger": "string",
- "triggerValue": 0
}
], - "measurements": [
- {
- "displayName": "Default temperature",
- "domain": "time",
- "max": 10,
- "min": 1,
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "Burner 1 Temperature"
], - "type": "number",
- "unit": "degrees C"
}
], - "metadata": { },
- "modelId": "17563eeb-82d7-4210-ac9b-1a20c7d67278",
- "modelName": "Model Y",
- "name": "Furnace Model X",
- "updatedAt": "2017-07-26T09:14:19.732+0000",
- "versionNumber": 1
}, - "name": "Furnace Model X",
- "orgId": "25b2c2d5-a7fc-47d0-89e4-8709a1560bfa",
- "updatedAt": "2017-07-26T09:14:19.732+0000",
- "versionNumbers": [
- 1,
- 2
]
}
]
}
Creates a device model
name required | string [ 1 .. 64 ] characters ^(?!\s*$).+ |
description | string <= 256 characters ^(?!\s*$).+ Description of the device model. |
{- "description": "Model X furnace from manufacturer Y",
- "name": "Furnace Model X"
}
{- "createdAt": "2017-07-26T09:14:19.732+0000",
- "description": "Model X furnace from manufacturer Y",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "latestVersion": {
- "alerts": [
- {
- "displayName": "Default temperature",
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "string"
], - "severity": 0
}
], - "commands": [
- {
- "displayName": "Default temperature",
- "max": 0,
- "min": 0,
- "name": "Burner 1 Temperature",
- "parameter": "string",
- "schema": { }
}
], - "createdAt": "2017-07-26T09:14:19.732+0000",
- "description": "Update model with new maximum values for burner tempratures",
- "fileModelIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "measurementCounters": [
- {
- "displayName": "Default temperature",
- "name": "string",
- "reset": "string",
- "trigger": "string",
- "triggerValue": 0
}
], - "measurements": [
- {
- "displayName": "Default temperature",
- "domain": "time",
- "max": 10,
- "min": 1,
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "Burner 1 Temperature"
], - "type": "number",
- "unit": "degrees C"
}
], - "metadata": { },
- "modelId": "17563eeb-82d7-4210-ac9b-1a20c7d67278",
- "modelName": "Model Y",
- "name": "Furnace Model X",
- "updatedAt": "2017-07-26T09:14:19.732+0000",
- "versionNumber": 1
}, - "name": "Furnace Model X",
- "orgId": "25b2c2d5-a7fc-47d0-89e4-8709a1560bfa",
- "updatedAt": "2017-07-26T09:14:19.732+0000",
- "versionNumbers": [
- 1,
- 2
]
}
Deletes the device model specified in the path. The model must not be in use by any device.
modelId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f Device model Id (UUID) |
{- "error": {
- "details": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "message": "string"
}
}
Returns the device model specified in the path
modelId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f Device model Id (UUID) |
{- "createdAt": "2017-07-26T09:14:19.732+0000",
- "description": "Model X furnace from manufacturer Y",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "latestVersion": {
- "alerts": [
- {
- "displayName": "Default temperature",
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "string"
], - "severity": 0
}
], - "commands": [
- {
- "displayName": "Default temperature",
- "max": 0,
- "min": 0,
- "name": "Burner 1 Temperature",
- "parameter": "string",
- "schema": { }
}
], - "createdAt": "2017-07-26T09:14:19.732+0000",
- "description": "Update model with new maximum values for burner tempratures",
- "fileModelIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "measurementCounters": [
- {
- "displayName": "Default temperature",
- "name": "string",
- "reset": "string",
- "trigger": "string",
- "triggerValue": 0
}
], - "measurements": [
- {
- "displayName": "Default temperature",
- "domain": "time",
- "max": 10,
- "min": 1,
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "Burner 1 Temperature"
], - "type": "number",
- "unit": "degrees C"
}
], - "metadata": { },
- "modelId": "17563eeb-82d7-4210-ac9b-1a20c7d67278",
- "modelName": "Model Y",
- "name": "Furnace Model X",
- "updatedAt": "2017-07-26T09:14:19.732+0000",
- "versionNumber": 1
}, - "name": "Furnace Model X",
- "orgId": "25b2c2d5-a7fc-47d0-89e4-8709a1560bfa",
- "updatedAt": "2017-07-26T09:14:19.732+0000",
- "versionNumbers": [
- 1,
- 2
]
}
Updates the information of the device model specified in the path
modelId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f Device model Id (UUID) |
description | string <= 256 characters Description for the device model. |
name | string [ 1 .. 64 ] characters ^(?!\s*$).+ |
{- "description": "Model X furnace from manufacturer Y",
- "name": "Furnace Model X"
}
{- "createdAt": "2017-07-26T09:14:19.732+0000",
- "description": "Model X furnace from manufacturer Y",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "latestVersion": {
- "alerts": [
- {
- "displayName": "Default temperature",
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "string"
], - "severity": 0
}
], - "commands": [
- {
- "displayName": "Default temperature",
- "max": 0,
- "min": 0,
- "name": "Burner 1 Temperature",
- "parameter": "string",
- "schema": { }
}
], - "createdAt": "2017-07-26T09:14:19.732+0000",
- "description": "Update model with new maximum values for burner tempratures",
- "fileModelIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "measurementCounters": [
- {
- "displayName": "Default temperature",
- "name": "string",
- "reset": "string",
- "trigger": "string",
- "triggerValue": 0
}
], - "measurements": [
- {
- "displayName": "Default temperature",
- "domain": "time",
- "max": 10,
- "min": 1,
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "Burner 1 Temperature"
], - "type": "number",
- "unit": "degrees C"
}
], - "metadata": { },
- "modelId": "17563eeb-82d7-4210-ac9b-1a20c7d67278",
- "modelName": "Model Y",
- "name": "Furnace Model X",
- "updatedAt": "2017-07-26T09:14:19.732+0000",
- "versionNumber": 1
}, - "name": "Furnace Model X",
- "orgId": "25b2c2d5-a7fc-47d0-89e4-8709a1560bfa",
- "updatedAt": "2017-07-26T09:14:19.732+0000",
- "versionNumbers": [
- 1,
- 2
]
}
Returns all versions of the device model specified in the path
modelId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f Device model Id (UUID) |
{- "data": [
- {
- "alerts": [
- {
- "displayName": "Default temperature",
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "string"
], - "severity": 0
}
], - "commands": [
- {
- "displayName": "Default temperature",
- "max": 0,
- "min": 0,
- "name": "Burner 1 Temperature",
- "parameter": "string",
- "schema": { }
}
], - "createdAt": "2017-07-26T09:14:19.732+0000",
- "description": "Update model with new maximum values for burner tempratures",
- "fileModelIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "measurementCounters": [
- {
- "displayName": "Default temperature",
- "name": "string",
- "reset": "string",
- "trigger": "string",
- "triggerValue": 0
}
], - "measurements": [
- {
- "displayName": "Default temperature",
- "domain": "time",
- "max": 10,
- "min": 1,
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "Burner 1 Temperature"
], - "type": "number",
- "unit": "degrees C"
}
], - "metadata": { },
- "modelId": "17563eeb-82d7-4210-ac9b-1a20c7d67278",
- "modelName": "Model Y",
- "name": "Furnace Model X",
- "updatedAt": "2017-07-26T09:14:19.732+0000",
- "versionNumber": 1
}
]
}
Creates a version for the device model specified in the path
modelId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f Device model Id (UUID) |
Model version
Array of objects | |
Array of objects | |
description | string <= 256 characters Description for the device model version. |
fileModelIds | Array of strings <uuid> unique |
Array of objects | |
Array of objects | |
metadata | object Represantation of device model version metadata |
name | string [ 1 .. 64 ] characters ^(?!\s*$).+ |
{- "alerts": [
- {
- "displayName": "Default temperature",
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "string"
], - "severity": 0
}
], - "commands": [
- {
- "displayName": "Default temperature",
- "max": 0,
- "min": 0,
- "name": "Burner 1 Temperature",
- "parameter": "string",
- "schema": { }
}
], - "description": "string",
- "fileModelIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "measurementCounters": [
- {
- "displayName": "Default temperature",
- "name": "string",
- "reset": "string",
- "trigger": "string",
- "triggerValue": 0
}
], - "measurements": [
- {
- "displayName": "Default temperature",
- "domain": "time",
- "max": 10,
- "min": 1,
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "Burner 1 Temperature"
], - "type": "number",
- "unit": "degrees C"
}
], - "metadata": { },
- "name": "Furnace Model X"
}
{- "alerts": [
- {
- "displayName": "Default temperature",
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "string"
], - "severity": 0
}
], - "commands": [
- {
- "displayName": "Default temperature",
- "max": 0,
- "min": 0,
- "name": "Burner 1 Temperature",
- "parameter": "string",
- "schema": { }
}
], - "createdAt": "2017-07-26T09:14:19.732+0000",
- "description": "Update model with new maximum values for burner tempratures",
- "fileModelIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "measurementCounters": [
- {
- "displayName": "Default temperature",
- "name": "string",
- "reset": "string",
- "trigger": "string",
- "triggerValue": 0
}
], - "measurements": [
- {
- "displayName": "Default temperature",
- "domain": "time",
- "max": 10,
- "min": 1,
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "Burner 1 Temperature"
], - "type": "number",
- "unit": "degrees C"
}
], - "metadata": { },
- "modelId": "17563eeb-82d7-4210-ac9b-1a20c7d67278",
- "modelName": "Model Y",
- "name": "Furnace Model X",
- "updatedAt": "2017-07-26T09:14:19.732+0000",
- "versionNumber": 1
}
Validates the versions of the device model specified in the path
modelId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f Device model Id (UUID) |
Model version to validate
Array of objects | |
Array of objects | |
description | string <= 256 characters Description for the device model version. |
fileModelIds | Array of strings <uuid> unique |
Array of objects | |
Array of objects | |
metadata | object Represantation of device model version metadata |
name | string [ 1 .. 64 ] characters ^(?!\s*$).+ |
{- "alerts": [
- {
- "displayName": "Default temperature",
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "string"
], - "severity": 0
}
], - "commands": [
- {
- "displayName": "Default temperature",
- "max": 0,
- "min": 0,
- "name": "Burner 1 Temperature",
- "parameter": "string",
- "schema": { }
}
], - "description": "string",
- "fileModelIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "measurementCounters": [
- {
- "displayName": "Default temperature",
- "name": "string",
- "reset": "string",
- "trigger": "string",
- "triggerValue": 0
}
], - "measurements": [
- {
- "displayName": "Default temperature",
- "domain": "time",
- "max": 10,
- "min": 1,
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "Burner 1 Temperature"
], - "type": "number",
- "unit": "degrees C"
}
], - "metadata": { },
- "name": "Furnace Model X"
}
{- "error": {
- "details": "string",
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "message": "string"
}
}
Returns the model version specified in the path of the device model specified in the path
modelId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f Device model Id (UUID) |
versionNumber required | string^\d+$ Example: 1 Model version number as integer |
{- "alerts": [
- {
- "displayName": "Default temperature",
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "string"
], - "severity": 0
}
], - "commands": [
- {
- "displayName": "Default temperature",
- "max": 0,
- "min": 0,
- "name": "Burner 1 Temperature",
- "parameter": "string",
- "schema": { }
}
], - "createdAt": "2017-07-26T09:14:19.732+0000",
- "description": "Update model with new maximum values for burner tempratures",
- "fileModelIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "measurementCounters": [
- {
- "displayName": "Default temperature",
- "name": "string",
- "reset": "string",
- "trigger": "string",
- "triggerValue": 0
}
], - "measurements": [
- {
- "displayName": "Default temperature",
- "domain": "time",
- "max": 10,
- "min": 1,
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "Burner 1 Temperature"
], - "type": "number",
- "unit": "degrees C"
}
], - "metadata": { },
- "modelId": "17563eeb-82d7-4210-ac9b-1a20c7d67278",
- "modelName": "Model Y",
- "name": "Furnace Model X",
- "updatedAt": "2017-07-26T09:14:19.732+0000",
- "versionNumber": 1
}
Updates the model version specified in the path of the device model specified in the path
modelId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f Device model Id (UUID) |
versionNumber required | string^\d+$ Example: 1 Model version number as integer |
Model version update
description | string <= 256 characters Description for the device model version. |
name | string [ 1 .. 64 ] characters ^(?!\s*$).+ |
{- "description": "string",
- "name": "Furnace Model X"
}
{- "alerts": [
- {
- "displayName": "Default temperature",
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "string"
], - "severity": 0
}
], - "commands": [
- {
- "displayName": "Default temperature",
- "max": 0,
- "min": 0,
- "name": "Burner 1 Temperature",
- "parameter": "string",
- "schema": { }
}
], - "createdAt": "2017-07-26T09:14:19.732+0000",
- "description": "Update model with new maximum values for burner tempratures",
- "fileModelIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "measurementCounters": [
- {
- "displayName": "Default temperature",
- "name": "string",
- "reset": "string",
- "trigger": "string",
- "triggerValue": 0
}
], - "measurements": [
- {
- "displayName": "Default temperature",
- "domain": "time",
- "max": 10,
- "min": 1,
- "name": "Burner 1 Temperature",
- "relatedMeasurements": [
- "Burner 1 Temperature"
], - "type": "number",
- "unit": "degrees C"
}
], - "metadata": { },
- "modelId": "17563eeb-82d7-4210-ac9b-1a20c7d67278",
- "modelName": "Model Y",
- "name": "Furnace Model X",
- "updatedAt": "2017-07-26T09:14:19.732+0000",
- "versionNumber": 1
}
Devices constitute the most basic element of the relayr platform. Devices are entities that can transmit and receive data to and from the Cloud. They represent any piece of virtual or physical equipment capable of connecting to the relayr Cloud as defined below:
The data sent and received to and from the Cloud is then represented as measurement and alert values. The endpoints presented in this section let you create and manage devices.
NOTE: Before creating a device, you must create a device model and at least one device model version. Go to Device Models in the left navigation panel for more information on device models and their versions.
Updates the model version of all devices in the device group specified in the query. Note: all devices in the device-group, direct and indirect, are going to be updated.
deviceGroupId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: deviceGroupId=ecbbb77d-b91c-4a33-989d-2d072bb59b68 Device group id |
modelId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: modelId=ecbbb77d-b91c-4a33-989d-2d072bb59b68 Model id |
modelVersion | integer >= 1 Version of the specified model |
{- "modelVersion": 1
}
{- "error": {
- "details": "Entity doesn't exist or you don't have permissions to access it.",
- "id": "dc952b4a5b3d4ff98431796c77643cc9",
- "message": "Entity NOT found"
}
}
Creates a device in the device groups specified in the query
name required | string <= 64 characters ^(?!\s*$).+ Name of the device |
modelId required | string^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... The model ID of the device |
modelVersion required | integer >= 1 Version of the specified model |
deviceGroupIds required | Array of strings List of groups that device should be included in |
externalId | string <= 64 characters Nullable A customer-provided identifier for the device. This allows the customer to assign a meaningful ID, such as a serial number, to the device. The External ID must be unique within the organization. |
{- "deviceGroupIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
], - "externalId": "abcdefgh1@mwec23452#@$12",
- "modelId": "ecbbb77d-b91c-4a33-989d-2d072bb59b68",
- "modelVersion": 1,
- "name": "DeviceName"
}
{- "createdAt": "2017-10-16T15:39:06,342",
- "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelVersion": 3,
- "name": "string",
- "orgId": "ab952b4a-5b3d-4ff9-8431-796c77643c11",
- "updatedAt": "2017-07-26T09:14:19.732+0000"
}
Checks if the device corresponding to the specified ID exists in your organization.
externalId required | string <= 64 characters Nullable Example: externalId=ncaeonio2232!@E!@Ddlk A customer-provided identifier for the device. This allows the customer to assign a meaningful ID, such as a serial number, to the device. The External ID must be unique within the organization. |
{- "exists": true
}
Check if user has permissions for the devices specified in the path
ids required | Array of strings <uuid> [ 1 .. 50 ] items List of device IDs (maximum 50) |
{- "error": {
- "details": "Entity doesn't exist or you don't have permissions to access it.",
- "id": "dc952b4a5b3d4ff98431796c77643cc9",
- "message": "Entity NOT found"
}
}
Searches for devices matching ALL the parameters specified in the query. If no parameter is specified, all the devices you have access to are returned. For example: if you specify deviceName: foo
and city: berlin
, this endpoint returns you all devices that are called foo
and are located in berlin
.
limit | integer [ 1 .. 1000 ] Default: 10 Pagination limit - maximum number of entities to return |
offset | integer [ 0 .. 10000 ] Default: 0 Pagination offset. |
locationbox | boolean Default: false If |
groupdata | boolean Default: false If |
Search query.
address | string Case-insensitive, wildcards (*) accepted. Usually a street and a house number the device is located at |
object If defined, only devices with at least one alert set fulfilling severity restrictions will be returned. To enforce all device's set alerts needs to fulfilling severity restrictions set specifiedSeveritiesOnly=true. If more than one property is defined the set of acceptable values is generated for each of them and the intersection of the sets is used for filtering. For example for min = 2 (set of acceptable values [2, 3, 4, 5, 6, 7]), max = 5 (set of acceptable values [0, 1, 2, 3, 4, 5]) and values = [1, 3, 5, 7] the devices with at least one alert with severity equal 3 or 5 are returned | |
alertsState | any A JSON object. The keys correspond to the alert names keys (e.g. ‘too_hot’, ‘too_slow’). The corresponding value is a string describing alert state {‘set‘, ‘clear‘, ‘*‘}. Key is case-sensitive, accepts wildcards (*). Value is case-insensitive, accepts wildcards (*). Alert states can be negated with ‘!’. E.g. { "*": "!set" } matches all devices which don't have any alert with state "set". { "foo*": "!set" } matches all devices which don't have any alert like "foo*" with state "set". If the device doesn't have an alert like "foo*" or no alerts at all it also matches. { "*": "!*" } matches all devices which don't have any alerts. |
city | string Case-insensitive, wildcards (*) accepted. The city the device is located in |
country | string Case-insensitive, wildcards (*) accepted. The country the device is located in |
object A JSON that allows filtering the date time. The keys correspond to the comparison operators < <= > >= | |
deviceId | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Case-insensitive, NO wildcards. The ID of the device |
deviceModelName | string Case-insensitive, wildcards (*) accepted. Name of the device model |
deviceName | string Case-insensitive, wildcards (*) accepted. The name of the device |
directGroupId | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Case-insensitive, NO wildcards. The ID of the device group the device belongs to directly |
externalId | string Case-insensitive, wildcards (*) accepted. The external identifier of the device |
fileModelId | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Case-insensitive, NO wildcards. The ID of the device's file model |
object Filters device records based on the given file model version and | |
fileModelVersionScheduled | integer Experimental feature: Filter device records based on the given device file model version scheduled. |
groupId | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Case-insensitive, NO wildcards. The ID of the device group the device belongs to |
groupModelId | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Case-insensitive, NO wildcards. The ID of the device group model of the device group the device belongs to |
groupModelName | string Case-insensitive, wildcards (*) accepted. Name of the device group model of the device group the device belongs to |
groupName | string Case-insensitive, wildcards (*) accepted. Name of the device group the device belongs to |
object A JSON that allows filtering of last activity. The last activity field keeps track of when the cloud last received a measurement or alert from the device. The keys correspond to the comparison operators < <= > >= and notSet true/false which filters devices that never had activity. | |
object The coordinates which describe boundaries of the area where the devices are located. | |
mapBoxFeature | string Case-sensitive, NO wildcards. MapBox based representation of the location |
metadata | any A JSON object consisting of metadata. The keys correspond to the metadata keys (e.g. ‘color’, ‘smoothness’). The corresponding value can be a string, number or boolean. Key is case-sensitive. String value is case-insensitive, accepts wildcards (*). |
modelId | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Case-insensitive, NO wildcards. The ID of the device model |
zipCode | string Case-insensitive, wildcards (*) accepted. The postal/zip code of the location |
Array of objects Sorting definition |
{- "sort": [
- {
- "key": "metadata.address",
- "order": "desc"
}
]
}
{- "data": [
- {
- "address": "Bergmannstrasse 102/103",
- "alerts": [
- {
- "displayName": "string",
- "name": "too_hot",
- "severity": 5,
- "state": "set",
- "timestamp": "2017-09-18T20:07:27.412Z"
}
], - "buildVersion": "1.2.ab",
- "city": "Berlin",
- "country": "Germany",
- "createdAt": "2017-09-18T20:07:27.412Z",
- "deviceGroups": [
- {
- "direct": true,
- "id": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "metadata": {
- "color": "{\"r\":100, \"g\": 12, \"b\": 254}",
- "foo": "bar",
- "houseNumber": 1
}, - "model": {
- "id": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "name": "Group Model 1"
}, - "name": "Group 1"
}
], - "deviceId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "deviceModelName": "Roof Device",
- "deviceName": "Device 1",
- "externalId": "SN001002",
- "fileModelIds": [
- "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d"
], - "fileModelVersion": 2,
- "fileModelVersionScheduled": 3,
- "lastActivity": "2017-09-18T20:07:27.412Z",
- "location": {
- "lat": 52.457968934171184,
- "lon": 13.148784131866076
}, - "metadata": {
- "color": "{\"r\":100, \"g\": 12, \"b\": 254}",
- "foo": "bar",
- "houseNumber": 1
}, - "metadataLastModified": "2017-09-18T20:07:27.412Z",
- "modelId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "modelVersion": 1,
- "orgId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "updatedAt": "2017-09-18T20:07:27.412Z",
- "zipCode": "012345"
}
], - "locationBox": {
- "bottom": 52.3303,
- "left": 13.0535,
- "right": 13.7262,
- "top": 52.6675
}, - "next": "/devices/search/basic?limit=1&offset=2",
- "prev": "string",
- "total": 100
}
Searches for devices matching one OR several parameters specified in the query. If no parameter is specified, all the devices you have access to are returned.
limit | integer [ 1 .. 1000 ] Default: 10 Pagination limit - maximum number of entities to return |
offset | integer [ 0 .. 10000 ] Default: 0 Pagination offset. |
locationbox | boolean Default: false If |
groupdata | boolean Default: false If |
Search query.
Array of objects Each element is a separate set of filters (with AND operation between them). All elements are translated into one query with OR operator between them, for example for two elements in the array (deviceName = "foo" AND city = "berlin") OR (deviceModelName = "radiator" AND city = "katowice") | |
Array of objects Sorting definition |
{- "or": [
- {
- "address": "foo*",
- "alertsSeverity": {
- "max": 0,
- "min": 0,
- "specifiedSeveritiesOnly": true,
- "values": [
- 0
]
}, - "alertsState": {
- "*": "set",
- "too_hot": "set",
- "too_not": "!set",
- "too_slow": "clear",
- "too_weird": "*"
}, - "city": "foo*",
- "country": "foo*",
- "createdAt": {
- ">": "2017-09-18T20:07:27.412Z"
}, - "deviceId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "deviceModelName": "Roof Device*",
- "deviceName": "foo*",
- "directGroupId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "externalId": "SN001*",
- "fileModelId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "fileModelVersion": {
- "negate": true,
- "version": 2
}, - "fileModelVersionScheduled": 3,
- "groupId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "groupModelId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "groupModelName": "Roof Device Group*",
- "groupName": "*berlin*",
- "lastActivity": {
- ">": "2017-09-18T20:07:27.412Z",
- "notSet": false
}, - "locationBox": {
- "bottom": 52.3303,
- "left": 13.0535,
- "right": 13.7262,
- "top": 52.6675
}, - "mapBoxFeature": "address.4356035406756260",
- "metadata": {
- "color": "{\"r\":100, \"g\": 12, \"b\": 254}",
- "foo": "*bar*",
- "houseNumber": 1
}, - "modelId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "zipCode": "foo*"
}
], - "sort": [
- {
- "key": "metadata.address",
- "order": "desc"
}
]
}
{- "data": [
- {
- "address": "Bergmannstrasse 102/103",
- "alerts": [
- {
- "displayName": "string",
- "name": "too_hot",
- "severity": 5,
- "state": "set",
- "timestamp": "2017-09-18T20:07:27.412Z"
}
], - "buildVersion": "1.2.ab",
- "city": "Berlin",
- "country": "Germany",
- "createdAt": "2017-09-18T20:07:27.412Z",
- "deviceGroups": [
- {
- "direct": true,
- "id": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "metadata": {
- "color": "{\"r\":100, \"g\": 12, \"b\": 254}",
- "foo": "bar",
- "houseNumber": 1
}, - "model": {
- "id": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "name": "Group Model 1"
}, - "name": "Group 1"
}
], - "deviceId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "deviceModelName": "Roof Device",
- "deviceName": "Device 1",
- "externalId": "SN001002",
- "fileModelIds": [
- "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d"
], - "fileModelVersion": 2,
- "fileModelVersionScheduled": 3,
- "lastActivity": "2017-09-18T20:07:27.412Z",
- "location": {
- "lat": 52.457968934171184,
- "lon": 13.148784131866076
}, - "metadata": {
- "color": "{\"r\":100, \"g\": 12, \"b\": 254}",
- "foo": "bar",
- "houseNumber": 1
}, - "metadataLastModified": "2017-09-18T20:07:27.412Z",
- "modelId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "modelVersion": 1,
- "orgId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "updatedAt": "2017-09-18T20:07:27.412Z",
- "zipCode": "012345"
}
], - "locationBox": {
- "bottom": 52.3303,
- "left": 13.0535,
- "right": 13.7262,
- "top": 52.6675
}, - "next": "/devices/search/basic?limit=1&offset=2",
- "prev": "string",
- "total": 100
}
Deletes the device specified in the path
deviceId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Device ID |
{- "error": {
- "details": "Entity doesn't exist or you don't have permissions to access it.",
- "id": "dc952b4a5b3d4ff98431796c77643cc9",
- "message": "Entity NOT found"
}
}
Returns the device specified in the path
deviceId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Device ID |
{- "createdAt": "2017-10-16T15:39:06,342",
- "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelVersion": 3,
- "name": "string",
- "orgId": "ab952b4a-5b3d-4ff9-8431-796c77643c11",
- "updatedAt": "2017-07-26T09:14:19.732+0000"
}
Updates the information of the device specified in the path
deviceId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Device ID |
externalId | string <= 64 characters Nullable A customer-provided identifier for the device. This allows the customer to assign a meaningful ID, such as a serial number, to the device. The External ID must be unique within the organization. |
modelId | string^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... The model ID of the device |
modelVersion | integer >= 1 Version of the specified model |
name | string <= 64 characters ^(?!\s*$).+ Name of the device |
{- "externalId": "abcdefgh1@mwec23452#@$12",
- "modelId": "ecbbb77d-b91c-4a33-989d-2d072bb59b68",
- "modelVersion": 1,
- "name": "DeviceName"
}
{- "createdAt": "2017-10-16T15:39:06,342",
- "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelVersion": 3,
- "name": "string",
- "orgId": "ab952b4a-5b3d-4ff9-8431-796c77643c11",
- "updatedAt": "2017-07-26T09:14:19.732+0000"
}
Deletes the external ID value from a specified deviceId. If the device has no external Id on it, then this will result to no-op.
deviceId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Device ID |
{- "error": {
- "details": "Entity doesn't exist or you don't have permissions to access it.",
- "id": "dc952b4a5b3d4ff98431796c77643cc9",
- "message": "Entity NOT found"
}
}
Removes the device specified in the path from the device groups specified in the query
deviceId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Device ID |
Id of device group
[- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
]
{- "data": [
- {
- "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "d9be177a-b276-11e7-aa7a-afcc578adb81",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "orgId": "e56d22a0-b276-11e7-9863-47b719aa1fe4"
}
]
}
Returns the device groups to which the device specified in the path belongs
deviceId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Device ID |
{- "data": [
- {
- "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "d9be177a-b276-11e7-aa7a-afcc578adb81",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "orgId": "e56d22a0-b276-11e7-9863-47b719aa1fe4"
}
]
}
Adds the device specified in the path to the device groups specified in the query
deviceId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Device ID |
Id of device group
[- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
]
{- "data": [
- {
- "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "d9be177a-b276-11e7-aa7a-afcc578adb81",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "orgId": "e56d22a0-b276-11e7-9863-47b719aa1fe4"
}
]
}
Updates the device groups to which the device specified in the path belongs to the device groups specified in the query
deviceId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Device ID |
Id of device group
[- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
]
Check if user has permissions for the device specified in the path
deviceId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Device ID |
{- "error": {
- "details": "Entity doesn't exist or you don't have permissions to access it.",
- "id": "dc952b4a5b3d4ff98431796c77643cc9",
- "message": "Entity NOT found"
}
}
Devices are sorted into device groups in the relayr Cloud to simplify sending data to multiple devices at once. A device group always has a parent group and can contain multiple devices and multiple device subgroups.
The endpoints presented in this section let you create and manage device groups.
DEPRECATED - Can be replaced with GET /device-groups/info and then subsequent calls to GET /device-groups/{id}/subgroups to get groups on a lower level of a tree. This endpoint will be deleted on 2021-04-19
{- "data": [
- {
- "createdAt": "2017-10-16T15:39:06,342",
- "deviceIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
], - "externalId": "abcdefgh1@mwec23452#@$12",
- "groups": [
- {
- "createdAt": "2017-10-16T15:39:06,342",
- "deviceIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
], - "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "d9be177a-b276-11e7-aa7a-afcc578adb81",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "orgId": "e56d22a0-b276-11e7-9863-47b719aa1fe4",
- "parentId": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "updatedAt": "2017-10-16T15:39:06,342",
- "userIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643c11"
]
}
], - "id": "d9be177a-b276-11e7-aa7a-afcc578adb81",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "orgId": "e56d22a0-b276-11e7-9863-47b719aa1fe4",
- "parentId": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "updatedAt": "2017-10-16T15:39:06,342",
- "userIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643c11"
]
}
]
}
Creates a device group in your organization
name required | string [ 1 .. 64 ] characters ^(?!\s*$).+ Name of the group |
parentId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... ID of the parent group (nullable UUID) as a string |
deviceIds | Array of strings <uuid> IDs for the devices belonging to the group |
externalId | string <= 64 characters Nullable A customer-provided identifier for the device. This allows the customer to assign a meaningful ID, such as a serial number, to the device. The External ID must be unique within the organization. |
modelId | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... ID of the device group model |
{- "deviceIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
], - "externalId": "abcdefgh1@mwec23452#@$12",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "name": "my_group",
- "parentId": "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
}
{- "createdAt": "2017-10-16T15:39:06,342",
- "deviceIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
], - "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "d9be177a-b276-11e7-aa7a-afcc578adb81",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "orgId": "e56d22a0-b276-11e7-9863-47b719aa1fe4",
- "parentId": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "updatedAt": "2017-10-16T15:39:06,342",
- "userIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643c11"
]
}
Returns an array with information summary regarding each of a user's top level device groups. The response is paginated and sorted by the group creation date.
userId | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Return only the top level groups for the provided userId (that are visible using the provided token) |
limit | string^\d+$ Default: "100" Example: limit=10 pagination limit - max number of entities to return |
offset | string^\d+$ Default: "0" Example: offset=20 pagination offset |
{- "total": 100,
- "data": [
- {
- "createdAt": "2017-10-16T15:39:06,342",
- "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "numberOfDirectDevices": 0,
- "numberOfDirectSubgroups": 0,
- "numberOfDirectUsers": 0,
- "orgId": "ab952b4a-5b3d-4ff9-8431-796c77643c11",
- "parentId": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "updatedAt": "2017-10-16T15:39:06,342"
}
]
}
Searches for device groups matching one OR several parameters specified in the query. If no parameter is specified, all the device groups you have access to are returned.
limit | integer [ 1 .. 1000 ] Default: 10 Pagination limit - maximum number of entities to return |
offset | integer [ 0 .. 10000 ] Default: 0 Pagination offset. |
locationbox | boolean Default: false If |
Search query.
Array of objects Each element is a separate set of filters (with AND operation between them). All elements are translated into one query with OR operator between them, for example for two elements in the array it can be (groupName = "foo" AND city = "berlin") OR (groupName = "bar" AND city = "katowice") | |
Array of objects Sorting definition |
{- "or": [
- {
- "address": "foo*",
- "city": "foo*",
- "country": "foo*",
- "externalId": "SN001*",
- "groupId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "groupName": "foo*",
- "locationBox": {
- "bottom": 52.3303,
- "left": 13.0535,
- "right": 13.7262,
- "top": 52.6675
}, - "mapBoxFeature": "address.4356035406756260",
- "metadata": {
- "color": "{\"r\":100, \"g\": 12, \"b\": 254}",
- "foo": "*bar*",
- "houseNumber": 1
}, - "modelName": "foo*",
- "parentId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "zipCode": "foo*"
}
], - "sort": [
- {
- "key": "metadata.address",
- "order": "desc"
}
]
}
{- "data": [
- {
- "address": "Bergmannstrasse 102/103",
- "city": "Berlin",
- "country": "Germany",
- "createdAt": "2017-09-18T20:07:27.412Z",
- "externalId": "SN001",
- "groupId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "groupName": "Group 1",
- "location": {
- "lat": 52.457968934171184,
- "lon": 13.148784131866076
}, - "metadata": {
- "color": "{\"r\":100, \"g\": 12, \"b\": 254}",
- "foo": "bar",
- "houseNumber": 1
}, - "metadataLastModified": "2017-09-18T20:07:27.412Z",
- "modelId": "02c9599d-9ee4-011e7-b5ec-c75f7ba9a53d",
- "modelName": "groupModel",
- "orgId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "parentId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "updatedAt": "2017-09-18T20:07:27.412Z",
- "zipCode": "012345"
}
], - "locationBox": {
- "bottom": 52.3303,
- "left": 13.0535,
- "right": 13.7262,
- "top": 52.6675
}, - "next": "/devices/search/basic?limit=1&offset=2",
- "prev": "string",
- "total": 100
}
Searches for device groups matching ALL the parameters specified in the query. If no parameter is specified, all the device groups you have access to are returned. For example: if you specify groupName: foo
and city: berlin
, this endpoint returns you all devices groups that are called foo
and are located in berlin
.
limit | integer [ 1 .. 1000 ] Default: 10 Pagination limit - maximum number of entities to return |
offset | integer [ 0 .. 10000 ] Default: 0 Pagination offset. |
locationbox | boolean Default: false If |
Search query.
address | string Case-insensitive, wildcards (*) accepted. Usually a street and a house number the device group is located at |
city | string Case-insensitive, wildcards (*) accepted. The city the device group is located in |
country | string Case-insensitive, wildcards (*) accepted. The country the device group is located in |
externalId | string Case-insensitive, wildcards (*) accepted. The external identifier of the device group |
groupId | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Case-insensitive, NO wildcards. The ID of the device group |
groupName | string Case-insensitive, wildcards (*) accepted. Name of the device group |
object The coordinates which describe boundaries of the area where the devices are located. | |
mapBoxFeature | string Case-sensitive, NO wildcards. MapBox based representation of the location |
metadata | any A JSON object consisting of metadata. The keys correspond to the metadata keys (e.g. ‘color’, ‘smoothness’). The corresponding value can be a string, number or boolean. Key is case-sensitive. String value is case-insensitive, accepts wildcards (*). |
modelName | string Case-insensitive, wildcards (*) accepted. Name of the device group model |
parentId | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Case-insensitive, NO wildcards. The ID of the device group directly above in the group hierarchy |
zipCode | string Case-insensitive, wildcards (*) accepted. The postal/zip code of the location |
Array of objects Sorting definition |
{- "sort": [
- {
- "key": "metadata.address",
- "order": "desc"
}
]
}
{- "data": [
- {
- "address": "Bergmannstrasse 102/103",
- "city": "Berlin",
- "country": "Germany",
- "createdAt": "2017-09-18T20:07:27.412Z",
- "externalId": "SN001",
- "groupId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "groupName": "Group 1",
- "location": {
- "lat": 52.457968934171184,
- "lon": 13.148784131866076
}, - "metadata": {
- "color": "{\"r\":100, \"g\": 12, \"b\": 254}",
- "foo": "bar",
- "houseNumber": 1
}, - "metadataLastModified": "2017-09-18T20:07:27.412Z",
- "modelId": "02c9599d-9ee4-011e7-b5ec-c75f7ba9a53d",
- "modelName": "groupModel",
- "orgId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "parentId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "updatedAt": "2017-09-18T20:07:27.412Z",
- "zipCode": "012345"
}
], - "locationBox": {
- "bottom": 52.3303,
- "left": 13.0535,
- "right": 13.7262,
- "top": 52.6675
}, - "next": "/devices/search/basic?limit=1&offset=2",
- "prev": "string",
- "total": 100
}
Return all device groups as a tree
{- "data": [
- {
- "groups": [
- {
- "groups": "...",
- "id": "d9be178a-b276-11e7-aa7a-afcc578adb81",
- "name": "mygroup1_l1",
- "parentId": "d9be177a-b276-11e7-aa7a-afcc578adb81"
}, - {
- "groups": "...",
- "id": "d9be178a-b276-11e7-aa7a-afcc578adb81",
- "name": "mygroup2_l1",
- "parentId": "d9be177a-b276-11e7-aa7a-afcc578adb81"
}
], - "id": "d9be177a-b276-11e7-aa7a-afcc578adb81",
- "name": "mygroup1_l0",
- "parentId": null
}
]
}
Returns a list of all the users from the groups and the groups to which they belong. You will only see users and groups you have access to. The response is paginated and sorted by the userId in asc order.
limit | string^\d+$ Default: "100" Example: limit=10 pagination limit - max number of entities to return |
offset | string^\d+$ Default: "0" Example: offset=20 pagination offset |
{- "total": 100,
- "data": [
- {
- "groups": [
- {
- "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "d9be177a-b276-11e7-aa7a-afcc578adb81",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "orgId": "e56d22a0-b276-11e7-9863-47b719aa1fe4"
}
], - "userId": "dc952b4a-5b3d-4ff9-8431-796c77643c11"
}
]
}
Deletes the device group specified in the path. The group must be empty.
groupId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Group ID |
{- "error": {
- "code": "errorDeviceGroupHasChildren",
- "id": "dc952b4a5b3d4ff98431796c77643cc9",
- "message": "Group is parent for one or more other groups."
}
}
DEPRECATED - Can be replaced with GET /device-groups/{id}/info some of the previous information will need to be fetched separately This endpoint will be deleted on 2021-04-19
groupId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Group ID |
{- "createdAt": "2017-10-16T15:39:06,342",
- "deviceIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
], - "externalId": "abcdefgh1@mwec23452#@$12",
- "groups": [
- {
- "createdAt": "2017-10-16T15:39:06,342",
- "deviceIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
], - "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "d9be177a-b276-11e7-aa7a-afcc578adb81",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "orgId": "e56d22a0-b276-11e7-9863-47b719aa1fe4",
- "parentId": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "updatedAt": "2017-10-16T15:39:06,342",
- "userIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643c11"
]
}
], - "id": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "numberOfDirectDevices": 0,
- "numberOfDirectSubgroups": 0,
- "numberOfDirectUsers": 0,
- "orgId": "ab952b4a-5b3d-4ff9-8431-796c77643c11",
- "parentId": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "updatedAt": "2017-10-16T15:39:06,342",
- "userIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643c11"
]
}
Updates the information of the device group specified in the path
groupId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Group ID |
externalId | string <= 64 characters Nullable A customer-provided identifier for the device. This allows the customer to assign a meaningful ID, such as a serial number, to the device. The External ID must be unique within the organization. |
modelId | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... ID of the device group model |
name | string [ 1 .. 64 ] characters ^(?!\s*$).+ Name of the group |
{- "externalId": "abcdefgh1@mwec23452#@$12",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "name": "my_group"
}
{- "createdAt": "2017-10-16T15:39:06,342",
- "deviceIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
], - "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "d9be177a-b276-11e7-aa7a-afcc578adb81",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "orgId": "e56d22a0-b276-11e7-9863-47b719aa1fe4",
- "parentId": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "updatedAt": "2017-10-16T15:39:06,342",
- "userIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643c11"
]
}
Returns the ancestors of the device group specified in the path
groupId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Group ID |
includeRequestedGroup | string Enum: "true" "false" If set to "true", response will include requested group in the ancestry response. For any other value or when no value is provided, only ancestors will be returned. |
{- "data": [
- {
- "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "ef952b4a-5b3d-4ff9-8431-796c77643cc9",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "numberOfDirectDevices": 0,
- "numberOfDirectSubgroups": 0,
- "numberOfDirectUsers": 0,
- "orgId": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "parentId": "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
}
]
}
Deletes the devices specified in the query from the device group specified in the path. The list must contain only direct child devices of the group.
groupId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Group ID |
IDs of the deviceIds to remove from the group
Id of device
[- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
]
{- "createdAt": "2017-10-16T15:39:06,342",
- "deviceIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
], - "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "d9be177a-b276-11e7-aa7a-afcc578adb81",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "orgId": "e56d22a0-b276-11e7-9863-47b719aa1fe4",
- "parentId": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "updatedAt": "2017-10-16T15:39:06,342",
- "userIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643c11"
]
}
Returns a list of direct devices in the group. The response is paginated and sorted by device creation date.
groupId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Group ID |
limit | string^\d+$ Default: "100" Example: limit=10 pagination limit - max number of entities to return |
offset | string^\d+$ Default: "0" Example: offset=20 pagination offset |
{- "total": 100,
- "data": [
- {
- "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "name": "DeviceName"
}
]
}
Adds the devices specified in the query to the device group specified in the path
groupId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Group ID |
IDs of the devices to add to the group
Id of device
[- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
]
{- "createdAt": "2017-10-16T15:39:06,342",
- "deviceIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
], - "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "d9be177a-b276-11e7-aa7a-afcc578adb81",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "orgId": "e56d22a0-b276-11e7-9863-47b719aa1fe4",
- "parentId": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "updatedAt": "2017-10-16T15:39:06,342",
- "userIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643c11"
]
}
Updates the devices belonging to the device group specified in the path to the devices specified in the query
groupId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Group ID |
Id of device
[- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
]
{- "createdAt": "2017-10-16T15:39:06,342",
- "deviceIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
], - "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "d9be177a-b276-11e7-aa7a-afcc578adb81",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "orgId": "e56d22a0-b276-11e7-9863-47b719aa1fe4",
- "parentId": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "updatedAt": "2017-10-16T15:39:06,342",
- "userIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643c11"
]
}
DEPRECATED - Can be replaced with GET /device-groups/{id}/info some of the previous information will need to be fetched separately This endpoint will be deleted on 2021-04-19
groupId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Group ID |
{- "createdAt": "2017-10-16T15:39:06,342",
- "deviceIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
], - "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "d9be177a-b276-11e7-aa7a-afcc578adb81",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "orgId": "e56d22a0-b276-11e7-9863-47b719aa1fe4",
- "parentId": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "updatedAt": "2017-10-16T15:39:06,342",
- "userIds": [
- "dc952b4a-5b3d-4ff9-8431-796c77643c11"
]
}
Returns the information regarding the requested device group
groupId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Group ID |
{- "createdAt": "2017-10-16T15:39:06,342",
- "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "numberOfDirectDevices": 0,
- "numberOfDirectSubgroups": 0,
- "numberOfDirectUsers": 0,
- "orgId": "ab952b4a-5b3d-4ff9-8431-796c77643c11",
- "parentId": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "updatedAt": "2017-10-16T15:39:06,342"
}
Returns a list of all the directly associated groups of a group. The response is paginated and sorted by the group creation date.
groupId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Group ID |
limit | string^\d+$ Default: "100" Example: limit=10 pagination limit - max number of entities to return |
offset | string^\d+$ Default: "0" Example: offset=20 pagination offset |
{- "total": 100,
- "data": [
- {
- "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "dc952b4a-5b3d-4ff9-8431-796c77643cc9",
- "name": "mygroup",
- "numberOfDirectDevices": 0,
- "numberOfDirectSubgroups": 0,
- "numberOfDirectUsers": 0
}
]
}
Returns the users belonging to the device group specified in the path. The response is paginated and sorted by userId.
groupId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Group ID |
indirect | string Enum: "true" "false" If true include all children groups in response |
limit | string^\d+$ Default: "100" Example: limit=10 pagination limit - max number of entities to return |
offset | string^\d+$ Default: "0" Example: offset=20 pagination offset |
{- "total": 100,
- "data": [
- "dc952b4a-5b3d-4ff9-8431-796c77643c11"
]
}
Device group models are entities you can use in the relayr Cloud to label device groups for purposes specific to your use case. The endpoints presented in this section let you create and manage device group models.
Get all the device group models in your organization. The response is paginated. You can set custom offset
(default 0) and limit
(default 100) parameters for the pagination.
limit | string^\d+$ Default: "100" Example: limit=10 pagination limit - max number of entities to return |
offset | string^\d+$ Default: "0" Example: offset=20 pagination offset |
{- "total": 100,
- "data": [
- {
- "id": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "name": "my_group_model",
- "orgId": "ab952b4a-5b3d-4ff9-8431-796c77643c11"
}
]
}
Creates a device group model in your organization
name required | string [ 1 .. 64 ] characters ^(?!\s*$).+ Name of the device group model |
{- "name": "my_group_model"
}
{- "id": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "name": "my_group_model",
- "orgId": "ab952b4a-5b3d-4ff9-8431-796c77643c11"
}
Deletes the device group model specified in the path. The model must not be in use by any group.
id required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: d9be177a-b276-11e7-aa7a-afcc578adb22 Device Group Model Id |
{- "error": {
- "details": "Entity doesn't exist or you don't have permissions to access it.",
- "id": "dc952b4a5b3d4ff98431796c77643cc9",
- "message": "Entity NOT found"
}
}
Returns the information of the device group model specified in the path
id required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: d9be177a-b276-11e7-aa7a-afcc578adb22 Device Group Model Id |
{- "id": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "name": "my_group_model",
- "orgId": "ab952b4a-5b3d-4ff9-8431-796c77643c11"
}
Updates the information of the device group model specified in the path
id required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: d9be177a-b276-11e7-aa7a-afcc578adb22 Device Group Model Id |
name required | string [ 1 .. 64 ] characters ^(?!\s*$).+ Name of the device group model |
{- "name": "my_group_model"
}
{- "error": {
- "details": "Entity doesn't exist or you don't have permissions to access it.",
- "id": "dc952b4a5b3d4ff98431796c77643cc9",
- "message": "Entity NOT found"
}
}
Files models are entities you must create in the Cloud in order to use the software installation endpoints (go to Additional Services > Software Installation - Device in the left navigation panel for more information on installation tasks). They represent the software or software updates you want to install on your virtual or physical pieces of equipment.
A file model has a name and a description, while the actual information about the files you want installed on your virtual or physical pieces of equipment is defined in a version of a file model. File models can have several versions which can be enabled or disabled. Only enabled file model versions can be used for installations.
The endpoints presented in this section let you create and manage file models.
Returns all file models to which you have access
{- "data": [
- {
- "createdAt": "2017-08-21T09:42:28.964Z",
- "description": "This is an operating system update",
- "id": "693a79e8-43e0-11e8-842f-0ed5f89f718b",
- "name": "OS Updates",
- "type": "firmwarepackage",
- "updatedAt": "2017-08-21T09:42:28.964Z",
- "versionNumbers": [
- 1
]
}
]
}
Creates a file model in your organization
name required | string^.{1,64}$ Name of the File Model |
description | string^.{1,256}$ Description of the File Model |
type | string^.{1,64}$ |
{- "description": "Description of File Model X",
- "name": "File Model X",
- "type": "firmwarepackage"
}
{- "createdAt": "2017-08-21T09:42:28.964Z",
- "description": "This is an operating system update",
- "id": "693a79e8-43e0-11e8-842f-0ed5f89f718b",
- "name": "OS Updates",
- "type": "firmwarepackage",
- "updatedAt": "2017-08-21T09:42:28.964Z",
- "versionNumbers": [
- 1
]
}
Deletes the file model specified in the path
fileModelID required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 000078b3-261e-4025-9d81-b8631d8d0000 File Model ID (UUID) |
{- "error": {
- "id": "1234",
- "message": "An error occured!"
}
}
Returns the file model specified in the path
fileModelID required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 000078b3-261e-4025-9d81-b8631d8d0000 File Model ID (UUID) |
{- "createdAt": "2017-08-21T09:42:28.964Z",
- "description": "This is an operating system update",
- "id": "693a79e8-43e0-11e8-842f-0ed5f89f718b",
- "name": "OS Updates",
- "type": "firmwarepackage",
- "updatedAt": "2017-08-21T09:42:28.964Z",
- "versionNumbers": [
- 1
]
}
Updates the file model specified in the path
fileModelID required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 000078b3-261e-4025-9d81-b8631d8d0000 File Model ID (UUID) |
description | string^.{1,256}$ Description of the File Model |
name | string^.{1,64}$ Name of the File Model |
{- "description": "File Model description",
- "name": "File Model name"
}
{- "createdAt": "2017-08-21T09:42:28.964Z",
- "description": "This is an operating system update",
- "id": "693a79e8-43e0-11e8-842f-0ed5f89f718b",
- "name": "OS Updates",
- "type": "firmwarepackage",
- "updatedAt": "2017-08-21T09:42:28.964Z",
- "versionNumbers": [
- 1
]
}
Returns all versions of the file model specified in the path
fileModelID required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 000078b3-261e-4025-9d81-b8631d8d0000 File Model ID (UUID) |
{- "data": [
- {
- "buildStamp": "Build stamp",
- "createdAt": "2017-08-21T09:42:28.964Z",
- "default": true,
- "description": "This update contains stability and performance improvements",
- "enabled": true,
- "fileName": "gwa-core.tgz",
- "signature": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
- "signatureType": "sha-256",
- "size": 1048576,
- "updatedAt": "2017-08-21T09:42:28.964Z",
- "versionNumber": 1
}
]
}
Creates a version for the file model specified in the path
fileModelID required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 000078b3-261e-4025-9d81-b8631d8d0000 File Model ID (UUID) |
location required | string |
buildStamp | string^.{1,64}$ |
default | boolean Default: false Can be |
description | string^.{1,256}$ |
enabled | boolean Default: true |
fileName | string^.{1,256}$ Destination file name |
signature | string |
signatureType | string^.{1,64}$ |
size | number File size in bytes |
{- "buildStamp": "Build stamp",
- "default": false,
- "description": "File version description",
- "enabled": true,
- "fileName": "gwa-core.tgz",
- "signature": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
- "signatureType": "sha-256",
- "size": 1048576
}
{- "buildStamp": "Build stamp",
- "createdAt": "2017-08-21T09:42:28.964Z",
- "default": true,
- "description": "This update contains stability and performance improvements",
- "enabled": true,
- "fileName": "gwa-core.tgz",
- "signature": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
- "signatureType": "sha-256",
- "size": 1048576,
- "updatedAt": "2017-08-21T09:42:28.964Z",
- "versionNumber": 1
}
Returns the model version specified in the path for the file model specified in the path
fileModelID required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 000078b3-261e-4025-9d81-b8631d8d0000 File Model ID (UUID) |
fileModelVersionNumber required | integer >= 1 Example: 5 File Model version number |
{- "buildStamp": "Build stamp",
- "createdAt": "2017-08-21T09:42:28.964Z",
- "default": true,
- "description": "This update contains stability and performance improvements",
- "enabled": true,
- "fileName": "gwa-core.tgz",
- "signature": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
- "signatureType": "sha-256",
- "size": 1048576,
- "updatedAt": "2017-08-21T09:42:28.964Z",
- "versionNumber": 1
}
Updates the model version specified in the path for the file model specified in the path
fileModelID required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 000078b3-261e-4025-9d81-b8631d8d0000 File Model ID (UUID) |
fileModelVersionNumber required | integer >= 1 Example: 5 File Model version number |
default | boolean Default: false Can be |
description | string^.{1,256}$ Description of the File Model Version |
enabled | boolean |
{- "default": false,
- "description": "File Model Version description",
- "enabled": true
}
{- "buildStamp": "Build stamp",
- "createdAt": "2017-08-21T09:42:28.964Z",
- "default": true,
- "description": "This update contains stability and performance improvements",
- "enabled": true,
- "fileName": "gwa-core.tgz",
- "signature": "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
- "signatureType": "sha-256",
- "size": 1048576,
- "updatedAt": "2017-08-21T09:42:28.964Z",
- "versionNumber": 1
}
Roles are entities allowing you to manage what users are allowed to do in the Cloud. You must create a role and assign it permissions before you can create a user.
The endpoints presented in this section let you create and manage roles and permissions.
Returns all roles to which you have access
{- "data": [
- {
- "createdAt": "2019-08-24T14:15:22Z",
- "description": "Role for maintenance crew",
- "id": "fbeea54c-b91c-4a33-989d-2d072bb59234",
- "name": "MyRole",
- "permissions": [
- "device.read"
], - "updatedAt": "2019-08-24T14:15:22Z"
}
]
}
Creates a role in your organization
The information of the role to create. All fields except 'name' are optional.
name required | string [ 1 .. 64 ] characters ^[^\f\n\r\t]{0,63}\S Name of the role |
description | string <= 256 characters ^[^\f\n\r\t]* Description of the role |
permissions | Array of strings non-empty List of permissions that this role should encompass |
{- "description": "Role for maintenance crew",
- "name": "MyRole",
- "permissions": [
- "device.read"
]
}
{- "createdAt": "2019-08-24T14:15:22Z",
- "description": "Role for maintenance crew",
- "id": "fbeea54c-b91c-4a33-989d-2d072bb59234",
- "name": "MyRole",
- "permissions": [
- "device.read"
], - "updatedAt": "2019-08-24T14:15:22Z"
}
Deletes the role specified in the path. The role must have no user associated to it.
roleId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: ecbbb77d-b91c-4a33-989d-2d072bb59b68 Role ID |
{- "error": {
- "details": "Additional details about the error - if applicable",
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Returns the role specified in the path
roleId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: ecbbb77d-b91c-4a33-989d-2d072bb59b68 Role ID |
{- "createdAt": "2019-08-24T14:15:22Z",
- "description": "Role for maintenance crew",
- "id": "fbeea54c-b91c-4a33-989d-2d072bb59234",
- "name": "MyRole",
- "permissions": [
- "device.read"
], - "updatedAt": "2019-08-24T14:15:22Z"
}
Updates the role specified in the path. If permissions are specified then they will replace the set of permissions that are currently linked to the given role. You must have access to all users linked to this role.
roleId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: ecbbb77d-b91c-4a33-989d-2d072bb59b68 Role ID |
description | string <= 256 characters ^[^\f\n\r\t]* Description of the role |
name | string [ 1 .. 64 ] characters ^[^\f\n\r\t]{0,63}\S Name of the role |
permissions | Array of strings non-empty List of permissions that this role should encompass |
{- "description": "Role for maintenance crew",
- "name": "MyNewRoleName",
- "permissions": [
- "device.read"
]
}
{- "createdAt": "2019-08-24T14:15:22Z",
- "description": "Role for maintenance crew",
- "id": "fbeea54c-b91c-4a33-989d-2d072bb59234",
- "name": "MyRole",
- "permissions": [
- "device.read"
], - "updatedAt": "2019-08-24T14:15:22Z"
}
Returns the users associated to the role specified in the path
roleId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: ecbbb77d-b91c-4a33-989d-2d072bb59b68 Role ID |
{- "data": [
- "89be341e-c41b-4456-8558-0e354e1d4924"
]
}
Replaces the current users of the role specified in the path with the users specified in the query.
roleId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: ecbbb77d-b91c-4a33-989d-2d072bb59b68 Role ID |
IDs of users that should have the given role
[- "89be341e-c41b-4456-8558-0e354e1d4924"
]
{- "error": {
- "details": "Additional details about the error - if applicable",
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Users are entities representing people in the relayr Cloud. You can create them to allow groups of people to access entities and services in your organization. Before creating a user, you must create a role and tie it to permissions.
The endpoints presented in this section let you create and manage users.
Creates a user with the information provided in the request body in the Cloud. In this endpoint you must provide a password for the user. To create a user without specifying a password for them, use POST /users/invite
.
userName required | string <email> ^[a-zA-Z0-9!#$%&'*+/=?^_‘{|}~-]+(?:\.[a-zA-Z0... Unique username in form of user email |
password required | string Password has to be at least 8 characters long and contain at least one uppercase, one lowercase letter and a number |
deviceGroupId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... User outside device group can not have access to any of the devices in the system, hence has to be added to an existing device group. |
roleId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... User outside role can't have any permissions in the system, hence has to be added to an existing role. |
familyName | string |
givenName | string |
phoneNumber | string |
{- "deviceGroupId": "d413c853-4b66-405b-8363-ab0d9f86f354",
- "familyName": "Test",
- "givenName": "User",
- "password": "Such5ecret",
- "phoneNumber": "555-555-555",
- "roleId": "d413c853-4b66-405b-8363-ab0d9f86f354",
- "userName": "user@test.org"
}
{- "familyName": "User",
- "givenName": "Test",
- "userEmail": "user@test.org",
- "userId": "d413c853-4b66-405b-8363-ab0d9f86f354",
- "userName": "user@test.org"
}
Checks if the user specified in the organizations to which you have access.
username required | string^[a-zA-Z0-9.!'+_-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-... |
active | string^(true|false)$ |
systemwide | string^(true|false)$ |
{- "exists": true
}
Sends an email invitation to the Cloud to the user specified in the request body. This endpoint allows you to create users in the Cloud without providing a password for them. If you want to provide a password for the user, use POST /users
.
clientId required | string |
redirectUri required | string <uri> |
required | Array of objects non-empty |
lang | string optional, must be ISO 639-1 (Alpha-2 code) |
{- "clientId": "login-service-client",
- "lang": "de",
- "users": [
- {
- "deviceGroupIds": [
- "d413c853-4b66-405b-8363-ab0d9f86f354"
], - "roleIds": [
- "d413c853-4b66-405b-8363-ab0d9f86f354"
], - "userEmail": "user@test.org"
}
]
}
[- {
- "details": "user has been invited successfully",
- "success": true,
- "userId": "d413c853-4b66-405b-8363-ab0d9f86f354",
- "userName": "user@test.org"
}
]
Searches for users matching ALL the parameters specified in the query. If no parameter is specified, all the users you have access to are returned.
limit | string [ 1 .. 50 ] ^\d+$ |
offset | string >= 0 ^\d+$ |
active | boolean boolean filter to check if user is active |
deviceGroupName | string case-insensitive, wildcards (*) accepted |
excludeRoles | Array of strings Exclude users which have any of these role names. Case-insensitive. |
familyName | string case-insensitive, wildcards (*) accepted |
givenName | string case-insensitive, wildcards (*) accepted |
phoneNumber | string case-insensitive, wildcards (*) accepted |
roleName | string case-insensitive, wildcards (*) accepted |
Array of objects | |
userIds | Array of strings <uuid> |
userName | string case-insensitive, wildcards (*) accepted |
{- "active": true,
- "deviceGroupName": "device_demo",
- "excludeRoles": [
- "Admins"
], - "familyName": "Test",
- "givenName": "User",
- "phoneNumber": "555-555-555",
- "roleName": "Admin",
- "sort": [
- {
- "key": "familyName",
- "order": "desc"
}
], - "userIds": [
- "d3ad7133-9460-4e81-acd5-0ae3444b148a"
], - "userName": "user@test.org"
}
{- "data": [
- {
- "active": true,
- "deviceGroups": [
- {
- "id": "3d4ed776-6d16-4972-b773-7666b35c36eb",
- "name": "Admin Device Group"
}
], - "familyName": "User",
- "givenName": "Test",
- "phoneNumber": "555-555-555",
- "roles": [
- {
- "id": "fdcab4ca-4fcb-45e4-b397-0765d42fec53",
- "name": "Admin role",
- "permissions": [
- "device.read"
]
}
], - "userId": "d3ad7133-9460-4e81-acd5-0ae3444b148a",
- "userName": "user@test.org"
}
], - "total": 100
}
Deletes the user specified in the path from the roles and device groups to which they belong. The user is deleted permanently if they do not belong to any other organization.
id required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f User ID |
{- "error": {
- "code": "string",
- "details": "string",
- "id": "d413c853-4b66-405b-8363-ab0d9f86f354",
- "message": "string"
}
}
Returns the information of the user specified in the path
id required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f User ID |
{- "familyName": "User",
- "givenName": "Test",
- "userEmail": "user@test.org",
- "userId": "d413c853-4b66-405b-8363-ab0d9f86f354",
- "userName": "user@test.org"
}
Updates the information of the user specified in the path
id required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f User ID |
familyName | string |
givenName | string |
phoneNumber | string |
{- "familyName": "Test",
- "givenName": "User",
- "phoneNumber": "555-555-555"
}
{- "familyName": "User",
- "givenName": "Test",
- "userEmail": "user@test.org",
- "userId": "d413c853-4b66-405b-8363-ab0d9f86f354",
- "userName": "user@test.org"
}
Updates the user name of the user specified in the path
id required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f User ID |
userName | string <email> ^[a-zA-Z0-9!#$%&'*+/=?^_‘{|}~-]+(?:\.[a-zA-Z0... Unique username (user email) |
{- "userName": "user@test.org"
}
{- "familyName": "User",
- "givenName": "Test",
- "userEmail": "user@test.org",
- "userId": "d413c853-4b66-405b-8363-ab0d9f86f354",
- "userName": "user@test.org"
}
Deletes the user specified in the path from the device groups specified in the query
userId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... User ID |
Id of device group
[- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
]
{- "error": {
- "details": "Entity doesn't exist or you don't have permissions to access it.",
- "id": "dc952b4a5b3d4ff98431796c77643cc9",
- "message": "Entity NOT found"
}
}
Returns the device groups to which the user specified in the path belongs
userId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... User ID |
indirect | string Enum: "true" "false" If true include all children groups in response |
{- "data": [
- {
- "externalId": "abcdefgh1@mwec23452#@$12",
- "id": "d9be177a-b276-11e7-aa7a-afcc578adb81",
- "modelId": "d9be177a-b276-11e7-aa7a-afcc578adb22",
- "modelName": "my_group_model",
- "name": "mygroup",
- "orgId": "e56d22a0-b276-11e7-9863-47b719aa1fe4"
}
]
}
Updates the device groups to which the user specified in the path belongs to. A user can only be associated to a maximum of 15 device groups.
userId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... User ID |
Id of device group
[- "dc952b4a-5b3d-4ff9-8431-796c77643cc9"
]
{- "error": {
- "details": "Entity doesn't exist or you don't have permissions to access it.",
- "id": "dc952b4a5b3d4ff98431796c77643cc9",
- "message": "Entity NOT found"
}
}
Returns the roles associated to the user specified in the path
userId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: be291904-610e-407c-80aa-48da1b0e9904 Id of the user |
{- "data": [
- "fbeea54c-b91c-4a33-989d-2d072bb59234"
]
}
Updates the roles of the user specified in the path. You must have access to the user and to the roles you want to assign to the user.
userId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: be291904-610e-407c-80aa-48da1b0e9904 Id of the user |
IDs of roles that the given user should have
Id of the role
[- "fbeea54c-b91c-4a33-989d-2d072bb59234"
]
{- "error": {
- "details": "Additional details about the error - if applicable",
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Permissions are entities you must link to roles in the Cloud. They define the actions a user can perform and the entities they can access. The endpoint presented in this section lets you retrieve the permissions available in the Cloud.
user.read | View user data |
user.write | Manage user data |
audit_log.read | View audit logs |
device.read | View device information |
device.write | Manage device information |
device_model.read | View device model information |
device_model.write | Manage device model information |
device_log.read | View device logs |
file_model.read | View file model information |
file_model.write | Manage file model information |
device_group.read | View device group information |
device_group.write | Manage device group information |
location.read | View location information |
location.write | Manage location information |
annotation.read | View annotation information |
annotation.write | Manage annotation information |
rule.read | View rules |
rule.write | Manage rules |
mqtt_credentials.read | View MQTT credentials |
mqtt_credentials.write | Manage MQTT credentials |
live_data.read | View live data through different services |
live_data.write | Send live data to the cloud |
past_data.read | View past data through different services |
analytics.read | View analytics results e.g. anomalies etc. |
analytics.write | Send analytics data to the cloud |
analytics_config.read | View configurations for the analytics system |
analytics_config.write | Manage configurations for the analytics system |
dashboard_config.read | View dashboard configurations |
dashboard_config.write | Manage dashboard configurations |
organization.read | View organization metadata |
organization.write | Manage organization metadata |
subscription.read | View subscriptions |
subscription.write | Manage subscriptions |
installation.read | View installations |
installation.write | Manage installations |
role.read | View user roles |
role.write | Manage user roles |
user_role.read | View roles of users |
user_role.write | Manage roles of users |
device_config.read | View device configurations |
device_config.write | Manage device configurations |
Returns all permissions available in your organization
{- "data": [
- "device_log.read,",
- "location.read,",
- "annotation.write,",
- "device.write,",
- "subscription.read,",
- "device_model.write,",
- "analytics_config.write,",
- "location.write,",
- "rule.write,",
- "device_model.read,",
- "user_role.write,",
- "device_config.read,",
- "user.read,",
- "live_data.read,",
- "rule.read,",
- "organization.read,",
- "past_data.read,",
- "device_group.read,",
- "file_model.write,",
- "live_data.write,",
- "dashboard_config.read,",
- "analytics.write,",
- "installation.read,",
- "annotation.read,",
- "subscription.write,",
- "mqtt_credentials.write,",
- "installation.write,",
- "analytics.read,",
- "mqtt_credentials.read,",
- "role.read,",
- "user_role.read,",
- "dashboard_config.write,",
- "organization.write,",
- "role.write,",
- "device.read,",
- "file_model.read,",
- "analytics_config.read,",
- "device_config.write,",
- "device_group.write,",
- "user.write,",
- "audit_log.read"
]
}
The endpoint presented in this section lets you aggregate the number of alerts sent by the devices of a same model over a period of time. The alerts can be filtered by severity.
Returns monthly buckets of aggregated alerts for the devices associated with the device model and the timeframe specified in the query
deviceModelId required | string <uuid> Example: deviceModelId=d53b4877-2c93-4126-a0f8-e4644f1867fc Only alerts from devices with this model will enter into the aggregation. |
start required | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: start=2018-06-01 Start date of the alert aggregation period |
stop | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: stop=2018-11-01 End date of the alert aggregation period (default current date) |
severities | integer [ 0 .. 7 ] Example: severities=2 One or more alert severities separated by commas. If the filter is set, alerts with severities different than given will be filtered out. |
{- "data": [
- {
- "alerts": [
- {
- "averageDurationSec": 20,
- "bucket": "2017-08-01T00:00:00.000Z",
- "count": 100,
- "displayName": "Temperature is too high",
- "distinctDevices": 33,
- "name": "temperatureTooHigh",
- "severity": 4
}, - {
- "averageDurationSec": 10,
- "bucket": "2017-08-01T00:00:00.000Z",
- "count": 100,
- "displayName": "Temperature is too low",
- "distinctDevices": 23,
- "name": "temperatureTooLow",
- "severity": 3
}, - {
- "averageDurationSec": 100,
- "bucket": "2017-08-01T00:00:00.000Z",
- "count": 100,
- "displayName": "Humidity is too high",
- "distinctDevices": 13,
- "name": "humidityTooHigh",
- "severity": 2
}
], - "start": "2017-08-01T00:00:00.000Z",
- "totalAlerts": 300,
- "totalDevices": 22
}, - {
- "alerts": [
- {
- "averageDurationSec": 20,
- "bucket": "2017-09-01T00:00:00.000Z",
- "count": 100,
- "displayName": "Temperature is too high",
- "distinctDevices": 3,
- "name": "temperatureTooHigh",
- "severity": 4
}, - {
- "averageDurationSec": 10,
- "bucket": "2017-09-01T00:00:00.000Z",
- "count": 30,
- "distinctDevices": 20,
- "name": "humidityTooLow",
- "severity": 2
}, - {
- "averageDurationSec": 100,
- "bucket": "2017-09-01T00:00:00.000Z",
- "count": 70,
- "displayName": "Humidity is too high",
- "distinctDevices": 43,
- "name": "humidityTooHigh",
- "severity": 2
}
], - "start": "2017-09-01T00:00:00.000Z",
- "totalAlerts": 200,
- "totalDevices": 22
}, - {
- "alerts": [
- {
- "averageDurationSec": 20,
- "bucket": "2017-10-01T00:00:00.000Z",
- "count": 50,
- "displayName": "Temperature is too high",
- "distinctDevices": 4,
- "name": "temperatureTooHigh",
- "severity": 4
}, - {
- "averageDurationSec": 10,
- "bucket": "2017-10-01T00:00:00.000Z",
- "count": 20,
- "distinctDevices": 41,
- "name": "humidityTooLow",
- "severity": 2
}, - {
- "averageDurationSec": 100,
- "bucket": "2017-10-01T00:00:00.000Z",
- "count": 30,
- "displayName": "Humidity is too high",
- "distinctDevices": 24,
- "name": "humidityTooHigh",
- "severity": 2
}
], - "start": "2017-10-01T00:00:00.000Z",
- "totalAlerts": 100,
- "totalDevices": 22
}
]
}
In the relayr Cloud, alerts sent by devices can have a severity ranging from
0
to 7
. The severity of an alert is chosen when creating the device model
version of a device. For more information on device model versions, go to
Entities > Device Models in the left navigation panel.
The endpoint presented in this section returns the current alert severities mapping of the Cloud.
Returns the current alert severities mapping, i.e. the severity level (High
, Medium
or Low
) to which the alert severities (0-7
) are mapped.
{- "data": {
- "0": "High",
- "1": "High",
- "2": "High",
- "3": "Medium",
- "4": "Medium",
- "5": "Medium",
- "6": "Low",
- "7": "Low"
}
}
The endpoints presented in this section allow you to retrieve the last alerts sent by the devices to which you have access.
Returns the last alerts sent by the devices specified in the query. If no device is specified, the endpoint returns the last alerts sent by all the devices to which you have access. The name
and state
parameter allow you to filter for a single specific alert.
deviceIds required | Array of strings Example: deviceIds=7005afde-a298-11e7-be32-7bea3ce9040b,a25eabd4-a298-11e7-b907-a724a28f0dfd |
name | string Example: name=overheating |
state | string Enum: "set" "clear" Example: state=clear |
{- "data": [
- {
- "alerts": [
- {
- "deviceId": "1acc6cfd-2a4b-4f63-aac1-bab44ff1f6cc",
- "displayName": "Overheating",
- "message": "Device is overheating",
- "name": "overheating",
- "received": "2019-08-24T14:15:22Z",
- "recorded": "2019-08-24T14:15:22Z",
- "severity": 2,
- "state": "set"
}
], - "deviceId": "1acc6cfd-2a4b-4f63-aac1-bab44ff1f6cc"
}
]
}
Returns the last alerts sent by the device specified in the path. The name
and state
parameter allow you to filter for a single specific alert.
deviceId required | string <uuid> Example: 1acc6cfd-2a4b-4f63-aac1-bab44ff1f6cc Id of the device |
name | string Example: name=overheating |
state | string Enum: "set" "clear" Example: state=clear |
{- "alerts": [
- {
- "deviceId": "1acc6cfd-2a4b-4f63-aac1-bab44ff1f6cc",
- "displayName": "Overheating",
- "message": "Device is overheating",
- "name": "overheating",
- "received": "2019-08-24T14:15:22Z",
- "recorded": "2019-08-24T14:15:22Z",
- "severity": 2,
- "state": "set"
}
]
}
The relayr Cloud provides endpoints allowing you to export the alerts sent by the devices you have access to over a period of time.
The endpoints presented in this section allow you to export alerts in a csv
format and to send the export by email to specific recipients.
Exports the alerts sent by the devices specified in the query into a CSV file. The file is uploaded to the Azure Blob Storage and a notification email with the download URL is sent to the email address specified in the query. The download URL is valid for several days. The returned export ID can be used to retrieve the status of the export.
Sets the alert entity filter and an email address for the notification email.
email required | string <email> The address for the notification email that will be sent after the export finished. |
alertNames | Array of strings Limits export to alerts with one of these names. |
deviceIds | Array of strings <uuid> The alerts associated to devices with matching ids will be returned. Defaults to ids of the devices which are in the requesting user's device groups. |
isSet | boolean If set and true only those alert entities that are set but not cleared will be returned. If set and false only those entities that are set and cleared will be returned. If not set, all entities regardless of status are returned. |
recordedFrom | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Limits export to alerts recorded from this timestamp on. Default is the current time. Needs to be a valid ISO-8601 datetime. |
recordedTo | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Limits export to alerts recorded until this timestamp. If not set, all alerts newer than |
object The severities of alerts. |
{- "alertNames": [
- "safetyStop",
- "safetyArmUp"
], - "deviceIds": [
- "cea19e58-a633-4963-b29c-31a990587a5f",
- "90bdb4d5-61f5-4378-98cd-0dbb34acf1d3"
], - "email": "user22@example.com",
- "isSet": false,
- "recordedFrom": "2018-05-09T07:57:18.729Z",
- "severities": {
- "values": [
- 2,
- 3,
- 7
]
}
}
{- "id": "5e6a7860-3f21-11e8-b467-0ed5f89f718b",
- "status": "done",
}
Deletes the information of the alert export specified in the path. The export is canceled if it is still pending.
exportId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 2b6d3a86-e1f8-4e91-833b-0a8357b01e17 The id of the alert export to retrieve. |
{- "error": {
- "details": "Additional details about the error - if applicable",
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Returns the status of the alert export specified in the path
exportId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 2b6d3a86-e1f8-4e91-833b-0a8357b01e17 The id of the alert export to retrieve. |
{- "id": "5e6a7860-3f21-11e8-b467-0ed5f89f718b",
- "status": "done",
}
The relayr Cloud provides an endpoint allowing you to import alerts into devices. This endpoint can be used for testing purposes or to import alert-type events previously gathered on a piece of equipment.
NOTE: This endpoint does not create alerts, you must define the alerts to import in the model of the device before you can import them. Go to Entities > Device Models in the left navigation panel for more information on creating alerts.
Imports the alerts specified in the request body into the device specified in the path. Alert with status set
will be validated against current model version assigned to device. Exception are alerts with status clear
they will not be validated. So it's possible to clear alerts that are not anymore part of device model.
deviceId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f Id of the device to send data (measurement or alert) for. |
name required | string^[-.~a-zA-Z0-9_]+$ The name of the alert as defined in the device model. |
state required | string Enum: "set" "clear" The state of the alert. Can be either 'set' or 'clear'. |
message | string^.{1,256}$ An optional human readable message that describes the alert. |
timestamp | string <date-time> ISO-8601 formatted timestamp |
[- {
- "message": "The device is too hot because of some reason",
- "name": "too_hot",
- "state": "set",
- "timestamp": "2017-06-13T15:19:59.673+02:00"
}, - {
- "message": "All good now",
- "name": "too_hot",
- "state": "clear",
- "timestamp": "2017-06-13T16:19:59.673+02:00"
}, - {
- "name": "highPrecipitation",
- "state": "set"
}
]
{- "data": [
- {
- "message": "The device is too hot because of some reason",
- "name": "too_hot",
- "severity": 1,
- "state": "set",
- "timestamp": "2017-06-13T15:19:59.600+02:00"
}, - {
- "message": "All good now",
- "name": "too_hot",
- "severity": 2,
- "state": "clear",
- "timestamp": "2017-06-13T16:19:59.700+02:00"
}, - {
- "name": "highPrecipitation",
- "severity": 4,
- "state": "set",
- "timestamp": "2017-06-13T16:19:59.973+02:00"
}
]
}
In the relayr Cloud, acknowledging an alert means letting other users know you have seen the alert and are taking care of it.
The endpoints presented in this section let you acknowledge alerts and check if alerts have been acknowledged.
Returns the acknowledgement status of the alert specified in the path
alertId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... The id of the alert to retrieve. |
{- "acknowledgement": {
- "message": "Alert has been acknowledged",
- "timestamp": "2017-08-22T09:42:28.964Z",
- "userId": "e8169b6f-89c7-472a-8374-5dac1307b130"
}, - "clearEntityId": "049f4ed4-b508-11e8-9259-9b2b2264b345",
- "clearEntityType": "user",
- "clearMessage": "Temperature issue has been resolved.",
- "clearTimestamp": "2017-08-24T09:42:28.964Z",
- "deviceId": "1acc6cfd-2a4b-4f63-aac1-bab44ff1f6cc",
- "displayName": "Temperature is too high",
- "durationMs": 10000,
- "id": "51290b07-c337-4834-a2f5-e791aa2d4036",
- "name": "temperatureTooHigh",
- "setEntityId": "f9a89f94-b507-11e8-855e-2bea243ca6dc",
- "setEntityType": "device",
- "setMessage": "The temperature on sensor X is too high. Someone should check this out.",
- "setTimestamp": "2017-08-21T09:42:28.964Z",
- "severity": 2
}
Marks the alert specified in the path as acknowledged. Alerts can be acknowledged only once, meaning once an alert is acknowledged, consecutive calls to this endpoint for the same alert are ignored.
alertId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... The id of the alert to retrieve. |
message | string <= 256 characters Optional message to describe the alert acknowledgement event. |
{- "message": "string"
}
{- "acknowledgement": {
- "message": "Alert has been acknowledged",
- "timestamp": "2017-08-22T09:42:28.964Z",
- "userId": "e8169b6f-89c7-472a-8374-5dac1307b130"
}, - "clearEntityId": "049f4ed4-b508-11e8-9259-9b2b2264b345",
- "clearEntityType": "user",
- "clearMessage": "Temperature issue has been resolved.",
- "clearTimestamp": "2017-08-24T09:42:28.964Z",
- "deviceId": "1acc6cfd-2a4b-4f63-aac1-bab44ff1f6cc",
- "displayName": "Temperature is too high",
- "durationMs": 10000,
- "id": "51290b07-c337-4834-a2f5-e791aa2d4036",
- "name": "temperatureTooHigh",
- "setEntityId": "f9a89f94-b507-11e8-855e-2bea243ca6dc",
- "setEntityType": "device",
- "setMessage": "The temperature on sensor X is too high. Someone should check this out.",
- "setTimestamp": "2017-08-21T09:42:28.964Z",
- "severity": 2
}
The endpoints presented in this section let you search for alerts at device or device group level, according to specific parameters.
Searches for alerts according to the parameters specified in the query. If device groups are specified, all the devices they contain are searched, including the devices belonging to subgroups. If no device or device group is specified, all the devices you have access to are searched.
limit | integer [ 1 .. 1000 ] Pagination limit - maximum number of entities to return |
offset | integer >= 0 Pagination offset |
withusernames | boolean If set and true, user given and family names (or email addresses if names are not set) will be attached in response. |
alerts | Array of strings |
deviceGroupIds | Array of strings <uuid> |
deviceIds | Array of strings <uuid> |
isSet | boolean If set and true only those alert entities that are set but not cleared will be returned. If set and false only those entities that are set and cleared will be returned. If not set, all entities regardless of status are returned. |
setAfter | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... The beginning of the time interval (inclusive) in which the alert was set. Needs to be a valid ISO-8601 datetime string. |
setBefore | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... The end of the time interval (exclusive) in which the alert was set. Needs to be a valid ISO-8601 datetime string. |
object The severities of alerts. | |
start | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... The beginning of the time interval in which the alert is ongoing. An ongoing alert is set before or within the timespan and cleared after or within the timespan. Default is one hour ago. Needs to be a valid ISO-8601 datetime string. string. |
stop | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... The end of the time interval in which the alert is ongoing. An ongoing alert is set before or within the timespan and cleared after or within the timespan. Default is the current time. Needs to be a valid ISO-8601 datetime string. |
{- "alerts": [
- "too_hot"
], - "deviceGroupIds": [
- "43d337fe-a430-4bdc-85b6-7ffddda0fc0d"
], - "deviceIds": [
- "1acc6cfd-2a4b-4f63-aac1-bab44ff1f6cc"
], - "isSet": true,
- "setAfter": "2019-08-24T14:15:22Z",
- "setBefore": "2019-08-24T14:15:22Z",
- "severities": {
- "max": 0,
- "min": 0,
- "values": [
- 2
]
}, - "start": "2019-08-24T14:15:22Z",
- "stop": "2019-08-24T14:15:22Z"
}
{- "total": 100,
- "data": [
- {
- "acknowledgement": {
- "message": "Alert has been acknowledged",
- "timestamp": "2017-08-22T09:42:28.964Z",
- "userId": "e8169b6f-89c7-472a-8374-5dac1307b130",
- "userName": "Mathew Dahali"
}, - "clearEntityId": "049f4ed4-b508-11e8-9259-9b2b2264b345",
- "clearEntityType": "user",
- "clearMessage": "Temperature issue has been resolved.",
- "clearTimestamp": "2017-08-24T09:42:28.964Z",
- "deviceId": "1acc6cfd-2a4b-4f63-aac1-bab44ff1f6cc",
- "displayName": "Temperature is too high",
- "durationMs": 10000,
- "id": "51290b07-c337-4834-a2f5-e791aa2d4036",
- "name": "temperatureTooHigh",
- "setEntityId": "f9a89f94-b507-11e8-855e-2bea243ca6dc",
- "setEntityType": "device",
- "setMessage": "The temperature on sensor X is too high. Someone should check this out.",
- "setTimestamp": "2017-08-21T09:42:28.964Z",
- "severity": 2,
- "clearUserName": "Mathew Dahali",
- "setUserName": "Mathew Dahali"
}
]
}
Returns the alerts sent by the device specified in the path, according to the parameters specified in the query. Alerts are returned in reverse chronological order.
deviceId required | string <uuid> Example: 1acc6cfd-2a4b-4f63-aac1-bab44ff1f6cc The id of the device for which to retrieve the alert history. Needs to be a valid UUID and the user needs to have the necessary permissions for this device. |
start | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... The beginning of the time interval in which the alert is ongoing. An ongoing alert is set before or within the timespan and cleared after or within the timespan. Default is one hour ago. Needs to be a valid ISO-8601 datetime string. string. |
stop | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... The end of the time interval in which the alert is ongoing. An ongoing alert is set before or within the timespan and cleared after or within the timespan. Default is the current time. Needs to be a valid ISO-8601 datetime string. |
alerts | string^[-.~a-zA-Z0-9_]{1,64}$ Example: alerts=too_hot One or more alert names separated by commas. If the filter is set, only alerts with given names will be returned. |
severities | integer [ 0 .. 7 ] Example: severities=2 One or more alert severities separated by commas. If the filter is set, alerts with severities different than given will be filtered out. |
severitymax | integer [ 0 .. 7 ] Example: severitymax=2 Maximum value of alert severity. If set, alerts with severities greater than given will be filtered out. |
severitymin | integer [ 0 .. 7 ] Example: severitymin=2 Minimum value of alert severity. If set, alerts with severities lower than given will be filtered out. |
limit | integer [ 1 .. 1000 ] Pagination limit - maximum number of entities to return |
offset | integer >= 0 Pagination offset |
isset | boolean If set and true only those alert entities that are set but not cleared will be returned. If set and false only those entities that are set and cleared will be returned. If not set, all entities regardless of status are returned. |
withusernames | boolean If set and true, user given and family names (or email addresses if names are not set) will be attached in response. |
setafter | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... The beginning of the time interval (inclusive) in which the alert was set. Needs to be a valid ISO-8601 datetime string. |
setbefore | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... The end of the time interval (exclusive) in which the alert was set. Needs to be a valid ISO-8601 datetime string. |
{- "total": 100,
- "data": [
- {
- "acknowledgement": {
- "message": "Alert has been acknowledged",
- "timestamp": "2017-08-22T09:42:28.964Z",
- "userId": "e8169b6f-89c7-472a-8374-5dac1307b130",
- "userName": "Mathew Dahali"
}, - "clearEntityId": "049f4ed4-b508-11e8-9259-9b2b2264b345",
- "clearEntityType": "user",
- "clearMessage": "Temperature issue has been resolved.",
- "clearTimestamp": "2017-08-24T09:42:28.964Z",
- "deviceId": "1acc6cfd-2a4b-4f63-aac1-bab44ff1f6cc",
- "displayName": "Temperature is too high",
- "durationMs": 10000,
- "id": "51290b07-c337-4834-a2f5-e791aa2d4036",
- "name": "temperatureTooHigh",
- "setEntityId": "f9a89f94-b507-11e8-855e-2bea243ca6dc",
- "setEntityType": "device",
- "setMessage": "The temperature on sensor X is too high. Someone should check this out.",
- "setTimestamp": "2017-08-21T09:42:28.964Z",
- "severity": 2,
- "clearUserName": "Mathew Dahali",
- "setUserName": "Mathew Dahali"
}
]
}
The endpoint presented in this section lets you aggregate the measurement values sent by a device over a period of time.
Returns the measurement values specified in the query for the device specified in the path. This endpoint also lets you choose different intervals of aggregation. There is a limit of 1440 data points that can be returned by this endpoint.
deviceId required | string^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f Device ID |
measurement required | string^(?!\s*$).+ Example: measurement=temperature Measurement to query for |
start required | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: start=2017-06-13T15:19:59.673+02:00 Start date and time of the query (inclusive) |
interval required | string Default: "1m" Enum: "10s" "1m" "5m" "30m" "1h" "6h" "12h" "1d" "2d" "5d" "1w" Example: interval=1m The aggregation interval |
end | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: end=2017-06-13T15:19:59.673+02:00 End date and time of the query (exclusive). If not provided, defaults to current time. |
lastReceived | string^(true|false)$ boolean whether to add timestamp of latest measurment to each bucket |
{- "data": [
- {
- "min": 42,
- "timestamp": "2016-07-01T21:22:00.000Z"
}, - {
- "min": 24,
- "timestamp": "2016-07-01T21:22:01.000Z"
}
], - "meta": {
- "parameters": {
- "deviceId": "cea19e58-a633-4963-b29c-31a990587a5f",
- "end": "2016-07-01T23:00:00.000Z",
- "measurement": "temperature",
- "start": "2016-07-01T21:12:00.000Z"
}
}
}
The endpoints presented in this section allow you to retrieve the last measurements sent by the devices to which you have access.
Returns the last measurements sent by the devices specified in the query. If no device is specified, the endpoint returns the last measurements sent by all the devices to which you have access. The name
parameter allows you to filter for a single specific measurement.
deviceIds required | Array of strings Example: deviceIds=7005afde-a298-11e7-be32-7bea3ce9040b,a25eabd4-a298-11e7-b907-a724a28f0dfd |
name | string Example: name=temperature |
{- "data": [
- {
- "deviceId": "1acc6cfd-2a4b-4f63-aac1-bab44ff1f6cc",
- "measurements": [
- null
]
}
]
}
Returns the last measurements sent by the device specified in the path. The name
parameter allows you to filter for a single specific measurement.
deviceId required | string <uuid> Example: 1acc6cfd-2a4b-4f63-aac1-bab44ff1f6cc Id of the device |
name | string Example: name=temperature |
{- "measurements": [
- null
]
}
The relayr Cloud provides endpoints allowing you to export the measurements sent by the devices you have access to over a period of time.
The endpoints presented
in this section allow you to export measurements in a variety of formats including csv
.
Exports the measurements specified in the request body sent by the devices specified in the request body. Request duration between start - end should respect following limits to avoid 400 BadRequest.
json - 1 day, csv - 1 day, json_chunks - 1 week
deviceIds required | Array of strings non-empty List of devices for which raw measurements will be returned. |
start required | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... The beginning of the time interval from which the raw measurements will be returned. Default is one hour ago. |
end required | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... The end of the time interval from which the raw measurements will be returned. Default is the current time. |
measurements required | Array of strings non-empty Array of measurements |
type | string Enum: "json" "json_chunks" "csv" Type of returned data |
{- "deviceIds": [
- "cea19e58-a633-4963-b29c-31a990587a5f"
], - "end": "2017-06-13T15:19:59.673+02:00",
- "measurements": [
- "temperature"
], - "start": "2017-06-13T15:19:59.673+02:00",
- "type": "json"
}
[- {
- "deviceId": "2b231903-e167-48b6-8038-3964a24c62ec",
- "name": "temperature",
- "timestamp": "2017-06-13T15:19:59.600Z",
- "value": 21.5
}, - {
- "deviceId": "2b231903-e167-48b6-8038-3964a24c62ec",
- "name": "registerOn",
- "timestamp": "2017-06-13T15:19:59.700Z",
- "value": true
}, - {
- "deviceId": "2b231903-e167-48b6-8038-3964a24c62ec",
- "name": "reading",
- "timestamp": "2017-06-13T15:19:59.973Z",
- "value": "someReading"
}
]
Exports the measurements specified in the query sent by the device specified in the path. Request duration between start - end should respect following limits to avoid 400 BadRequest.
json - 1 day, csv - 1 day, json_chunks - 1 week
deviceId required | string^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f Id of the device whose raw measurements will be returned. |
measurements required | Array of strings Example: measurements=temperature One or more measurement names separated by commas |
start | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: start=2017-06-13T15:19:59.673+02:00 The beginning of the time interval (inclusive) from which the raw measurements will be returned. Default is one hour ago. |
end | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: end=2017-06-13T15:19:59.673+02:00 The end of the time interval (exclusive) from which the raw measurements will be returned. Default is the current time. |
type | string Default: "json" Enum: "json" "json_chunks" "csv" Example: type=json If provided defines content type returned by the service. Default result type is 'json' |
[- {
- "deviceId": "2b231903-e167-48b6-8038-3964a24c62ec",
- "name": "temperature",
- "timestamp": "2017-06-13T15:19:59.600Z",
- "value": 21.5
}, - {
- "deviceId": "2b231903-e167-48b6-8038-3964a24c62ec",
- "name": "registerOn",
- "timestamp": "2017-06-13T15:19:59.700Z",
- "value": true
}, - {
- "deviceId": "2b231903-e167-48b6-8038-3964a24c62ec",
- "name": "reading",
- "timestamp": "2017-06-13T15:19:59.973Z",
- "value": "someReading"
}
]
The relayr Cloud provides an endpoint allowing you to import measurements into devices. This endpoint can be used for testing purposes or to import measurement-type events previously gathered on a piece of equipment.
NOTE: This endpoint does not create measurements, you must define the measurements to import in the model of the device before you can import them. Go to Entities > Device Models in the left navigation panel for more information on creating measurements.
Imports the measurements specified in the request body into the corresponding attributed devices
The measurements to send.
deviceId | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Unique ID for each device sending measurements |
Array of objects non-empty |
[- {
- "deviceId": "aaa19e58-a633-4963-b29c-31a990587a5f",
- "measurements": [
- {
- "name": "temperature1",
- "timestamp": "2017-06-13T15:19:59.600+02:00",
- "value": 21.5
}, - {
- "name": "temperature2",
- "timestamp": "2017-06-13T15:19:59.600+02:00",
- "value": 21.5
}
]
}, - {
- "deviceId": "e4319e58-a633-4963-b29c-31a990587a5f",
- "measurements": [
- {
- "name": "temperature1",
- "timestamp": "2017-06-13T15:19:59.600+02:00",
- "value": 11.5
}, - {
- "name": "temperature2",
- "timestamp": "2017-06-13T15:19:59.600+02:00",
- "value": 2.5
}
]
}
]
{- "details": "Additional details about the error - if applicable",
- "id": "113faaa16165443993b8ecfb8febc023",
- "message": "Error message"
}
Imports the measurements specified in the request body into the device specified in the path
deviceId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f Id of the device to send data (measurement or alert) for. |
The measurements to send.
name required | string^[-.~a-zA-Z0-9_]+$ The name of the measurement as defined in the device model. |
required | integer or number or string or boolean The value of a measurement can be of different types (integer, number, string, boolean) |
timestamp | string <date-time> ISO-8601 formatted timestamp |
[- {
- "name": "temperature",
- "timestamp": "2017-06-13T15:19:59.673+02:00",
- "value": 21.5
}, - {
- "name": "registerOn",
- "timestamp": "2017-06-13T15:19:59.673+02:00",
- "value": true
}, - {
- "name": "reading",
- "value": "someReading"
}
]
{- "data": [
- {
- "name": "temperature",
- "timestamp": "2017-06-13T15:19:59.600+02:00",
- "value": 21.5
}, - {
- "name": "registerOn",
- "timestamp": "2017-06-13T15:19:59.700+02:00",
- "value": true
}, - {
- "name": "reading",
- "timestamp": "2017-06-13T15:19:59.973+02:00",
- "value": "someReading"
}
]
}
In the relayr Cloud, commands are used to send instructions to a device, for example turning on a light or setting a target temperature for a thermostat. The endpoints presented in this section allow you to create and manage command tasks on a device.
NOTE: These endpoints do not create commands, you must define the commands to execute in the model of the device before you can create a command task. Go to Entities > Device Models in the left navigation panel for more information on creating commands.
Returns all the command tasks existing for the device specified in the path
deviceId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Device ID of the task |
commandStatus | string Enum: "unknown" "in_progress" "success" "error" Example: commandStatus=in_progress Latest command status to filter for |
deliveryStatus | string Enum: "pending" "delivered" "timeout" "aborted" Example: deliveryStatus=delivered Latest delivery status to filter for |
{- "data": [
- {
- "command": {
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "name": "door_open",
- "parameter": true,
- "status": "in_progress"
}, - "createdAt": "2017-11-26T09:14:00.000+02:00",
- "deliveryStatus": "delivered",
- "description": "My task thats really awesome",
- "deviceId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "end": "2017-11-26T09:14:00.000+02:00",
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "name": "My task",
- "orgId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "start": "2017-11-26T09:14:00.000+02:00",
- "updatedAt": "2017-11-26T09:14:00.000+02:00"
}
]
}
Returns the command tasks matching the parameters specified in the query
commandStatus | string Enum: "unknown" "in_progress" "success" "error" Example: commandStatus=in_progress Latest command status to filter for |
deliveryStatus | string Enum: "pending" "delivered" "timeout" "aborted" Example: deliveryStatus=delivered Latest delivery status to filter for |
entityIds | Array of strings <uuid> IDs of the entities of the tasks |
taskIds | Array of strings <uuid> Tasks IDs |
{- "data": [
- {
- "command": {
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "name": "door_open",
- "parameter": true,
- "status": "in_progress"
}, - "createdAt": "2017-11-26T09:14:00.000+02:00",
- "deliveryStatus": "delivered",
- "description": "My task thats really awesome",
- "deviceId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "end": "2017-11-26T09:14:00.000+02:00",
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "name": "My task",
- "orgId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "start": "2017-11-26T09:14:00.000+02:00",
- "updatedAt": "2017-11-26T09:14:00.000+02:00"
}
]
}
Creates a command task for the device specified in the request body
deviceId required | string <UUID> ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... |
name required | string <= 64 characters ^(?!\s*$).+ Descriptive name for the task |
required | object |
description | string <= 256 characters Additional task description |
end | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... End task at this point in the future - default 1 hour |
start | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Start task at this point in the future - default now |
{- "command": {
- "name": "door_open",
- "parameter": true
}, - "description": "My task thats really awesome",
- "deviceId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "end": "2017-11-26T09:14:00.000+02:00",
- "name": "My task",
- "start": "2017-11-26T09:14:00.000+02:00"
}
{- "command": {
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "name": "door_open",
- "parameter": true,
- "status": "in_progress"
}, - "createdAt": "2017-11-26T09:14:00.000+02:00",
- "deliveryStatus": "delivered",
- "description": "My task thats really awesome",
- "deviceId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "end": "2017-11-26T09:14:00.000+02:00",
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "name": "My task",
- "orgId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "start": "2017-11-26T09:14:00.000+02:00",
- "updatedAt": "2017-11-26T09:14:00.000+02:00"
}
Deletes the command task specified in the path
taskId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Task ID |
{- "error": {
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Returns the command task specified in the path
taskId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Task ID |
{- "command": {
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "name": "door_open",
- "parameter": true,
- "status": "in_progress"
}, - "createdAt": "2017-11-26T09:14:00.000+02:00",
- "deliveryStatus": "delivered",
- "description": "My task thats really awesome",
- "deviceId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "end": "2017-11-26T09:14:00.000+02:00",
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "name": "My task",
- "orgId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "start": "2017-11-26T09:14:00.000+02:00",
- "updatedAt": "2017-11-26T09:14:00.000+02:00"
}
Updates the command task specified in the path
taskId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Task ID |
description | string <= 256 characters Additional task description |
end | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... End task at this point in the future - default 1 hour |
name | string <= 64 characters ^(?!\s*$).+ Descriptive name for the task |
start | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Start task at this point in the future - default now |
{- "description": "My task thats really awesome",
- "end": "2017-11-26T09:14:00.000+02:00",
- "name": "My task",
- "start": "2017-11-26T09:14:00.000+02:00"
}
{- "command": {
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "name": "door_open",
- "parameter": true,
- "status": "in_progress"
}, - "createdAt": "2017-11-26T09:14:00.000+02:00",
- "deliveryStatus": "delivered",
- "description": "My task thats really awesome",
- "deviceId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "end": "2017-11-26T09:14:00.000+02:00",
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "name": "My task",
- "orgId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "start": "2017-11-26T09:14:00.000+02:00",
- "updatedAt": "2017-11-26T09:14:00.000+02:00"
}
Cancels the command task specified in the path
taskId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Task ID |
{- "command": {
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "name": "door_open",
- "parameter": true,
- "status": "in_progress"
}, - "createdAt": "2017-11-26T09:14:00.000+02:00",
- "deliveryStatus": "delivered",
- "description": "My task thats really awesome",
- "deviceId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "end": "2017-11-26T09:14:00.000+02:00",
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "name": "My task",
- "orgId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "start": "2017-11-26T09:14:00.000+02:00",
- "updatedAt": "2017-11-26T09:14:00.000+02:00"
}
The relayr Cloud provides an endpoint allowing you to import commands into devices. This endpoint can be used for testing purposes or to import command-type events previously gathered on a piece of equipment.
NOTE: This endpoint does not create commands, you must first define the commands to import in the model of the device before you can import them. Go to Entities > Device Models in the left navigation panel for more information on creating commands.
Imports the commands specified in the request body into the device specified in the path
deviceId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: cea19e58-a633-4963-b29c-31a990587a5f Id of the device to send data (measurement or alert) for. |
The list of commands to send. If ID is not provided it will be added by the service and returned in response.
name required | string^[-.~a-zA-Z0-9_]+$ The name of the command to execute |
id | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Unique command ID - has to be provided so command can be tracked |
integer or number or string or boolean or object or Array of any The value of a command can be of different types (integer, number, string, boolean, object, array) | |
timestamp | string <date-time> ISO-8601 formatted timestamp |
[- {
- "name": "door_open",
- "parameter": true,
- "timestamp": "2017-06-13T15:19:59.673+02:00"
}, - {
- "id": "aaa19e58-a633-4963-b29c-31a990587a5f",
- "name": "window_close",
- "parameter": true
}
]
{- "data": [
- {
- "id": "ccc19e58-a633-4963-b29c-31a990587a5f",
- "name": "door_open",
- "parameter": true,
- "timestamp": "2017-06-13T15:19:59.600+02:00"
}, - {
- "id": "aaa19e58-a633-4963-b29c-31a990587a5f",
- "name": "window_close",
- "parameter": true,
- "timestamp": "2017-06-13T15:19:59.973+02:00"
}
]
}
Metadata are arbitrary key/value pairs you can add to a device, a device group, a user or an organization to give more information about what they represent.
In the relayr Cloud, the key represents the type of information you want to add to the entity while the value represents the actual information. In the JSON schema of the entity, the keys have to be strings while the values can be of any JSON data type.
The endpoints presented in this section let you create and manage device, device group and organization metadata ONLY. To create metadata for users, go to Metadata - User in the left navigation panel.
Returns the key/value pairs specified in the query for the entities specified in the query. If keysFilter
is not specified, all key/value pairs for all specified entities are returned. In this endpoint entities can be devices or device groups. Please use GET /users/{userId}/metadata
to return key/value pairs for a user.
entityName required | string Enum: "devices" "device-groups" Example: devices An entity that can be associated with metadata. Currently, this can either be 'devices', 'device-groups'. |
entityIds required | Array of strings <uuid> Example: entityIds=3f70b734-6f22-47e5-90a1-f2466ca75bc3&entityIds=8dced8b4-caec-44f1-86c4-2e0f1a889066 Comma separated list of entity ids. The metadata associated to entities with matching ids will be returned. |
keysFilter | Array of strings Example: keysFilter=color&keysFilter=parent&keysFilter=smoothness Comma separated list of metadata keys - only those key/value pairs will be included in the returned metadata. If omitted the complete metadata is returned. |
{- "data": [
- {
- "entityId": "e3547fe3-ddcf-4ce4-9924-6435160304be",
- "keys": {
- "color": {
- "lastModified": "2017-09-15T08:42:28.964Z",
- "value": {
- "b": 255,
- "g": 255,
- "r": 0
}
}, - "parent": {
- "lastModified": "2017-09-21T08:42:28.964Z",
- "value": "deviceX"
}, - "smoothness": {
- "lastModified": "2017-09-21T08:42:28.964Z",
- "value": 100
}
}
}, - {
- "entityId": "f302fc30-5c22-4873-935f-281092f24953",
- "keys": {
- "color": {
- "lastModified": "2017-09-15T08:42:28.964Z",
- "value": {
- "b": 255,
- "g": 255,
- "r": 255
}
}, - "parent": {
- "lastModified": "2017-09-21T08:42:28.964Z",
- "value": "deviceX"
}, - "smoothness": {
- "lastModified": "2017-09-21T08:42:28.964Z",
- "value": 100
}
}
}
]
}
Deletes all the key/value pairs of the entity specified in the path. In this endpoint an entity can be a device, a device group or an organization. Please use DELETE /users/{userId}/metadata
to delete all key/value pairs for a user.
entityName required | string Enum: "devices" "device-groups" "organizations" Example: devices An entity that can be associated with metadata. Currently, this can either be 'devices', 'device-groups' or 'organizations'. |
entityId required | string <uuid> Example: cea19e58-a633-4963-b29c-31a990587a5f The id of the entity that is associated with the metadata. Needs to be a valid UUID and you must have the necessary permissions for this entity. |
{- "error": {
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Returns the key/value pairs specified in the query for the entity specified in the path. If keysFilter
is not specified, all key/value pairs for the entity are returned. In this endpoint an entity can be a device, a device group or an organization. Please use GET /users/{userId}/metadata
to return key/value pairs for a user.
entityName required | string Enum: "devices" "device-groups" "organizations" Example: devices An entity that can be associated with metadata. Currently, this can either be 'devices', 'device-groups' or 'organizations'. |
entityId required | string <uuid> Example: cea19e58-a633-4963-b29c-31a990587a5f The id of the entity that is associated with the metadata. Needs to be a valid UUID and you must have the necessary permissions for this entity. |
keys | string If the 'keys' parameter is set, it will only return the name of the keys for the specified entity id. The value of the query parameter will be ignored. |
{- "entityId": "e3547fe3-ddcf-4ce4-9924-6435160304be",
- "keys": {
- "color": {
- "lastModified": "2017-09-15T08:42:28.964Z",
- "value": {
- "b": 255,
- "g": 255,
- "r": 0
}
}, - "parent": {
- "lastModified": "2017-09-21T08:42:28.964Z",
- "value": "deviceX"
}, - "smoothness": {
- "lastModified": "2017-09-21T08:42:28.964Z",
- "value": 100
}
}
}
Creates or updates the key/value pairs specified in the request body for the entity specified in the path. In this endpoint an entity can be a device, a device group or an organization. Please use PUT /users/{userId}/metadata
to create or update key/value pairs for a user.
entityName required | string Enum: "devices" "device-groups" "organizations" Example: devices An entity that can be associated with metadata. Currently, this can either be 'devices', 'device-groups' or 'organizations'. |
entityId required | string <uuid> Example: cea19e58-a633-4963-b29c-31a990587a5f The id of the entity that is associated with the metadata. Needs to be a valid UUID and you must have the necessary permissions for this entity. |
An array defining the keys and their associated values. If the value for any of the specified keys in the array already exists, it is updated with the new value specified in the array. If the value does not exist, it is created with the key-value pair specified in the array.
key required | string^[-.~_ äüöÄÜÖßa-zA-Z0-9]{1,64}$ No leading or trailing spaces allowed. |
value required | object The value associated with the key. |
[- {
- "key": "color",
- "value": {
- "b": 255,
- "g": 0,
- "r": 0
}
}, - {
- "key": "smoothness",
- "value": 100
}, - {
- "key": "parent",
- "value": "deviceX"
}
]
{- "error": {
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Deletes the key/value pair specified in the path for the entity specified in the path. In this endpoint an entity can be a device, a device group or an organization. Please use DELETE /users/{userId}/metadata/{key}
to delete a key/value pair for a user.
entityName required | string Enum: "devices" "device-groups" "organizations" Example: devices An entity that can be associated with metadata. Currently, this can either be 'devices', 'device-groups' or 'organizations'. |
entityId required | string <uuid> Example: cea19e58-a633-4963-b29c-31a990587a5f The id of the entity that is associated with the metadata. Needs to be a valid UUID and you must have the necessary permissions for this entity. |
key required | string^[-.~_ äüöÄÜÖßa-zA-Z0-9]{1,64}$ Example: color The key that is associated with the metadata. Must be urlencoded when containing special characters (use "%20" for spaces, not "+"). No leading or trailing spaces allowed. |
{- "error": {
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Returns the key/value pair specified in the path for the entity specified in the path. In this endpoint an entity can be a device, a device group or an organization. Please use GET /users/{userId}/metadata/{key}
to return a key/value pair for a user.
entityName required | string Enum: "devices" "device-groups" "organizations" Example: devices An entity that can be associated with metadata. Currently, this can either be 'devices', 'device-groups' or 'organizations'. |
entityId required | string <uuid> Example: cea19e58-a633-4963-b29c-31a990587a5f The id of the entity that is associated with the metadata. Needs to be a valid UUID and you must have the necessary permissions for this entity. |
key required | string^[-.~_ äüöÄÜÖßa-zA-Z0-9]{1,64}$ Example: color The key that is associated with the metadata. Must be urlencoded when containing special characters (use "%20" for spaces, not "+"). No leading or trailing spaces allowed. |
{- "lastModified": "2017-08-15T15:45:48.607Z",
- "value": {
- "b": 255,
- "g": 0,
- "r": 0
}
}
Creates or updates the key/value pair specified in the path for the entity specified in the path. In this endpoint an entity can be a device, a device group or an organization. Please use PUT /users/{userId}/metadata/{key}
to create or update a key/value pair for a user.
entityName required | string Enum: "devices" "device-groups" "organizations" Example: devices An entity that can be associated with metadata. Currently, this can either be 'devices', 'device-groups' or 'organizations'. |
entityId required | string <uuid> Example: cea19e58-a633-4963-b29c-31a990587a5f The id of the entity that is associated with the metadata. Needs to be a valid UUID and you must have the necessary permissions for this entity. |
key required | string^[-.~_ äüöÄÜÖßa-zA-Z0-9]{1,64}$ Example: color The key that is associated with the metadata. Must be urlencoded when containing special characters (use "%20" for spaces, not "+"). No leading or trailing spaces allowed. |
The metadata corresponding to the specified key. If the key does not exist, this call will create a new metadata entry for the specified entity and key. If the key already exists for the specified entity, the metadata corresponding to the key will be updated. The value may be any valid JSON and is not restricted to JSON objects.
{- "b": 0,
- "g": 255,
- "r": 0
}
{- "error": {
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Metadata are arbitrary key/value pairs you can add to a device, a device group, a user or an organization to give more information about what they represent.
In the relayr Cloud, the key represents the type of information you want to
add to the entity while the value represents the actual information. For example
if you wanted to say that a user lives in Berlin, you
would add the key/value pair "key": "city", "value": "berlin"
to the user. In the
schema of the entity, the keys have to be strings while the values can be
of any JSON data type.
The endpoints presented in this section let you create and manage user metadata.
Deletes all the key/value pairs of the user specified in the path. Please note that you can only use your own userId in this endpoint and therefore only delete your own metadata.
userId required | string <uuid> Example: cea19e58-a633-4963-b29c-31a990587a5f The id of the user that is associated with the metadata. Needs to be a valid UUID. |
{- "error": {
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Returns the key/value pairs specified in the query for the user specified in the path. If keysFilter
is not specified, all key/value pairs are returned. Please note that you can only use your own userId in this endpoint and therefore only retrieve your own metadata.
userId required | string <uuid> Example: cea19e58-a633-4963-b29c-31a990587a5f The id of the user that is associated with the metadata. Needs to be a valid UUID. |
keys | string If the 'keys' parameter is set, it will only return the name of the keys for the specified entity id. The value of the query parameter will be ignored. |
{- "entityId": "e3547fe3-ddcf-4ce4-9924-6435160304be",
- "keys": {
- "color": {
- "lastModified": "2017-09-15T08:42:28.964Z",
- "value": {
- "b": 255,
- "g": 255,
- "r": 0
}
}, - "parent": {
- "lastModified": "2017-09-21T08:42:28.964Z",
- "value": "deviceX"
}, - "smoothness": {
- "lastModified": "2017-09-21T08:42:28.964Z",
- "value": 100
}
}
}
Creates or updates the key/value pairs specified in the request body for the user specified in the path. Please note that you can only use your own userId in this endpoint and therefore only update your own metadata.
userId required | string <uuid> Example: cea19e58-a633-4963-b29c-31a990587a5f The id of the user that is associated with the metadata. Needs to be a valid UUID. |
An array defining the keys and their associated values. If the value for any of the specified keys in the array already exists, it is updated with the new value specified in the array. If the value does not exist, it is created with the key-value pair specified in the array.
key required | string^[-.~_ äüöÄÜÖßa-zA-Z0-9]{1,64}$ No leading or trailing spaces allowed. |
value required | object The value associated with the key. |
[- {
- "key": "color",
- "value": {
- "b": 255,
- "g": 0,
- "r": 0
}
}, - {
- "key": "smoothness",
- "value": 100
}, - {
- "key": "parent",
- "value": "deviceX"
}
]
{- "error": {
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Deletes the key/value pair specified in the path for the user specified in the path. Please note that you can only use your own userId in this endpoint and therefore only delete your own metadata.
userId required | string <uuid> Example: cea19e58-a633-4963-b29c-31a990587a5f The id of the user that is associated with the metadata. Needs to be a valid UUID. |
key required | string^[-.~_ äüöÄÜÖßa-zA-Z0-9]{1,64}$ Example: color The key that is associated with the metadata. Must be urlencoded when containing special characters (use "%20" for spaces, not "+"). No leading or trailing spaces allowed. |
{- "error": {
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Returns the key/value pair specified in the path for the user specified in the path. Please note that you can only use your own userId in this endpoint and therefore only retrieve your own metadata.
userId required | string <uuid> Example: cea19e58-a633-4963-b29c-31a990587a5f The id of the user that is associated with the metadata. Needs to be a valid UUID. |
key required | string^[-.~_ äüöÄÜÖßa-zA-Z0-9]{1,64}$ Example: color The key that is associated with the metadata. Must be urlencoded when containing special characters (use "%20" for spaces, not "+"). No leading or trailing spaces allowed. |
{- "lastModified": "2017-08-15T15:45:48.607Z",
- "value": {
- "b": 255,
- "g": 0,
- "r": 0
}
}
Creates or updates the key/value pair specified in the path and request body for the user specified in the path. Please note that you can only use your own userId in this endpoint and therefore only update your own metadata.
userId required | string <uuid> Example: cea19e58-a633-4963-b29c-31a990587a5f The id of the user that is associated with the metadata. Needs to be a valid UUID. |
key required | string^[-.~_ äüöÄÜÖßa-zA-Z0-9]{1,64}$ Example: color The key that is associated with the metadata. Must be urlencoded when containing special characters (use "%20" for spaces, not "+"). No leading or trailing spaces allowed. |
The metadata corresponding to the specified key. If the key does not exist, this call will create a new metadata entry for the specified user and key. If the key already exists for the specified user, the metadata corresponding to the key will be updated. The value may be any valid JSON and is not restricted to JSON objects.
{- "b": 0,
- "g": 255,
- "r": 0
}
{- "error": {
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Metadata are arbitrary key/value pairs you can add to a device, a device group, a user or an organization to give more information about what they represent.
In the relayr Cloud, the key represents the type of information you want to
add to the entity while the value represents the actual information. For example
if you wanted to add the serial number 1234
to a device, you
would add the key/value pair "key": "serial number", "value": 1234
to the device. In the
schema of the entity, the keys have to be strings while the values can be
of any JSON data type.
The endpoint presented in this section let you retrieve all the device metadata available to you. To create metadata for devices, go to Metadata - Entity in the left navigation panel.
Metadata are arbitrary key/value pairs you can add to a device, a device group, a user or an organization to give more information about what they represent.
In the relayr Cloud, the key represents the type of information you want to
add to the entity while the value represents the actual information. For example
if you wanted to say that all of the devices in a device group are red, you
would add the key/value pair "key": "color", "value": "red"
to the device group. In the
schema of the entity, the keys have to be strings while the values can be
of any JSON data type.
The endpoint presented in this section let you retrieve device group metadata. To create metadata for device groups, go to Metadata - Entity in the left navigation panel.
Returns the key/value pairs specified in the query for the devices belonging to the device group specified in the path. If keysFilter
is not specified, all key/value pairs for the specified device group are returned.
deviceGroupId required | string <uuid> Example: cea19e58-a633-4963-b29c-31a990587a5f The id of the device group that contains the entities associated with the metadata. Needs to be a valid UUID and you must have the permission to access the group. |
keysFilter | Array of strings Example: keysFilter=color&keysFilter=parent&keysFilter=smoothness Comma separated list of metadata keys - only those key/value pairs will be included in the returned metadata. If omitted the complete metadata is returned. |
{- "data": [
- {
- "entityId": "e3547fe3-ddcf-4ce4-9924-6435160304be",
- "keys": {
- "color": {
- "lastModified": "2017-09-15T08:42:28.964Z",
- "value": {
- "b": 255,
- "g": 255,
- "r": 0
}
}, - "parent": {
- "lastModified": "2017-09-21T08:42:28.964Z",
- "value": "deviceX"
}, - "smoothness": {
- "lastModified": "2017-09-21T08:42:28.964Z",
- "value": 100
}
}
}, - {
- "entityId": "f302fc30-5c22-4873-935f-281092f24953",
- "keys": {
- "color": {
- "lastModified": "2017-09-15T08:42:28.964Z",
- "value": {
- "b": 255,
- "g": 255,
- "r": 255
}
}, - "parent": {
- "lastModified": "2017-09-21T08:42:28.964Z",
- "value": "deviceX"
}, - "smoothness": {
- "lastModified": "2017-09-21T08:42:28.964Z",
- "value": 100
}
}
}
]
}
In the relayr Cloud, alert subscriptions at device level allow you to get notifications by email or SMS whenever alerts are set or cleared on a specific device. Subscriptions can only be done at alert severity level, it is not possible to receive notifications for specific alerts.
The endpoints presented in this section let you create and manage alert subscriptions at device level.
Retrieves the emails/SMS messages that were sent for the timeframe, devices and alert severities specified in the query.
limit | integer [ 1 .. 10000 ] Pagination limit - maximum number of entities to return. Default is 10. |
offset | integer >= 0 Pagination offset. Default is 0. |
deviceId required | string <uuid> ID of the device the for which notifications were sent |
alertName required | string Name of the alert for which notifications were sent |
start required | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... The beginning of the time interval in which notifications were sent |
stop required | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... The end of the time interval in which notifications were sent |
{- "alertName": "string",
- "deviceId": "3962d32d-12ab-4f6f-83ad-d85f8d28badb",
- "start": "2017-01-21T08:42:28.964Z",
- "stop": "2017-01-21T08:42:28.964Z"
}
{- "data": [
- {
- "alertName": "string",
- "deviceId": "3962d32d-12ab-4f6f-83ad-d85f8d28badb",
- "email": "user@example.com",
- "emailSubject": "[Alert Notification] Temperature is too high",
- "emailText": "string",
- "orgId": "e8169b6f-89c7-472a-8374-5dac1307b130",
- "phoneNumber": "string",
- "sentAt": " 2017-01-21T08:42:28.964Z",
- "severity": 2,
- "smsText": "string"
}
], - "total": 100
}
In the relayr Cloud, alert subscriptions at device group level allow you to get notifications by email or SMS whenever alerts are set or cleared on the devices of a specific device group. Subscriptions can only be done at alert severity level, it is not possible to receive notifications for specific alerts.
The endpoints presented in this section let you create and manage alert subscriptions at device group level.
Returns all subscriptions for the device groups specified in the query. You must have access to the device groups to see the subscriptions.
{- "data": [
- {
- "alertCategories": [
- "High",
- "Medium"
], - "deviceGroupIds": [
- "3962d32d-12ab-4f6f-83ad-d85f8d28badb"
], - "name": "Critical Alerts in the Berlin area",
- "notifyOnClear": false,
- "emailAddresses": [
- "foo@example.com"
], - "emailSubject": "[Alert Notification] Temperature is too high",
- "emailTemplate": "You are receiving this automated email because you have been subscribed to receive notifications of alerts in the relayr platform.\\n\\nThe system received a message for the alert \\\"{{alert-name}}\\\" which is {{alert-state}} for device {{device-name}}. This alert has severity {{alert-severity}} and message \\\"{{alert-message}}\\\", and was recorded at: {{alert-recorded-ts:HH:mm:ss@CST}}.\\n\\nIf you no longer want to receive these notifications please contact your relayr system administrator.\\n\\nrelayr.",
- "createdAt": "2017-08-21T08:42:28.964Z",
- "id": "000078b3-261e-4025-9d81-b8631d8d0000",
- "orgId": "00682dc2-edb2-4df9-a92c-8c272b7e684b",
- "updatedAt": "2017-08-21T08:42:28.964Z"
}
]
}
Creates an email subscription for the alert severities of the device groups specified in the query. An email is sent for every DeviceGroupAlertSet
or DeviceGroupAlertClear
event happening in the specified groups. Emails are also sent for devices included in subgroups of the specified groups.
name required | string^.{1,256}$ short description for this subscription, will be displayed in UIs |
deviceGroupIds required | Array of strings <uuid> non-empty ID of the device groups associated with the subscription. |
alertCategories required | Array of strings non-empty Items Enum: "High" "Medium" "Low" Incoming alerts are filtered by their severity category before notifications are send. Allowed values can be retrieved from '/alert-severity/mapping'. |
emailAddresses required | Array of strings <email> non-empty |
notifyOnClear | boolean Default: true If this flag is false, notifications are only sent when alerts are set. |
emailSubject | string^.{1,150}$ Email subject, you can use the same placeholders as in the email body template. |
emailTemplate | string^.{1,2048}$ Template for Email notifications message. It can include the following placeholders: alert-name, alert-display-name, alert-severity, alert-severity-level, alert-message, alert-state, alert-recorded-ts (or alert-recorded-ts:< dateformat > where < dateformat > can be any valid Java DateTime format or alert-recorded-ts:< dateformat >@< zoneformat > where < dateformat > can be any valid Java DateTime format, < zoneformat > can be any valid ZoneId), alert-received-ts (or alert-received-ts:< dateformat > where < dateformat > can be any valid Java DateTime format or alert-received-ts:< dateformat >@< zoneformat > where < dateformat > can be any valid Java DateTime format, < zoneformat > can be any valid ZoneId), device-name, device-id, location-latitude, location-longitude, location-address, location-city, location-zip-code, metadata-< * > (where < * > can be any metadata key). For the elevator product there is also elevator-uri, which is a link to the elevator in the elevator dashboard. Placeholders should be included in double curly braces (e.g. {{alert-name}}). Detailed Java DateTime format documentation. Detailed Java ZoneId format documentation |
{- "alertCategories": [
- "High",
- "Medium"
], - "deviceGroupIds": [
- "3962d32d-12ab-4f6f-83ad-d85f8d28badb"
], - "name": "Critical Alerts in the Berlin area",
- "notifyOnClear": false,
- "emailAddresses": [
- "foo@example.com"
], - "emailSubject": "[Alert Notification] Temperature is too high",
- "emailTemplate": "You are receiving this automated email because you have been subscribed to receive notifications of alerts in the relayr platform.\\n\\nThe system received a message for the alert \\\"{{alert-name}}\\\" which is {{alert-state}} for device {{device-name}}. This alert has severity {{alert-severity}} and message \\\"{{alert-message}}\\\", and was recorded at: {{alert-recorded-ts:HH:mm:ss@CST}}.\\n\\nIf you no longer want to receive these notifications please contact your relayr system administrator.\\n\\nrelayr."
}
{- "data": {
- "alertCategories": [
- "High",
- "Medium"
], - "deviceGroupIds": [
- "3962d32d-12ab-4f6f-83ad-d85f8d28badb"
], - "name": "Critical Alerts in the Berlin area",
- "notifyOnClear": false,
- "emailAddresses": [
- "foo@example.com"
], - "emailSubject": "[Alert Notification] Temperature is too high",
- "emailTemplate": "You are receiving this automated email because you have been subscribed to receive notifications of alerts in the relayr platform.\\n\\nThe system received a message for the alert \\\"{{alert-name}}\\\" which is {{alert-state}} for device {{device-name}}. This alert has severity {{alert-severity}} and message \\\"{{alert-message}}\\\", and was recorded at: {{alert-recorded-ts:HH:mm:ss@CST}}.\\n\\nIf you no longer want to receive these notifications please contact your relayr system administrator.\\n\\nrelayr.",
- "createdAt": "2017-08-21T08:42:28.964Z",
- "id": "000078b3-261e-4025-9d81-b8631d8d0000",
- "orgId": "00682dc2-edb2-4df9-a92c-8c272b7e684b",
- "updatedAt": "2017-08-21T08:42:28.964Z"
}
}
Deletes the email subscription specified in the path
subscriptionID required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 000078b3-261e-4025-9d81-b8631d8d0000 ID (UUID) of the subscription |
{- "error": {
- "details": "Additional details about the error - if applicable",
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Updates the email subscription specified in the path. See POST /alert-subscriptions/email-subscriptions
endpoint for further details on subscriptions.
subscriptionID required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 000078b3-261e-4025-9d81-b8631d8d0000 ID (UUID) of the subscription |
name required | string^.{1,256}$ short description for this subscription, will be displayed in UIs |
deviceGroupIds required | Array of strings <uuid> non-empty ID of the device groups associated with the subscription. |
alertCategories required | Array of strings non-empty Items Enum: "High" "Medium" "Low" Incoming alerts are filtered by their severity category before notifications are send. Allowed values can be retrieved from '/alert-severity/mapping'. |
emailAddresses required | Array of strings <email> non-empty |
notifyOnClear | boolean Default: true If this flag is false, notifications are only sent when alerts are set. |
emailSubject | string^.{1,150}$ Email subject, you can use the same placeholders as in the email body template. |
emailTemplate | string^.{1,2048}$ Template for Email notifications message. It can include the following placeholders: alert-name, alert-display-name, alert-severity, alert-severity-level, alert-message, alert-state, alert-recorded-ts (or alert-recorded-ts:< dateformat > where < dateformat > can be any valid Java DateTime format or alert-recorded-ts:< dateformat >@< zoneformat > where < dateformat > can be any valid Java DateTime format, < zoneformat > can be any valid ZoneId), alert-received-ts (or alert-received-ts:< dateformat > where < dateformat > can be any valid Java DateTime format or alert-received-ts:< dateformat >@< zoneformat > where < dateformat > can be any valid Java DateTime format, < zoneformat > can be any valid ZoneId), device-name, device-id, location-latitude, location-longitude, location-address, location-city, location-zip-code, metadata-< * > (where < * > can be any metadata key). For the elevator product there is also elevator-uri, which is a link to the elevator in the elevator dashboard. Placeholders should be included in double curly braces (e.g. {{alert-name}}). Detailed Java DateTime format documentation. Detailed Java ZoneId format documentation |
{- "alertCategories": [
- "High",
- "Medium"
], - "deviceGroupIds": [
- "3962d32d-12ab-4f6f-83ad-d85f8d28badb"
], - "name": "Critical Alerts in the Berlin area",
- "notifyOnClear": false,
- "emailAddresses": [
- "foo@example.com"
], - "emailSubject": "[Alert Notification] Temperature is too high",
- "emailTemplate": "You are receiving this automated email because you have been subscribed to receive notifications of alerts in the relayr platform.\\n\\nThe system received a message for the alert \\\"{{alert-name}}\\\" which is {{alert-state}} for device {{device-name}}. This alert has severity {{alert-severity}} and message \\\"{{alert-message}}\\\", and was recorded at: {{alert-recorded-ts:HH:mm:ss@CST}}.\\n\\nIf you no longer want to receive these notifications please contact your relayr system administrator.\\n\\nrelayr."
}
{- "error": {
- "details": "Additional details about the error - if applicable",
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Searches for subscriptions that match the parameters specified in the query
contact | string Either email or phone number |
name | string Case-insensitive accepted. |
{- "contact": "foo@example.com",
- "name": "string"
}
{- "data": [
- {
- "alertCategories": [
- "High",
- "Medium"
], - "deviceGroupIds": [
- "3962d32d-12ab-4f6f-83ad-d85f8d28badb"
], - "name": "Critical Alerts in the Berlin area",
- "notifyOnClear": false,
- "emailAddresses": [
- "foo@example.com"
], - "emailSubject": "[Alert Notification] Temperature is too high",
- "emailTemplate": "You are receiving this automated email because you have been subscribed to receive notifications of alerts in the relayr platform.\\n\\nThe system received a message for the alert \\\"{{alert-name}}\\\" which is {{alert-state}} for device {{device-name}}. This alert has severity {{alert-severity}} and message \\\"{{alert-message}}\\\", and was recorded at: {{alert-recorded-ts:HH:mm:ss@CST}}.\\n\\nIf you no longer want to receive these notifications please contact your relayr system administrator.\\n\\nrelayr.",
- "createdAt": "2017-08-21T08:42:28.964Z",
- "id": "000078b3-261e-4025-9d81-b8631d8d0000",
- "orgId": "00682dc2-edb2-4df9-a92c-8c272b7e684b",
- "updatedAt": "2017-08-21T08:42:28.964Z"
}
]
}
Creates an SMS subscription for the alert severities of the device groups specified in the query. An SMS is sent for every DeviceGroupAlertSet
or DeviceGroupAlertClear
event happening in the specified groups. SMS messages are also sent for devices included in subgroups of the specified groups.
name required | string^.{1,256}$ short description for this subscription, will be displayed in UIs |
deviceGroupIds required | Array of strings <uuid> non-empty ID of the device groups associated with the subscription. |
alertCategories required | Array of strings non-empty Items Enum: "High" "Medium" "Low" Incoming alerts are filtered by their severity category before notifications are send. Allowed values can be retrieved from '/alert-severity/mapping'. |
phoneNumbers required | Array of strings non-empty |
notifyOnClear | boolean Default: true If this flag is false, notifications are only sent when alerts are set. |
smsTemplate | string^.{1,2048}$ Template for SMS notifications. It can include the following placeholders: alert-name, alert-display-name, alert-severity, alert-severity-level, alert-message, alert-state, alert-recorded-ts (or alert-recorded-ts:< dateformat > where < dateformat > can be any valid Java DateTime format or alert-recorded-ts:< dateformat >@< zoneformat > where < dateformat > can be any valid Java DateTime format, < zoneformat > can be any valid ZoneId)), alert-received-ts (or alert-received-ts:< dateformat > where < dateformat > can be any valid Java DateTime format or alert-received-ts:< dateformat >@< zoneformat > where < dateformat > can be any valid Java DateTime format, < zoneformat > can be any valid ZoneId)), device-name, device-id, location-latitude, location-longitude, location-address, location-city, location-zip-code, metadata-< * > (where < * > can be any metadata key). For the elevator product there is also elevator-uri, which is a link to the elevator in the elevator dashboard. Placeholders should be included in double curly braces (e.g. {{alert-name}}). Detailed Java DateTime format documentation. Detailed Java ZoneId format documentation |
{- "alertCategories": [
- "High",
- "Medium"
], - "deviceGroupIds": [
- "3962d32d-12ab-4f6f-83ad-d85f8d28badb"
], - "name": "Critical Alerts in the Berlin area",
- "notifyOnClear": false,
- "phoneNumbers": [
- "+49171123456"
], - "smsTemplate": "Alert {{alert-name}} with severity {{alert-severity}} was {{alert-state}} for device: {{device-name}}. Recorded time: {{alert-recorded-ts}}. Received time: {{alert-received-ts}}."
}
{- "data": {
- "alertCategories": [
- "High",
- "Medium"
], - "deviceGroupIds": [
- "3962d32d-12ab-4f6f-83ad-d85f8d28badb"
], - "name": "Critical Alerts in the Berlin area",
- "notifyOnClear": false,
- "phoneNumbers": [
- "+49171123456"
], - "smsTemplate": "Alert {{alert-name}} with severity {{alert-severity}} was {{alert-state}} for device: {{device-name}}. Recorded time: {{alert-recorded-ts}}. Received time: {{alert-received-ts}}.",
- "createdAt": "2017-08-21T08:42:28.964Z",
- "id": "000078b3-261e-4025-9d81-b8631d8d0000",
- "orgId": "00682dc2-edb2-4df9-a92c-8c272b7e684b",
- "updatedAt": "2017-08-21T08:42:28.964Z"
}
}
Deletes the SMS subscription specified in the path
subscriptionID required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 000078b3-261e-4025-9d81-b8631d8d0000 ID (UUID) of the subscription |
{- "error": {
- "details": "Additional details about the error - if applicable",
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Updates the SMS subscription specified in the path. See POST /alert-subscriptions/sms-subscriptions
endpoint for further details.
subscriptionID required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 000078b3-261e-4025-9d81-b8631d8d0000 ID (UUID) of the subscription |
name required | string^.{1,256}$ short description for this subscription, will be displayed in UIs |
deviceGroupIds required | Array of strings <uuid> non-empty ID of the device groups associated with the subscription. |
alertCategories required | Array of strings non-empty Items Enum: "High" "Medium" "Low" Incoming alerts are filtered by their severity category before notifications are send. Allowed values can be retrieved from '/alert-severity/mapping'. |
phoneNumbers required | Array of strings non-empty |
notifyOnClear | boolean Default: true If this flag is false, notifications are only sent when alerts are set. |
smsTemplate | string^.{1,2048}$ Template for SMS notifications. It can include the following placeholders: alert-name, alert-display-name, alert-severity, alert-severity-level, alert-message, alert-state, alert-recorded-ts (or alert-recorded-ts:< dateformat > where < dateformat > can be any valid Java DateTime format or alert-recorded-ts:< dateformat >@< zoneformat > where < dateformat > can be any valid Java DateTime format, < zoneformat > can be any valid ZoneId)), alert-received-ts (or alert-received-ts:< dateformat > where < dateformat > can be any valid Java DateTime format or alert-received-ts:< dateformat >@< zoneformat > where < dateformat > can be any valid Java DateTime format, < zoneformat > can be any valid ZoneId)), device-name, device-id, location-latitude, location-longitude, location-address, location-city, location-zip-code, metadata-< * > (where < * > can be any metadata key). For the elevator product there is also elevator-uri, which is a link to the elevator in the elevator dashboard. Placeholders should be included in double curly braces (e.g. {{alert-name}}). Detailed Java DateTime format documentation. Detailed Java ZoneId format documentation |
{- "alertCategories": [
- "High",
- "Medium"
], - "deviceGroupIds": [
- "3962d32d-12ab-4f6f-83ad-d85f8d28badb"
], - "name": "Critical Alerts in the Berlin area",
- "notifyOnClear": false,
- "phoneNumbers": [
- "+49171123456"
], - "smsTemplate": "Alert {{alert-name}} with severity {{alert-severity}} was {{alert-state}} for device: {{device-name}}. Recorded time: {{alert-recorded-ts}}. Received time: {{alert-received-ts}}."
}
{- "error": {
- "details": "Additional details about the error - if applicable",
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
In the relayr Cloud, monitors trigger alerts on devices whenever they stop sending data (e.g. measurement, alert, command response) for a specified amount of time. Triggered alerts are cleared when the device starts receiving data again. The endpoints presented in this section allow you to create and manage monitors for your devices.
NOTE: Monitors do not create alerts, you must first define the alert to trigger in the model of the device to be able to trigger it using a monitor. Go to Entities > Device Models in the left navigation panel for more information on creating alerts.
Returns monitors for the devices specified in the query
deviceIds | string Example: deviceIds=000078b3-261e-4025-9d81-b8631d8d0000,000078b3-261e-4025-9d81-b8631d8d1111 comma-separated list of deviceIds |
enabled | boolean Filter monitors by their enabled state |
{- "data": [
- {
- "createdAt": "2017-08-21T08:42:28.964Z",
- "deviceId": "3962d32d-12ab-4f6f-83ad-d85f8d28badb",
- "id": "000078b3-261e-4025-9d81-b8631d8d0000",
- "lastSeenAt": "2017-08-21T08:42:28.964Z",
- "monitor": {
- "alertMessage": "Device is so offline!",
- "alertName": "string",
- "alertSet": true,
- "enabled": true,
- "ignoreAlerts": [
- "internally-generated-alert",
- "test-alert"
], - "monitorDeviceConnected": true,
- "thresholdSec": 10
}, - "orgId": "00682dc2-edb2-4df9-a92c-8c272b7e684b",
- "updatedAt": "2017-08-21T08:42:28.964Z"
}
]
}
Creates a monitor for the device specified in the request body
required | object Definition of monitor |
deviceId required | string <uuid> DeviceId the monitor should observe |
{- "deviceId": "3962d32d-12ab-4f6f-83ad-d85f8d28badb",
- "monitor": {
- "alertMessage": "Device is so offline!",
- "alertName": "string",
- "enabled": true,
- "ignoreAlerts": [
- "internally-generated-alert",
- "test-alert"
], - "monitorDeviceConnected": true,
- "thresholdSec": 10
}
}
{- "createdAt": "2017-08-21T08:42:28.964Z",
- "deviceId": "3962d32d-12ab-4f6f-83ad-d85f8d28badb",
- "id": "000078b3-261e-4025-9d81-b8631d8d0000",
- "lastSeenAt": "2017-08-21T08:42:28.964Z",
- "monitor": {
- "alertMessage": "Device is so offline!",
- "alertName": "string",
- "alertSet": true,
- "enabled": true,
- "ignoreAlerts": [
- "internally-generated-alert",
- "test-alert"
], - "monitorDeviceConnected": true,
- "thresholdSec": 10
}, - "orgId": "00682dc2-edb2-4df9-a92c-8c272b7e684b",
- "updatedAt": "2017-08-21T08:42:28.964Z"
}
Deletes the monitor specified in the path
monitorID required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 000078b3-261e-4025-9d81-b8631d8d0000 The ID of the monitor, which is an UUID |
{- "error": {
- "details": "Additional details about the error - if applicable",
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Returns the monitor specified in the path
monitorID required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 000078b3-261e-4025-9d81-b8631d8d0000 The ID of the monitor, which is an UUID |
{- "createdAt": "2017-08-21T08:42:28.964Z",
- "deviceId": "3962d32d-12ab-4f6f-83ad-d85f8d28badb",
- "id": "000078b3-261e-4025-9d81-b8631d8d0000",
- "lastSeenAt": "2017-08-21T08:42:28.964Z",
- "monitor": {
- "alertMessage": "Device is so offline!",
- "alertName": "string",
- "alertSet": true,
- "enabled": true,
- "ignoreAlerts": [
- "internally-generated-alert",
- "test-alert"
], - "monitorDeviceConnected": true,
- "thresholdSec": 10
}, - "orgId": "00682dc2-edb2-4df9-a92c-8c272b7e684b",
- "updatedAt": "2017-08-21T08:42:28.964Z"
}
Updates the threshold or alert used by the monitor specified in the path
monitorID required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 000078b3-261e-4025-9d81-b8631d8d0000 The ID of the monitor, which is an UUID |
alertMessage | string^.{1,256}$ Message of the alert which should be triggered. |
alertName | string Name of the alert which should be triggered. Must be in device model |
enabled | boolean |
ignoreAlerts | Array of strings non-empty It is not recommended to use this setting for devices with more than one monitor. The alerts that should be ignored in the context of monitoring. If any of the listed alerts is generated, the |
monitorDeviceConnected | boolean Default: true It is not recommended to use this setting for devices with more than one monitor. enable/disable the monitoring on connection related event(DeviceSubscribed). |
thresholdSec | number multiple of 1 >= 10 How long after device last communicated alert should be triggered (in seconds) |
{- "alertMessage": "Device is so offline!",
- "alertName": "string",
- "enabled": true,
- "ignoreAlerts": [
- "internally-generated-alert",
- "test-alert"
], - "monitorDeviceConnected": true,
- "thresholdSec": 10
}
{- "createdAt": "2017-08-21T08:42:28.964Z",
- "deviceId": "3962d32d-12ab-4f6f-83ad-d85f8d28badb",
- "id": "000078b3-261e-4025-9d81-b8631d8d0000",
- "lastSeenAt": "2017-08-21T08:42:28.964Z",
- "monitor": {
- "alertMessage": "Device is so offline!",
- "alertName": "string",
- "alertSet": true,
- "enabled": true,
- "ignoreAlerts": [
- "internally-generated-alert",
- "test-alert"
], - "monitorDeviceConnected": true,
- "thresholdSec": 10
}, - "orgId": "00682dc2-edb2-4df9-a92c-8c272b7e684b",
- "updatedAt": "2017-08-21T08:42:28.964Z"
}
The endpoint presented in this section lets you search the logs devices send to the Cloud.
Searches for device logs matching ALL the parameters specified in the request body. If no parameter is specified, the device logs of all the devices you have access to are returned. It also includes the the error messages published to devices/{deviceId}/errors topic because of malformed message.
limit | string [ 1 .. 50 ] ^\d+$ |
offset | string >= 0 ^\d+$ |
deviceIds | Array of strings <uuid> |
levels | Array of integers <= 6 items unique An integer from 0 to 5 which represents Critical, Error, Major, Minor, Debug and Trace |
message | string case-insensitive, wildcards (*) accepted |
Array of objects | |
object |
{- "deviceIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "levels": [
- 0
], - "message": "temperature above",
- "sort": [
- {
- "key": "timestamp",
- "order": "desc"
}
], - "timestamp": {
- "max": "2019-08-24T14:15:22Z",
- "min": "2019-08-24T14:15:22Z"
}
}
{- "data": [
- {
- "deviceId": "d3ad7133-9460-4e81-acd5-0ae3444b148a",
- "level": 4,
- "message": "Your custom log message is here",
- "messageId": "31248",
- "organizationId": "4b43a558-f13d-4b4a-aed1-695712c9d4bb",
- "payload": "{'id':'not UUID','status':'in_progress'}",
- "timestamp": "2017-07-26T09:14:19.732Z",
- "topic": "devices/763c073a-e0ff-41a9-bd51-3386975ea4e3/commands"
}
], - "total": 100
}
Locations can be added to devices or device groups in the form of GPS coordinates or a postal address in the relayr Cloud. The endpoints presented in this section allow you to add and delete locations to and from devices and device groups.
Deletes the location of the entity specified in the path. In this endpoint an entity can be a device or a device group.
entityName required | string Enum: "devices" "device-groups" Example: devices An entity that can be associated with a location. Currently, this can either be 'devices', or 'device-groups'. |
entityId required | string <uuid> Example: cea19e58-a633-4963-b29c-31a990587a5f The id of the entity that is associated with the location needs to be a valid UUID and you must have the necessary permissions for this entity |
{- "error": {
- "details": "Additional details about the error - if applicable",
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Returns the location of the entity specified in the path. In this endpoint an entity can be a device or a device group.
entityName required | string Enum: "devices" "device-groups" Example: devices An entity that can be associated with a location. Currently, this can either be 'devices', or 'device-groups'. |
entityId required | string <uuid> Example: cea19e58-a633-4963-b29c-31a990587a5f The id of the entity that is associated with the location needs to be a valid UUID and you must have the necessary permissions for this entity |
{- "address": "string",
- "city": "string",
- "country": "UA",
- "latitude": -90,
- "longitude": -180,
- "state": "California",
- "zipCode": "string"
}
Adds the location specified in the request body to the entity specified in the path, or updates it. In this endpoint an entity can be a device or a device group. Returns the location if created or updated succesfully.
entityName required | string Enum: "devices" "device-groups" Example: devices An entity that can be associated with a location. Currently, this can either be 'devices', or 'device-groups'. |
entityId required | string <uuid> Example: cea19e58-a633-4963-b29c-31a990587a5f The id of the entity that is associated with the location needs to be a valid UUID and you must have the necessary permissions for this entity |
Location object
longitude required | number [ -180 .. 180 ] number of degrees east |
latitude required | number [ -90 .. 90 ] number of degrees north |
address | string <= 200 characters address of device location |
city | string city of device location |
country | string Country code from ISO 3166-1 alpha-2 standard |
state | string [ 0 .. 100 ] characters state of device location |
zipCode | string zipCode of device location |
{- "address": "string",
- "city": "string",
- "country": "UA",
- "latitude": -90,
- "longitude": -180,
- "state": "California",
- "zipCode": "string"
}
{- "address": "string",
- "city": "string",
- "country": "UA",
- "latitude": -90,
- "longitude": -180,
- "state": "California",
- "zipCode": "string"
}
In the relayr Cloud, configurations can be used to set up devices for specific purposes, for example in order to carry out analytics or edge operations. The endpoints presented in this section allow you to create and manage configurations for your devices.
Creates a configuration for the device specified in the path
deviceId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Device ID |
JSON object describing device configuration
{- "lights": {
- "count": 4,
- "state": "on"
}
}
{- "configuration": {
- "lights": {
- "count": 4,
- "state": "on"
}
}, - "configurationStatus": "success",
- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "createdBy": "fbeea54c-b91c-4a33-989d-2d072bb59234",
- "deliveryStatus": "delivered",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "version": 5
}
Returns the most recent configuration for the device specified in the path
deviceId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Device ID |
{- "configuration": {
- "lights": {
- "count": 4,
- "state": "on"
}
}, - "configurationStatus": "success",
- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "createdBy": "fbeea54c-b91c-4a33-989d-2d072bb59234",
- "deliveryStatus": "delivered",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "version": 5
}
Returns all the configuration versions of the device specified in the path
deviceId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Device ID |
{- "data": [
- {
- "configuration": {
- "lights": {
- "count": 4,
- "state": "on"
}
}, - "configurationStatus": "success",
- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "createdBy": "fbeea54c-b91c-4a33-989d-2d072bb59234",
- "deliveryStatus": "delivered",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "version": 5
}
]
}
Returns the configuration version specified in the path for the device specified in the path
deviceId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Device ID |
version required | integer Example: 3 Version number |
{- "configuration": {
- "lights": {
- "count": 4,
- "state": "on"
}
}, - "configurationStatus": "success",
- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "createdBy": "fbeea54c-b91c-4a33-989d-2d072bb59234",
- "deliveryStatus": "delivered",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "version": 5
}
Create a configuration by deleting a subsection of the latest configuration for the device and key specified in the path. This will create a new version of the configuration by copying the whole JSON and removing the selected subsection. If there are no configurations for a device, the request will be rejected.
deviceId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Device ID |
key required | string^[-A-Za-z0-9+&@#%$?\[\]=~_|!:,;'()*][-A-Za-z0... Example: thresholds.battery_v1\.0.voltage Path to a configuration subsection represented as a dot-separated list of JSON object member names (if a name contains a dot, precede it with "\"). Treated as case-insensitive. |
{- "error": {
- "id": "113faaa1-6165-4439-93b8-ecfb8febc023",
- "message": "Error message"
}
}
Create a configuration by updating a subsection of the latest configuration for the device and key specified in the path. This will create a new version of the configuration by copying the whole JSON and replacing the selected subsection. If there are no configurations for a device, a new one will be created with a single subsection.
deviceId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Device ID |
key required | string^[-A-Za-z0-9+&@#%$?\[\]=~_|!:,;'()*][-A-Za-z0... Example: thresholds.battery_v1\.0.voltage Path to a configuration subsection represented as a dot-separated list of JSON object member names (if a name contains a dot, precede it with "\"). Treated as case-insensitive. |
JSON object describing device configuration subsection
{- "count": 4,
- "state": "on"
}
{- "configuration": {
- "count": 4,
- "state": "on"
}, - "configurationStatus": "success",
- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "createdBy": "fbeea54c-b91c-4a33-989d-2d072bb59234",
- "deliveryStatus": "delivered",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "version": 5
}
Get subsection of latest configuration for the specified device and key. If the configuration data doesn't contain the key, a 404 response is returned.
deviceId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Device ID |
key required | string^[-A-Za-z0-9+&@#%$?\[\]=~_|!:,;'()*][-A-Za-z0... Example: thresholds.battery_v1\.0.voltage Path to a configuration subsection represented as a dot-separated list of JSON object member names (if a name contains a dot, precede it with "\"). Treated as case-insensitive. |
{- "configuration": {
- "count": 4,
- "state": "on"
}, - "configurationStatus": "success",
- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "createdBy": "fbeea54c-b91c-4a33-989d-2d072bb59234",
- "deliveryStatus": "delivered",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "version": 5
}
Returns maximum 5 versions (sorted in descending order) of a configuration subsection specified in the path for the specified device and key. If configuration data doesn't contain the key, a 404 response is returned.
deviceId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Device ID |
key required | string^[-A-Za-z0-9+&@#%$?\[\]=~_|!:,;'()*][-A-Za-z0... Example: thresholds.battery_v1\.0.voltage Path to a configuration subsection represented as a dot-separated list of JSON object member names (if a name contains a dot, precede it with "\"). Treated as case-insensitive. |
limit | integer [ 0 .. 5 ] Default: 5 Pagination limit - maximum number of entities to return |
offset | integer >= 0 Default: 0 Pagination offset |
withusernames | boolean If set and true, user's given and family name if available (otherwise email address) will be attached in response. |
{- "total": 100,
- "data": [
- {
- "configuration": {
- "count": 4,
- "state": "on"
}, - "configurationStatus": "success",
- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "createdBy": "fbeea54c-b91c-4a33-989d-2d072bb59234",
- "deliveryStatus": "delivered",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "version": 5,
- "createdByUserName": "Mathew Dahali"
}
]
}
Returns the configuration version subsection specified in the path for the specified device and key. If the version doesn't exist or the configuration data doesn't contain the key, a 404 response is returned.
deviceId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Device ID |
version required | integer Example: 3 Version number |
key required | string^[-A-Za-z0-9+&@#%$?\[\]=~_|!:,;'()*][-A-Za-z0... Example: thresholds.battery_v1\.0.voltage Path to a configuration subsection represented as a dot-separated list of JSON object member names (if a name contains a dot, precede it with "\"). Treated as case-insensitive. |
{- "configuration": {
- "count": 4,
- "state": "on"
}, - "configurationStatus": "success",
- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "createdBy": "fbeea54c-b91c-4a33-989d-2d072bb59234",
- "deliveryStatus": "delivered",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "version": 5
}
The endpoints presented in this section allow you to install required software and software updates on your virtual or physical devices.
NOTE: You must first create a file model of the update before you can create an installation task. Go to Entities > File Models in the left navigation panel for more information on creating file models.
Returns the installations existing for the device specified in the path
deviceId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Device ID of the task |
installationStatus | string Enum: "unknown" "in_progress" "success" "error" Example: installationStatus=in_progress Latest installation status to filter for |
deliveryStatus | string Enum: "pending" "delivered" "timeout" "aborted" Example: deliveryStatus=delivered Latest delivery status to filter for |
{- "data": [
- {
- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "deliveryStatus": "delivered",
- "description": "Firmware update 1.2.13",
- "deviceId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "deviceName": "test device",
- "end": "2017-11-26T09:14:00.000+02:00",
- "fileModelId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "fileModelVersion": 1,
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "installationError": "Unsupported file",
- "installationStatus": "in_progress",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "orgId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "start": "2017-11-26T09:14:00.000+02:00",
- "updatedAt": "2017-11-26T09:14:00.000+02:00"
}
]
}
Creates an installation for the device specified in the path
deviceId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Device ID of the task |
fileModelId required | string <UUID> ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... |
fileModelVersion required | integer >= 1 |
description | string <= 256 characters Installation description |
end | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... End installation at this point in the future - default 2 hours |
start | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Start installation at this point in the future - default now |
{- "description": "Firmware update 1.2.13",
- "end": "2017-11-26T09:14:00.000+02:00",
- "fileModelId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "fileModelVersion": 1,
- "start": "2017-11-26T09:14:00.000+02:00"
}
{- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "deliveryStatus": "delivered",
- "description": "Firmware update 1.2.13",
- "deviceId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "deviceName": "test device",
- "end": "2017-11-26T09:14:00.000+02:00",
- "fileModelId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "fileModelVersion": 1,
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "installationError": "Unsupported file",
- "installationStatus": "in_progress",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "orgId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "start": "2017-11-26T09:14:00.000+02:00",
- "updatedAt": "2017-11-26T09:14:00.000+02:00"
}
Deletes the installation specified in the path
deviceId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Device ID of the task |
installationId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Installation ID |
{- "error": {
- "id": "1234",
- "message": "An error occured!"
}
}
Returns the installation specified in the path
deviceId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Device ID of the task |
installationId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Installation ID |
installationStatus | string Enum: "unknown" "in_progress" "success" "error" Example: installationStatus=in_progress Latest installation status to filter for |
deliveryStatus | string Enum: "pending" "delivered" "timeout" "aborted" Example: deliveryStatus=delivered Latest delivery status to filter for |
{- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "deliveryStatus": "delivered",
- "description": "Firmware update 1.2.13",
- "deviceId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "deviceName": "test device",
- "end": "2017-11-26T09:14:00.000+02:00",
- "fileModelId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "fileModelVersion": 1,
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "installationError": "Unsupported file",
- "installationStatus": "in_progress",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "orgId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "start": "2017-11-26T09:14:00.000+02:00",
- "updatedAt": "2017-11-26T09:14:00.000+02:00"
}
Updates the installation specified in the path
deviceId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Device ID of the task |
installationId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Installation ID |
description | string <= 256 characters Installation description |
end | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... End installation at this point in the future - default 2 hours |
start | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Start installation at this point in the future - default now |
{- "description": "Firmware update 1.2.13",
- "end": "2017-11-26T09:14:00.000+02:00",
- "start": "2017-11-26T09:14:00.000+02:00"
}
{- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "deliveryStatus": "delivered",
- "description": "Firmware update 1.2.13",
- "deviceId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "deviceName": "test device",
- "end": "2017-11-26T09:14:00.000+02:00",
- "fileModelId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "fileModelVersion": 1,
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "installationError": "Unsupported file",
- "installationStatus": "in_progress",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "orgId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "start": "2017-11-26T09:14:00.000+02:00",
- "updatedAt": "2017-11-26T09:14:00.000+02:00"
}
Cancels the installation specified in the path
deviceId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Device ID of the task |
installationId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Installation ID |
{- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "deliveryStatus": "delivered",
- "description": "Firmware update 1.2.13",
- "deviceId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "deviceName": "test device",
- "end": "2017-11-26T09:14:00.000+02:00",
- "fileModelId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "fileModelVersion": 1,
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "installationError": "Unsupported file",
- "installationStatus": "in_progress",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "orgId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "start": "2017-11-26T09:14:00.000+02:00",
- "updatedAt": "2017-11-26T09:14:00.000+02:00"
}
Returns all installations available in your organization
state | string Enum: "upcoming" "success" "error" "canceled" Filter for one of four different states that an installation can be in: upcoming - (installationStatus is unknown AND deliveryStatus is pending) OR (installationStatus is in_progress AND deliveryStatus is delivered), success - installationStatus = success AND deliveryStatus = delivered, error - (installationStatus = error AND deliveryStatus = delivered) OR deliveryStatus = timeout, canceled - deliveryStatus = aborted |
{- "data": [
- {
- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "deliveryStatus": "delivered",
- "description": "Firmware update 1.2.13",
- "deviceId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "deviceName": "test device",
- "end": "2017-11-26T09:14:00.000+02:00",
- "fileModelId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "fileModelVersion": 1,
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "installationError": "Unsupported file",
- "installationStatus": "in_progress",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "orgId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "start": "2017-11-26T09:14:00.000+02:00",
- "updatedAt": "2017-11-26T09:14:00.000+02:00"
}
]
}
Returns the devices for which the installation associated with the file model specified in the path was successful
fileModelID required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: 000078b3-261e-4025-9d81-b8631d8d0000 File Model ID (UUID) |
installedVersion required | string Example: installedVersion=eq+2 File model version filter. Operators supported: |
{- "data": [
- "1f48ad22-d952-4818-8658-3d8d97b1d7c0"
]
}
In the relayr Cloud, device audit logs are lists of actions performed on a device, e.g. device creation, device update, device deletion. An audit log contains information like timestamps and login information related to the entity which performed the action.
The endpoints presented in this section allow you to retrieve audit logs for devices.
Returns audit logs for all the devices in your organization. Note: audit logs are only kept for 3 months.
start | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: start=2017-09-01T08:00:00+02:00 Beginning of time range (ISO8601) inclusive |
end | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: end=2017-09-01T08:00:00+02:00 End of time range (ISO8601) inclusive |
operation | string Example: operation=DeviceDeleted Operation to filter for |
authEntityId | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: authEntityId=ecbbb77d-b91c-4a33-989d-2d072bb59b68 authorized entity ID that initiated the action |
authEntityType | string Enum: "user" "rule" "device" "device-group" Example: authEntityType=rule authorized entity type that initiated the action |
{- "data": [
- {
- "authEntityId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "authEntityType": "device",
- "entityId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "entityType": "device",
- "metadata": {
- "deviceId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d"
}, - "operation": "DeviceDeleted",
- "orgId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "service": "device-service"
}
]
}
Returns audit logs for the device specified in the path. Note: audit logs are only kept for 3 months.
deviceId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: ecbbb77d-b91c-4a33-989d-2d072bb59b68 Device ID |
start | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: start=2017-09-01T08:00:00+02:00 Beginning of time range (ISO8601) inclusive |
end | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: end=2017-09-01T08:00:00+02:00 End of time range (ISO8601) inclusive |
operation | string Example: operation=DeviceDeleted Operation to filter for |
authEntityId | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: authEntityId=ecbbb77d-b91c-4a33-989d-2d072bb59b68 authorized entity ID that initiated the action |
authEntityType | string Enum: "user" "rule" "device" "device-group" Example: authEntityType=rule authorized entity type that initiated the action |
{- "data": [
- {
- "authEntityId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "authEntityType": "device",
- "entityId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "entityType": "device",
- "metadata": {
- "deviceId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d"
}, - "operation": "DeviceDeleted",
- "orgId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "service": "device-service"
}
]
}
In the relayr Cloud, user audit logs are lists of actions performed on a user, e.g. user creation, user update, user deletion. An audit log contains information like timestamps and login information related to the entity which performed the action.
The endpoints presented in this section allow you to retrieve audit logs for users.
Returns audit logs for all the users in your organization. Note: audit logs are only kept for 3 months.
start | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: start=2017-09-01T08:00:00+02:00 Beginning of time range (ISO8601) inclusive |
end | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: end=2017-09-01T08:00:00+02:00 End of time range (ISO8601) inclusive |
operation | string Example: operation=DeviceDeleted Operation to filter for |
authEntityId | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: authEntityId=ecbbb77d-b91c-4a33-989d-2d072bb59b68 authorized entity ID that initiated the action |
authEntityType | string Enum: "user" "rule" "device" "device-group" Example: authEntityType=rule authorized entity type that initiated the action |
{- "data": [
- {
- "authEntityId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "authEntityType": "device",
- "entityId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "entityType": "device",
- "metadata": {
- "deviceId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d"
}, - "operation": "DeviceDeleted",
- "orgId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "service": "device-service"
}
]
}
Returns audit logs for the user specified in the path. Note: audit logs are only kept for 3 months.
userId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: ecbbb77d-b91c-4a33-989d-2d072bb59b68 User ID |
start | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: start=2017-09-01T08:00:00+02:00 Beginning of time range (ISO8601) inclusive |
end | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: end=2017-09-01T08:00:00+02:00 End of time range (ISO8601) inclusive |
operation | string Example: operation=DeviceDeleted Operation to filter for |
authEntityId | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: authEntityId=ecbbb77d-b91c-4a33-989d-2d072bb59b68 authorized entity ID that initiated the action |
authEntityType | string Enum: "user" "rule" "device" "device-group" Example: authEntityType=rule authorized entity type that initiated the action |
{- "data": [
- {
- "authEntityId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "authEntityType": "device",
- "entityId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "entityType": "device",
- "metadata": {
- "deviceId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d"
}, - "operation": "DeviceDeleted",
- "orgId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "service": "device-service"
}
]
}
In the relayr Cloud, role audit logs are lists of actions performed on a role, e.g. role creation, role update, role deletion. An audit log contains information like timestamps and login information related to the entity which performed the action.
The endpoints presented in this section allow you to retrieve audit logs for roles.
Returns audit logs for all the roles in your organization. Note: audit logs are only kept for 3 months.
start | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: start=2017-09-01T08:00:00+02:00 Beginning of time range (ISO8601) inclusive |
end | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: end=2017-09-01T08:00:00+02:00 End of time range (ISO8601) inclusive |
operation | string Example: operation=DeviceDeleted Operation to filter for |
authEntityId | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: authEntityId=ecbbb77d-b91c-4a33-989d-2d072bb59b68 authorized entity ID that initiated the action |
authEntityType | string Enum: "user" "rule" "device" "device-group" Example: authEntityType=rule authorized entity type that initiated the action |
{- "data": [
- {
- "authEntityId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "authEntityType": "device",
- "entityId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "entityType": "device",
- "metadata": {
- "deviceId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d"
}, - "operation": "DeviceDeleted",
- "orgId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "service": "device-service"
}
]
}
Returns audit logs for the role specified for the path. Note: audit logs are only kept for 3 months.
roleId required | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: ecbbb77d-b91c-4a33-989d-2d072bb59b68 Role ID |
start | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: start=2017-09-01T08:00:00+02:00 Beginning of time range (ISO8601) inclusive |
end | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Example: end=2017-09-01T08:00:00+02:00 End of time range (ISO8601) inclusive |
operation | string Example: operation=DeviceDeleted Operation to filter for |
authEntityId | string <uuid> ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89... Example: authEntityId=ecbbb77d-b91c-4a33-989d-2d072bb59b68 authorized entity ID that initiated the action |
authEntityType | string Enum: "user" "rule" "device" "device-group" Example: authEntityType=rule authorized entity type that initiated the action |
{- "data": [
- {
- "authEntityId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "authEntityType": "device",
- "entityId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "entityType": "device",
- "metadata": {
- "deviceId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d"
}, - "operation": "DeviceDeleted",
- "orgId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "service": "device-service"
}
]
}
Searches for device groups matching custom filter specified as a value of query parameter. That search filter parameter is obligatory and must be in valid SCIM format.
filter required | string Example: filter=customValue eq "customVal" SCIM filter translated into ElasticSearch query. |
limit | integer [ 1 .. 1000 ] Default: 10 Pagination limit - maximum number of entities to return |
offset | integer [ 0 .. 10000 ] Default: 0 Pagination offset. |
locationbox | boolean Default: false If |
{- "data": [
- {
- "address": "Bergmannstrasse 102/103",
- "city": "Berlin",
- "country": "Germany",
- "createdAt": "2017-09-18T20:07:27.412Z",
- "externalId": "SN001",
- "groupId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "groupName": "Group 1",
- "location": {
- "lat": 52.457968934171184,
- "lon": 13.148784131866076
}, - "metadata": {
- "color": "{\"r\":100, \"g\": 12, \"b\": 254}",
- "foo": "bar",
- "houseNumber": 1
}, - "metadataLastModified": "2017-09-18T20:07:27.412Z",
- "modelId": "02c9599d-9ee4-011e7-b5ec-c75f7ba9a53d",
- "modelName": "groupModel",
- "orgId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "parentId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "updatedAt": "2017-09-18T20:07:27.412Z",
- "zipCode": "012345"
}
], - "locationBox": {
- "bottom": 52.3303,
- "left": 13.0535,
- "right": 13.7262,
- "top": 52.6675
}, - "next": "/devices/search/basic?limit=1&offset=2",
- "prev": "string",
- "total": 100
}
Searches for devices matching custom filter specified as a value of query parameter. That search filter parameter is obligatory and must be in valid SCIM format.
filter required | string Example: filter=customValue eq "customVal" SCIM filter translated into ElasticSearch query. |
limit | integer [ 1 .. 1000 ] Default: 10 Pagination limit - maximum number of entities to return |
offset | integer [ 0 .. 10000 ] Default: 0 Pagination offset. |
locationbox | boolean Default: false If |
{- "data": [
- {
- "address": "Bergmannstrasse 102/103",
- "alerts": [
- {
- "displayName": "string",
- "name": "too_hot",
- "severity": 5,
- "state": "set",
- "timestamp": "2017-09-18T20:07:27.412Z"
}
], - "buildVersion": "1.2.ab",
- "city": "Berlin",
- "country": "Germany",
- "createdAt": "2017-09-18T20:07:27.412Z",
- "deviceGroups": [
- {
- "direct": true,
- "id": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "metadata": {
- "color": "{\"r\":100, \"g\": 12, \"b\": 254}",
- "foo": "bar",
- "houseNumber": 1
}, - "model": {
- "id": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "name": "Group Model 1"
}, - "name": "Group 1"
}
], - "deviceId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "deviceModelName": "Roof Device",
- "deviceName": "Device 1",
- "externalId": "SN001002",
- "fileModelIds": [
- "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d"
], - "fileModelVersion": 2,
- "fileModelVersionScheduled": 3,
- "lastActivity": "2017-09-18T20:07:27.412Z",
- "location": {
- "lat": 52.457968934171184,
- "lon": 13.148784131866076
}, - "metadata": {
- "color": "{\"r\":100, \"g\": 12, \"b\": 254}",
- "foo": "bar",
- "houseNumber": 1
}, - "metadataLastModified": "2017-09-18T20:07:27.412Z",
- "modelId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "modelVersion": 1,
- "orgId": "03a9599c-9ee4-11e7-b5ec-c75f7ba9a53d",
- "updatedAt": "2017-09-18T20:07:27.412Z",
- "zipCode": "012345"
}
], - "locationBox": {
- "bottom": 52.3303,
- "left": 13.0535,
- "right": 13.7262,
- "top": 52.6675
}, - "next": "/devices/search/basic?limit=1&offset=2",
- "prev": "string",
- "total": 100
}
Create batch installation for the devices specified in the request body
Request to create a batch installation for given devices
fileModelId required | string <UUID> ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... |
fileModelVersion required | integer >= 1 |
deviceIds required | Array of strings <UUID> List of devices should be included in batch installation |
batchName required | string <= 64 characters User given name to identify a batch installation |
end | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... End installation at this point in the future - default 2 hours |
start | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Start batch installation at this point in the future - default now |
{- "batchName": "test device",
- "deviceIds": [
- "1f48ad22-d952-4818-8658-3d8d97b1d7c0"
], - "end": "2017-11-26T09:14:00.000+02:00",
- "fileModelId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "fileModelVersion": 1,
- "start": "2017-11-26T09:14:00.000+02:00"
}
{- "batchName": "test device",
- "buildVersion": "1.2.4ac",
- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "end": "2017-11-26T09:14:00.000+02:00",
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "installationsCount": 5,
- "start": "2017-11-26T09:14:00.000+02:00",
- "status": "scheduled",
- "updatedAt": "2017-11-26T09:14:00.000+02:00",
- "version": 1
}
Returns all batch installations to which you have access
limit | integer [ 1 .. 1000 ] Pagination limit - maximum number of entities to return |
offset | integer >= 0 Pagination offset |
Search batch installation for given device name and build version
buildVersion | string^(?!\s*$).+ |
name | string^(?!\s*$).+ |
{- "buildVersion": "1.2.ab",
- "name": "new batch"
}
{- "data": [
- {
- "batchName": "test device",
- "buildVersion": "1.2.4ac",
- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "end": "2017-11-26T09:14:00.000+02:00",
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "installationsCount": 5,
- "start": "2017-11-26T09:14:00.000+02:00",
- "status": "success",
- "updatedAt": "2017-11-26T09:14:00.000+02:00",
- "version": 1
}
], - "total": 100
}
Cancels the batch installation specified in the path
batchInstallationId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Batch Installation ID |
{- "batchName": "test device",
- "buildVersion": "1.2.4ac",
- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "end": "2017-11-26T09:14:00.000+02:00",
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "installationsCount": 5,
- "start": "2017-11-26T09:14:00.000+02:00",
- "status": "aborted",
- "updatedAt": "2017-11-26T09:14:00.000+02:00",
- "version": 1
}
Returns all installations existing for the batch specified in the path
batchInstallationId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Batch Installation ID |
{- "data": [
- {
- "createdAt": "2017-11-26T09:14:00.000+02:00",
- "deliveryStatus": "delivered",
- "description": "Firmware update 1.2.13",
- "deviceId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "deviceName": "test device",
- "end": "2017-11-26T09:14:00.000+02:00",
- "fileModelId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "fileModelVersion": 1,
- "id": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "installationError": "Unsupported file",
- "installationStatus": "in_progress",
- "logs": [
- {
- "message": "Preparing firmware update - configuration done - 40%",
- "source": "device",
- "timestamp": "2017-11-26T09:14:00.000+02:00"
}
], - "orgId": "1f48ad22-d952-4818-8658-3d8d97b1d7c0",
- "start": "2017-11-26T09:14:00.000+02:00",
- "updatedAt": "2017-11-26T09:14:00.000+02:00"
}
]
}
Updates the batch and all related installations for specified batch with id in the path.
batchInstallationId required | string^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-... Example: be3faaa1-6165-4439-93b8-ecfb8febc0b7 Batch Installation ID |
end | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... End batch installation at this point in the future - default 2 hours |
start | string <date-time> ^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2]... Start batch installation at this point in the future - default now |
{- "end": "2017-11-26T09:14:00.000+02:00",
- "start": "2017-11-26T09:14:00.000+02:00"
}
{- "error": {
- "id": "1234",
- "message": "An error occured!"
}
}