4.3.3 • Published 2 years ago

node-red-contrib-thingsboard-rest-api v4.3.3

Weekly downloads
-
License
Apache License Ve...
Repository
github
Last release
2 years ago

node-red-contrib-thingsboard-rest-api

Node-RED node for thingsboard-rest-api

ThingsBoard open-source IoT platform REST API documentation.

Install

To install the stable version use the Menu - Manage palette - Install option and search for node-red-contrib-thingsboard-rest-api, or run the following command in your Node-RED user directory, typically ~/.node-red

npm install node-red-contrib-thingsboard-rest-api

Usage

Methods

GET /api/admin/securitySettings

Get the Security Settings object that contains password policy, etc.

Available for users with 'SYS_ADMIN' authority.

Accept : 'application/json'

POST /api/admin/securitySettings

Updates the Security Settings object that contains password policy, etc.

Available for users with 'SYS_ADMIN' authority.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

POST /api/admin/settings

Creates or Updates the Administration Settings. Platform generates random Administration Settings Id during settings creation. The Administration Settings Id will be present in the response. Specify the Administration Settings Id when you would like to update the Administration Settings. Referencing non-existing Administration Settings Id will cause an error.

Available for users with 'SYS_ADMIN' authority.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

POST /api/admin/settings/testMail

Attempts to send test email to the System Administrator User using Mail Settings provided as a parameter. You may change the 'To' email in the user profile of the System Administrator.

Available for users with 'SYS_ADMIN' authority.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

POST /api/admin/settings/testSms

Attempts to send test sms to the System Administrator User using SMS Settings and phone number provided as a parameters of the request.

Available for users with 'SYS_ADMIN' authority.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

GET /api/admin/settings/{key}

Get the Administration Settings object using specified string key. Referencing non-existing key will cause an error.

Available for users with 'SYS_ADMIN' authority.

key : string
 
Accept : 'application/json'

GET /api/admin/updates

Check notifications about new platform releases.

Available for users with 'SYS_ADMIN' authority.

Accept : 'application/json'

POST /api/auth/login

Login method used to authenticate user and get JWT token data.

Value of the response token field can be used as X-Authorization header value:

X-Authorization: Bearer $JWT_TOKEN_VALUE.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

POST /api/alarm

Creates or Updates the Alarm. When creating alarm, platform generates Alarm Id as time-based UUID. The newly created Alarm id will be present in the response. Specify existing Alarm id to update the alarm. Referencing non-existing Alarm Id will cause 'Not Found' error.

Platform also deduplicate the alarms based on the entity id of originator and alarm 'type'. For example, if the user or system component create the alarm with the type 'HighTemperature' for device 'Device A' the new active alarm is created. If the user tries to create 'HighTemperature' alarm for the same device again, the previous alarm will be updated (the 'end_ts' will be set to current timestamp). If the user clears the alarm (see 'Clear Alarm(clearAlarm)'), than new alarm with the same type and same device may be created.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

GET /api/alarm/highestSeverity/{entityType}/{entityId}{?searchStatus,status}

Search the alarms by originator ('entityType' and entityId') and optional 'status' or 'searchStatus' filters and returns the highest AlarmSeverity(CRITICAL, MAJOR, MINOR, WARNING or INDETERMINATE). Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

entityType : string
entityId : string
searchStatus : string
status : string
 
Accept : 'application/json'

GET /api/alarm/info/{alarmId}

Fetch the Alarm Info object based on the provided Alarm Id. If the user has the authority of 'Tenant Administrator', the server checks that the originator of alarm is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the originator of alarm belongs to the customer. Alarm Info is an extension of the default Alarm object that also contains name of the alarm originator.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

alarmId : string
 
Accept : 'application/json'

GET /api/alarm/{alarmId}

Fetch the Alarm object based on the provided Alarm Id. If the user has the authority of 'Tenant Administrator', the server checks that the originator of alarm is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the originator of alarm belongs to the customer.

alarmId : string
 
Accept : 'application/json'

DELETE /api/alarm/{alarmId}

Deletes the Alarm. Referencing non-existing Alarm Id will cause an error.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

alarmId : string
 
Accept : 'application/json'

POST /api/alarm/{alarmId}/ack

Acknowledge the Alarm. Once acknowledged, the 'ack_ts' field will be set to current timestamp and special rule chain event 'ALARM_ACK' will be generated. Referencing non-existing Alarm Id will cause an error.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

alarmId : string
 
Accept : 'application/json'

POST /api/alarm/{alarmId}/clear

Clear the Alarm. Once cleared, the 'clear_ts' field will be set to current timestamp and special rule chain event 'ALARM_CLEAR' will be generated. Referencing non-existing Alarm Id will cause an error.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

alarmId : string
 
Accept : 'application/json'

GET /api/alarm/{entityType}/{entityId}{?endTime,fetchOriginator,page,pageSize,searchStatus,sortOrder,sortProperty,startTime,status,textSearch}

Returns a page of alarms for the selected entity. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

entityType : string
entityId : string
searchStatus : string
status : string
pageSize : integer
page : integer
textSearch : string
sortProperty : string
sortOrder : string
startTime : integer
endTime : integer
fetchOriginator : boolean
 
Accept : 'application/json'

GET /api/alarms{?endTime,fetchOriginator,page,pageSize,searchStatus,sortOrder,sortProperty,startTime,status,textSearch}

Returns a page of alarms that belongs to the current user owner. If the user has the authority of 'Tenant Administrator', the server returns alarms that belongs to the tenant of current user. If the user has the authority of 'Customer User', the server returns alarms that belongs to the customer of current user. Specifying both parameters 'searchStatus' and 'status' at the same time will cause an error. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

searchStatus : string
status : string
pageSize : integer
page : integer
textSearch : string
sortProperty : string
sortOrder : string
startTime : integer
endTime : integer
fetchOriginator : boolean
 
Accept : 'application/json'

POST /api/asset

Creates or Updates the Asset. When creating asset, platform generates Asset Id as time-based UUID. The newly created Asset id will be present in the response. Specify existing Asset id to update the asset. Referencing non-existing Asset Id will cause 'Not Found' error.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

POST /api/asset/bulk_import

There's an ability to import the bulk of assets using the only .csv file.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

GET /api/asset/info/{assetId}

Fetch the Asset Info object based on the provided Asset Id. If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer. Asset Info is an extension of the default Asset object that contains information about the assigned customer name.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

assetId : string
 
Accept : 'application/json'

GET /api/asset/types

Returns a set of unique asset types based on assets that are either owned by the tenant or assigned to the customer which user is performing the request.

Accept : 'application/json'

GET /api/asset/{assetId}

Fetch the Asset object based on the provided Asset Id. If the user has the authority of 'Tenant Administrator', the server checks that the asset is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the asset is assigned to the same customer.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

assetId : string
 
Accept : 'application/json'

DELETE /api/asset/{assetId}

Deletes the asset and all the relations (from and to the asset). Referencing non-existing asset Id will cause an error.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

assetId : string
 
Accept : 'application/json'

POST /api/assets

Returns all assets that are related to the specific entity. The entity id, relation type, asset types, depth of the search, and other query parameters defined using complex 'AssetSearchQuery' object. See 'Model' tab of the Parameters for more info.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

GET /api/assets{?assetIds}

Requested assets must be owned by tenant or assigned to customer which user is performing the request.

assetIds : string
 
Accept : 'application/json'

DELETE /api/customer/asset/{assetId}

Clears assignment of the asset to customer. Customer will not be able to query asset afterwards.

Available for users with 'TENANT_ADMIN' authority.

assetId : string
 
Accept : 'application/json'

POST /api/customer/public/asset/{assetId}

Asset will be available for non-authorized (not logged-in) users. This is useful to create dashboards that you plan to share/embed on a publicly available website. However, users that are logged-in and belong to different tenant will not be able to access the asset.

Available for users with 'TENANT_ADMIN' authority.

assetId : string
 
Accept : 'application/json'

POST /api/customer/{customerId}/asset/{assetId}

Creates assignment of the asset to customer. Customer will be able to query asset afterwards.

Available for users with 'TENANT_ADMIN' authority.

customerId : string
assetId : string
 
Accept : 'application/json'

GET /api/customer/{customerId}/assetInfos{?page,pageSize,sortOrder,sortProperty,textSearch,type}

Returns a page of assets info objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Asset Info is an extension of the default Asset object that contains information about the assigned customer name.

customerId : string
pageSize : integer
page : integer
type : string
textSearch : string
sortProperty : string
sortOrder : string
 
Accept : 'application/json'

GET /api/customer/{customerId}/assets{?page,pageSize,sortOrder,sortProperty,textSearch,type}

Returns a page of assets objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

customerId : string
pageSize : integer
page : integer
type : string
textSearch : string
sortProperty : string
sortOrder : string
 
Accept : 'application/json'

POST /api/edge/{edgeId}/asset/{assetId}

Creates assignment of an existing asset to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment asset (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once asset will be delivered to edge service, it's going to be available for usage on remote edge instance.

edgeId : string
assetId : string
 
Accept : 'application/json'

DELETE /api/edge/{edgeId}/asset/{assetId}

Clears assignment of the asset to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove asset (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove asset locally.

edgeId : string
assetId : string
 
Accept : 'application/json'

GET /api/edge/{edgeId}/assets{?endTime,page,pageSize,sortOrder,sortProperty,startTime,textSearch,type}

Returns a page of assets assigned to edge. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

edgeId : string
pageSize : integer
page : integer
type : string
textSearch : string
sortProperty : string
sortOrder : string
startTime : integer
endTime : integer
 
Accept : 'application/json'

GET /api/tenant/assetInfos{?page,pageSize,sortOrder,sortProperty,textSearch,type}

Returns a page of assets info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Asset Info is an extension of the default Asset object that contains information about the assigned customer name.

Available for users with 'TENANT_ADMIN' authority.

pageSize : integer
page : integer
type : string
textSearch : string
sortProperty : string
sortOrder : string
 
Accept : 'application/json'

GET /api/tenant/assets{?assetName}

Requested asset must be owned by tenant that the user belongs to. Asset name is an unique property of asset. So it can be used to identify the asset.

Available for users with 'TENANT_ADMIN' authority.

assetName : string
 
Accept : 'application/json'

GET /api/tenant/assets{?page,pageSize,sortOrder,sortProperty,textSearch,type}

Returns a page of assets owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

Available for users with 'TENANT_ADMIN' authority.

pageSize : integer
page : integer
type : string
textSearch : string
sortProperty : string
sortOrder : string
 
Accept : 'application/json'

GET /api/audit/logs/customer/{customerId}{?actionTypes,endTime,page,pageSize,sortOrder,sortProperty,startTime,textSearch}

Returns a page of audit logs related to the targeted customer entities (devices, assets, etc.), and users actions (login, logout, etc.) that belong to this customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

Available for users with 'TENANT_ADMIN' authority.

customerId : string
pageSize : integer
page : integer
textSearch : string
sortProperty : string
sortOrder : string
startTime : integer
endTime : integer
actionTypes : string
 
Accept : 'application/json'

GET /api/audit/logs/entity/{entityType}/{entityId}{?actionTypes,endTime,page,pageSize,sortOrder,sortProperty,startTime,textSearch}

Returns a page of audit logs related to the actions on the targeted entity. Basically, this API call is used to get the full lifecycle of some specific entity. For example to see when a device was created, updated, assigned to some customer, or even deleted from the system. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

Available for users with 'TENANT_ADMIN' authority.

entityType : string
entityId : string
pageSize : integer
page : integer
textSearch : string
sortProperty : string
sortOrder : string
startTime : integer
endTime : integer
actionTypes : string
 
Accept : 'application/json'

GET /api/audit/logs/user/{userId}{?actionTypes,endTime,page,pageSize,sortOrder,sortProperty,startTime,textSearch}

Returns a page of audit logs related to the actions of targeted user. For example, RPC call to a particular device, or alarm acknowledgment for a specific device, etc. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

Available for users with 'TENANT_ADMIN' authority.

userId : string
pageSize : integer
page : integer
textSearch : string
sortProperty : string
sortOrder : string
startTime : integer
endTime : integer
actionTypes : string
 
Accept : 'application/json'

GET /api/audit/logs{?actionTypes,endTime,page,pageSize,sortOrder,sortProperty,startTime,textSearch}

Returns a page of audit logs related to all entities in the scope of the current user's Tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

Available for users with 'TENANT_ADMIN' authority.

pageSize : integer
page : integer
textSearch : string
sortProperty : string
sortOrder : string
startTime : integer
endTime : integer
actionTypes : string
 
Accept : 'application/json'

POST /api/auth/changePassword

Change the password for the User which credentials are used to perform this REST API call. Be aware that previously generated JWT tokens will be still valid until they expire.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

POST /api/auth/logout

Special API call to record the 'logout' of the user to the Audit Logs. Since platform uses JWT, the actual logout is the procedure of clearing the JWT token on the client side.

Accept : 'application/json'

GET /api/auth/user

Get the information about the User which credentials are used to perform this REST API call.

Accept : 'application/json'

GET /api/noauth/activate{?activateToken}

Checks the activation token and forwards user to 'Create Password' page. If token is valid, returns '303 See Other' (redirect) response code with the correct address of 'Create Password' page and same 'activateToken' specified in the URL parameters. If token is not valid, returns '409 Conflict'.

activateToken : string
 
Accept : 'application/json'

POST /api/noauth/activate{?sendActivationMail}

Checks the activation token and updates corresponding user password in the database. Now the user may start using his password to login. The response already contains the JWT activation and refresh tokens, to simplify the user activation flow and avoid asking user to input password again after activation. If token is valid, returns the object that contains JWT access and refresh tokens. If token is not valid, returns '404 Bad Request'.

sendActivationMail : boolean
body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

POST /api/noauth/resetPassword

Checks the password reset token and updates the password. If token is valid, returns the object that contains JWT access and refresh tokens. If token is not valid, returns '404 Bad Request'.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

POST /api/noauth/resetPasswordByEmail

Request to send the reset password email if the user with specified email address is present in the database. Always return '200 OK' status for security purposes.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

GET /api/noauth/resetPassword{?resetToken}

Checks the password reset token and forwards user to 'Reset Password' page. If token is valid, returns '303 See Other' (redirect) response code with the correct address of 'Reset Password' page and same 'resetToken' specified in the URL parameters. If token is not valid, returns '409 Conflict'.

resetToken : string
 
Accept : 'application/json'

GET /api/noauth/userPasswordPolicy

API call to get the password policy for the password validation form(s).

Accept : 'application/json'

GET /api/component/{componentDescriptorClazz}

Gets the Component Descriptor object using class name from the path parameters. Each Component Descriptor represents configuration of specific rule node (e.g. 'Save Timeseries' or 'Send Email'.). The Component Descriptors are used by the rule chain Web UI to build the configuration forms for the rule nodes. The Component Descriptors are discovered at runtime by scanning the class path and searching for @RuleNode annotation. Once discovered, the up to date list of descriptors is persisted to the database.

Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.

componentDescriptorClazz : string
 
Accept : 'application/json'

GET /api/components/{componentType}{?ruleChainType}

Gets the Component Descriptors using rule node type and optional rule chain type request parameters. Each Component Descriptor represents configuration of specific rule node (e.g. 'Save Timeseries' or 'Send Email'.). The Component Descriptors are used by the rule chain Web UI to build the configuration forms for the rule nodes. The Component Descriptors are discovered at runtime by scanning the class path and searching for @RuleNode annotation. Once discovered, the up to date list of descriptors is persisted to the database.

Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.

componentType : string
ruleChainType : string
 
Accept : 'application/json'

GET /api/components{?componentTypes,ruleChainType}

Gets the Component Descriptors using coma separated list of rule node types and optional rule chain type request parameters. Each Component Descriptor represents configuration of specific rule node (e.g. 'Save Timeseries' or 'Send Email'.). The Component Descriptors are used by the rule chain Web UI to build the configuration forms for the rule nodes. The Component Descriptors are discovered at runtime by scanning the class path and searching for @RuleNode annotation. Once discovered, the up to date list of descriptors is persisted to the database.

Available for users with 'SYS_ADMIN' or 'TENANT_ADMIN' authority.

componentTypes : string
ruleChainType : string
 
Accept : 'application/json'

POST /api/customer

Creates or Updates the Customer. When creating customer, platform generates Customer Id as time-based UUID. The newly created Customer Id will be present in the response. Specify existing Customer Id to update the Customer. Referencing non-existing Customer Id will cause 'Not Found' error.

Available for users with 'TENANT_ADMIN' authority.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

GET /api/customer/{customerId}

Get the Customer object based on the provided Customer Id. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

customerId : string
 
Accept : 'application/json'

DELETE /api/customer/{customerId}

Deletes the Customer and all customer Users. All assigned Dashboards, Assets, Devices, etc. will be unassigned but not deleted. Referencing non-existing Customer Id will cause an error.

Available for users with 'TENANT_ADMIN' authority.

customerId : string
 
Accept : 'application/json'

GET /api/customer/{customerId}/shortInfo

Get the short customer object that contains only the title and 'isPublic' flag. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

customerId : string
 
Accept : 'application/json'

GET /api/customer/{customerId}/title

Get the title of the customer. If the user has the authority of 'Tenant Administrator', the server checks that the customer is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the user belongs to the customer.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

customerId : string
 
Accept : 'application/json'

GET /api/customers{?page,pageSize,sortOrder,sortProperty,textSearch}

Returns a page of customers owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

Available for users with 'TENANT_ADMIN' authority.

pageSize : integer
page : integer
textSearch : string
sortProperty : string
sortOrder : string
 
Accept : 'application/json'

GET /api/tenant/customers{?customerTitle}

Get the Customer using Customer Title.

Available for users with 'TENANT_ADMIN' authority.

customerTitle : string
 
Accept : 'application/json'

POST /api/customer/public/dashboard/{dashboardId}

Assigns the dashboard to a special, auto-generated 'Public' Customer. Once assigned, unauthenticated users may browse the dashboard. This method is useful if you like to embed the dashboard on public web pages to be available for users that are not logged in. Be aware that making the dashboard public does not mean that it automatically makes all devices and assets you use in the dashboard to be public.Use assign Asset to Public Customer and assign Device to Public Customer for this purpose. Returns the Dashboard object.

Available for users with 'TENANT_ADMIN' authority.

dashboardId : string
 
Accept : 'application/json'

DELETE /api/customer/public/dashboard/{dashboardId}

Unassigns the dashboard from a special, auto-generated 'Public' Customer. Once unassigned, unauthenticated users may no longer browse the dashboard. Returns the Dashboard object.

Available for users with 'TENANT_ADMIN' authority.

dashboardId : string
 
Accept : 'application/json'

POST /api/customer/{customerId}/dashboard/{dashboardId}

Assign the Dashboard to specified Customer or do nothing if the Dashboard is already assigned to that Customer. Returns the Dashboard object.

Available for users with 'TENANT_ADMIN' authority.

customerId : string
dashboardId : string
 
Accept : 'application/json'

DELETE /api/customer/{customerId}/dashboard/{dashboardId}

Unassign the Dashboard from specified Customer or do nothing if the Dashboard is already assigned to that Customer. Returns the Dashboard object.

Available for users with 'TENANT_ADMIN' authority.

customerId : string
dashboardId : string
 
Accept : 'application/json'

GET /api/customer/{customerId}/dashboards{?mobile,page,pageSize,sortOrder,sortProperty,textSearch}

Returns a page of dashboard info objects owned by the specified customer. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

customerId : string
pageSize : integer
page : integer
mobile : boolean
textSearch : string
sortProperty : string
sortOrder : string
 
Accept : 'application/json'

POST /api/dashboard

Create or update the Dashboard. When creating dashboard, platform generates Dashboard Id as time-based UUID. The newly created Dashboard id will be present in the response. Specify existing Dashboard id to update the dashboard. Referencing non-existing dashboard Id will cause 'Not Found' error.

Available for users with 'TENANT_ADMIN' authority.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

GET /api/dashboard/home

Returns the home dashboard object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the User. If 'homeDashboardId' parameter is not set on the User level and the User has authority 'CUSTOMER_USER', check the same parameter for the corresponding Customer. If 'homeDashboardId' parameter is not set on the User and Customer levels then checks the same parameter for the Tenant that owns the user. The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

Accept : 'application/json'

GET /api/dashboard/home/info

Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the User. If 'homeDashboardId' parameter is not set on the User level and the User has authority 'CUSTOMER_USER', check the same parameter for the corresponding Customer. If 'homeDashboardId' parameter is not set on the User and Customer levels then checks the same parameter for the Tenant that owns the user.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

Accept : 'application/json'

GET /api/dashboard/info/{dashboardId}

Get the information about the dashboard based on 'dashboardId' parameter. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON.

dashboardId : string
 
Accept : 'application/json'

GET /api/dashboard/maxDatapointsLimit

Get the maximum number of data points that dashboard may request from the server per in a single subscription command. This value impacts the time window behavior. It impacts 'Max values' parameter in case user selects 'None' as 'Data aggregation function'. It also impacts the 'Grouping interval' in case of any other 'Data aggregation function' is selected. The actual value of the limit is configurable in the system configuration file.

Accept : 'application/json'

GET /api/dashboard/serverTime

Get the server time (milliseconds since January 1, 1970 UTC). Used to adjust view of the dashboards according to the difference between browser and server time.

Accept : 'application/json'

GET /api/dashboard/{dashboardId}

Get the dashboard based on 'dashboardId' parameter. The Dashboard object is a heavyweight object that contains information about the dashboard (e.g. title, image, assigned customers) and also configuration JSON (e.g. layouts, widgets, entity aliases).

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

dashboardId : string
 
Accept : 'application/json'

DELETE /api/dashboard/{dashboardId}

Delete the Dashboard.

Available for users with 'TENANT_ADMIN' authority.

dashboardId : string
 
Accept : 'application/json'

POST /api/dashboard/{dashboardId}/customers

Updates the list of Customers that this Dashboard is assigned to. Removes previous assignments to customers that are not in the provided list. Returns the Dashboard object.

Available for users with 'TENANT_ADMIN' authority.

dashboardId : string
body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

POST /api/dashboard/{dashboardId}/customers/add

Adds the list of Customers to the existing list of assignments for the Dashboard. Keeps previous assignments to customers that are not in the provided list. Returns the Dashboard object.

Available for users with 'TENANT_ADMIN' authority.

dashboardId : string
body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

POST /api/dashboard/{dashboardId}/customers/remove

Removes the list of Customers from the existing list of assignments for the Dashboard. Keeps other assignments to customers that are not in the provided list. Returns the Dashboard object.

Available for users with 'TENANT_ADMIN' authority.

dashboardId : string
body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

POST /api/edge/{edgeId}/dashboard/{dashboardId}

Creates assignment of an existing dashboard to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment dashboard (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once dashboard will be delivered to edge service, it's going to be available for usage on remote edge instance.

Available for users with 'TENANT_ADMIN' authority.

edgeId : string
dashboardId : string
 
Accept : 'application/json'

DELETE /api/edge/{edgeId}/dashboard/{dashboardId}

Clears assignment of the dashboard to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove dashboard (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove dashboard locally.

Available for users with 'TENANT_ADMIN' authority.

edgeId : string
dashboardId : string
 
Accept : 'application/json'

GET /api/edge/{edgeId}/dashboards{?page,pageSize,sortOrder,sortProperty,textSearch}

Returns a page of dashboard info objects assigned to the specified edge. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

edgeId : string
pageSize : integer
page : integer
textSearch : string
sortProperty : string
sortOrder : string
 
Accept : 'application/json'

GET /api/tenant/dashboard/home/info

Returns the home dashboard info object that is configured as 'homeDashboardId' parameter in the 'additionalInfo' of the corresponding tenant.

Available for users with 'TENANT_ADMIN' authority.

Accept : 'application/json'

POST /api/tenant/dashboard/home/info

Update the home dashboard assignment for the current tenant.

Available for users with 'TENANT_ADMIN' authority.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

GET /api/tenant/dashboards{?mobile,page,pageSize,sortOrder,sortProperty,textSearch}

Returns a page of dashboard info objects owned by the tenant of a current user. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

Available for users with 'TENANT_ADMIN' authority.

pageSize : integer
page : integer
mobile : boolean
textSearch : string
sortProperty : string
sortOrder : string
 
Accept : 'application/json'

GET /api/tenant/{tenantId}/dashboards{?page,pageSize,sortOrder,sortProperty,textSearch}

Returns a page of dashboard info objects owned by tenant. The Dashboard Info object contains lightweight information about the dashboard (e.g. title, image, assigned customers) but does not contain the heavyweight configuration JSON. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

Available for users with 'SYS_ADMIN' authority.

tenantId : string
pageSize : integer
page : integer
textSearch : string
sortProperty : string
sortOrder : string
 
Accept : 'application/json'

DELETE /api/customer/device/{deviceId}

Clears assignment of the device to customer. Customer will not be able to query device afterwards.

Available for users with 'TENANT_ADMIN' authority.

deviceId : string
 
Accept : 'application/json'

POST /api/customer/device/{deviceName}/claim

Claiming makes it possible to assign a device to the specific customer using device/server side claiming data (in the form of secret key).To make this happen you have to provide unique device name and optional claiming data (it is needed only for device-side claiming).Once device is claimed, the customer becomes its owner and customer users may access device data as well as control the device. In order to enable claiming devices feature a system parameter security.claim.allowClaimingByDefault should be set to true, otherwise a server-side claimingAllowed attribute with the value true is obligatory for provisioned devices. See official documentation for more details regarding claiming.

Available for users with 'CUSTOMER_USER' authority.

deviceName : string
body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

DELETE /api/customer/device/{deviceName}/claim

Reclaiming means the device will be unassigned from the customer and the device will be available for claiming again.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

deviceName : string
 
Accept : 'application/json'

POST /api/customer/public/device/{deviceId}

Device will be available for non-authorized (not logged-in) users. This is useful to create dashboards that you plan to share/embed on a publicly available website. However, users that are logged-in and belong to different tenant will not be able to access the device.

Available for users with 'TENANT_ADMIN' authority.

deviceId : string
 
Accept : 'application/json'

POST /api/customer/{customerId}/device/{deviceId}

Creates assignment of the device to customer. Customer will be able to query device afterwards.

Available for users with 'TENANT_ADMIN' authority.

customerId : string
deviceId : string
 
Accept : 'application/json'

GET /api/customer/{customerId}/deviceInfos{?deviceProfileId,page,pageSize,sortOrder,sortProperty,textSearch,type}

Returns a page of devices info objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

customerId : string
pageSize : integer
page : integer
type : string
deviceProfileId : string
textSearch : string
sortProperty : string
sortOrder : string
 
Accept : 'application/json'

GET /api/customer/{customerId}/devices{?page,pageSize,sortOrder,sortProperty,textSearch,type}

Returns a page of devices objects assigned to customer. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

customerId : string
pageSize : integer
page : integer
type : string
textSearch : string
sortProperty : string
sortOrder : string
 
Accept : 'application/json'

POST /api/device-with-credentials

Create or update the Device. When creating device, platform generates Device Id as time-based UUID. Requires to provide the Device Credentials object as well. Useful to create device and credentials in one request. You may find the example of LwM2M device and RPK credentials below:

{
  "device": {
    "name": "LwRpk00000000",
    "type": "lwm2mProfileRpk"
  },
  "credentials": {
    "id": "null",
    "createdTime": 0,
    "deviceId": "null",
    "credentialsType": "LWM2M_CREDENTIALS",
    "credentialsId": "LwRpk00000000",
    "credentialsValue": {
      "client": {
        "endpoint": "LwRpk00000000",
        "securityConfigClientMode": "RPK",
        "key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ=="
      },
      "bootstrap": {
        "bootstrapServer": {
          "securityMode": "RPK",
          "clientPublicKeyOrId": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==",
          "clientSecretKey": "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V"
        },
        "lwm2mServer": {
          "securityMode": "RPK",
          "clientPublicKeyOrId": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEUEBxNl/RcYJNm8mk91CyVXoIJiROYDlXcSSqK6e5bDHwOW4ZiN2lNnXalyF0Jxw8MbAytnDMERXyAja5VEMeVQ==",
          "clientSecretKey": "MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgd9GAx7yZW37autew5KZykn4IgRpge/tZSjnudnZJnMahRANCAARQQHE2X9Fxgk2byaT3ULJVeggmJE5gOVdxJKorp7lsMfA5bhmI3aU2ddqXIXQnHDwxsDK2cMwRFfICNrlUQx5V"
        }
      }
    }
  }
}

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

POST /api/device/bulk_import

There's an ability to import the bulk of devices using the only .csv file.

Available for users with 'TENANT_ADMIN' authority.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

POST /api/device/credentials

During device creation, platform generates random 'ACCESS_TOKEN' credentials. Use this method to update the device credentials. First use 'getDeviceCredentialsByDeviceId' to get the credentials id and value. Then use current method to update the credentials type and value. It is not possible to create multiple device credentials for the same device. The structure of device credentials id and value is simple for the 'ACCESS_TOKEN' but is much more complex for the 'MQTT_BASIC' or 'LWM2M_CREDENTIALS'.

Available for users with 'TENANT_ADMIN' authority.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

GET /api/device/info/{deviceId}

Fetch the Device Info object based on the provided Device Id. If the user has the authority of 'Tenant Administrator', the server checks that the device is owned by the same tenant. If the user has the authority of 'Customer User', the server checks that the device is assigned to the same customer. Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

deviceId : string
 
Accept : 'application/json'

GET /api/device/types

Returns a set of unique device profile names based on devices that are either owned by the tenant or assigned to the customer which user is performing the request.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

Accept : 'application/json'

GET /api/device/{deviceId}

Fetch the Device object based on the provided Device Id. If the user has the authority of 'TENANT_ADMIN', the server checks that the device is owned by the same tenant. If the user has the authority of 'CUSTOMER_USER', the server checks that the device is assigned to the same customer.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

deviceId : string
 
Accept : 'application/json'

DELETE /api/device/{deviceId}

Deletes the device, it's credentials and all the relations (from and to the device). Referencing non-existing device Id will cause an error.

Available for users with 'TENANT_ADMIN' authority.

deviceId : string
 
Accept : 'application/json'

GET /api/device/{deviceId}/credentials

If during device creation there wasn't specified any credentials, platform generates random 'ACCESS_TOKEN' credentials.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

deviceId : string
 
Accept : 'application/json'

POST /api/devices

Returns all devices that are related to the specific entity. The entity id, relation type, device types, depth of the search, and other query parameters defined using complex 'DeviceSearchQuery' object. See 'Model' tab of the Parameters for more info.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

GET /api/devices/count/{otaPackageType}/{deviceProfileId}

The platform gives an ability to load OTA (over-the-air) packages to devices. It can be done in two different ways: device scope or device profile scope.In the response you will find the number of devices with specified device profile, but without previously defined device scope OTA package. It can be useful when you want to define number of devices that will be affected with future OTA package

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

otaPackageType : string
deviceProfileId : string
 
Accept : 'application/json'

GET /api/devices{?deviceIds}

Requested devices must be owned by tenant or assigned to customer which user is performing the request.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

deviceIds : string
 
Accept : 'application/json'

POST /api/device{?accessToken}

Create or update the Device. When creating device, platform generates Device Id as time-based UUID. Device credentials are also generated if not provided in the 'accessToken' request parameter. The newly created device id will be present in the response. Specify existing Device id to update the device. Referencing non-existing device Id will cause 'Not Found' error.

Device name is unique in the scope of tenant. Use unique identifiers like MAC or IMEI for the device names and non-unique 'label' field for user-friendly visualization purposes.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

accessToken : string
body : 
 
Accept : 'application/json'
Content-Type : 'application/json'

POST /api/edge/{edgeId}/device/{deviceId}

Creates assignment of an existing device to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment device (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once device will be delivered to edge service, it's going to be available for usage on remote edge instance.

Available for users with 'TENANT_ADMIN' authority.

edgeId : string
deviceId : string
 
Accept : 'application/json'

DELETE /api/edge/{edgeId}/device/{deviceId}

Clears assignment of the device to the edge. Unassignment works in async way - first, 'unassign' notification event pushed to edge queue on platform. Second, remote edge service will receive an 'unassign' command to remove device (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once 'unassign' command will be delivered to edge service, it's going to remove device locally.

Available for users with 'TENANT_ADMIN' authority.

edgeId : string
deviceId : string
 
Accept : 'application/json'

GET /api/edge/{edgeId}/devices{?endTime,page,pageSize,sortOrder,sortProperty,startTime,textSearch,type}

Returns a page of devices assigned to edge. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

Available for users with 'TENANT_ADMIN' or 'CUSTOMER_USER' authority.

edgeId : string
pageSize : integer
page : integer
type : string
textSearch : string
sortProperty : string
sortOrder : string
startTime : integer
endTime : integer
 
Accept : 'application/json'

GET /api/tenant/deviceInfos{?deviceProfileId,page,pageSize,sortOrder,sortProperty,textSearch,type}

Returns a page of devices info objects owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details. Device Info is an extension of the default Device object that contains information about the assigned customer name and device profile name.

Available for users with 'TENANT_ADMIN' authority.

pageSize : integer
page : integer
type : string
deviceProfileId : string
textSearch : string
sortProperty : string
sortOrder : string
 
Accept : 'application/json'

GET /api/tenant/devices{?deviceName}

Requested device must be owned by tenant that the user belongs to. Device name is an unique property of device. So it can be used to identify the device.

Available for users with 'TENANT_ADMIN' authority.

deviceName : string
 
Accept : 'application/json'

GET /api/tenant/devices{?page,pageSize,sortOrder,sortProperty,textSearch,type}

Returns a page of devices owned by tenant. You can specify parameters to filter the results. The result is wrapped with PageData object that allows you to iterate over result set using pagination. See the 'Model' tab of the Response Class for more details.

Available for users with 'TENANT_ADMIN' authority.

pageSize : integer
page : integer
type : string
textSearch : string
sortProperty : string
sortOrder : string
 
Accept : 'application/json'

POST /api/tenant/{tenantId}/device/{deviceId}

Creates assignment of the device to tenant. Thereafter tenant will be able to reassign the device to a customer.

Available for users with 'TENANT_ADMIN' authority.

tenantId : string
deviceId : string
 
Accept : 'application/json'

POST /api/deviceProfile

Create or update the Device Profile. When creating device profile, platform generates device profile id as time-based UUID. The newly created device profile id will be present in the response. Specify existing device profile id to update the device profile. Referencing non-existing device profile Id will cause 'Not Found' error.

Device profile name is unique in the scope of tenant. Only one 'default' device profile may exist in scope of tenant.

Device profile data definition

Device profile data object contains alarm rules configuration, device provision strategy and transport type configuration for device connectivity. Let's review some examples. First one is the default device profile data configuration and second one - the custom one.

{
   "alarms":[
   ],
   "configuration":{
      "type":"DEFAULT"
   },
   "provisionConfiguration":{
      "type":"DISABLED",
      "provisionDeviceSecret":null
   },
   "transportConfiguration":{
      "type":"DEFAULT"
   }
}
{
   "alarms":[
      {
         "id":"2492b935-1226-59e9-8615-17d8978a4f93",
         "alarmType":"Temperature Alarm",
         "clearRule":{
            "schedule":null,
            "condition":{
               "spec":{
                  "type":"SIMPLE"
               },
               "condition":[
                  {
                     "key":{
                        "key":"temperature",
                        "type":"TIME_SERIES"
                     },
                     "value":null,
                     "predicate":{
                        "type":"NUMERIC",
                        "value":{
                           "userValue":null,
                           "defaultValue":30.0,
                           "dynamicValue":null
                        },
                        "operation":"LESS"
                     },
                     "valueType":"NUMERIC"
                  }
               ]
            },
            "dashboardId":null,
            "alarmDetails":null
         },
         "propagate":false,
         "createRules":{
            "MAJOR":{
               "schedule":{
                  "type":"SPECIFIC_TIME",
                  "endsOn":64800000,
                  "startsOn":43200000,
                  "timezone":"Europe/Kiev",
                  "daysOfWeek":[
                     1,
                     3,
                     5
                  ]
               },
               "condition":{
                  "spec":{
                     "type":"DURATION",
                     "unit":"MINUTES",
                     "predicate":{
                        "userValue":null,
                        "defaultValue":30,
                        "dynamicValue":null
                     }
                  },
                  "condition":[
                     {
                        "key":{
                           "key":"temperature",
                           "type":"TIME_SERIES"
                        },
                        "value":null,
                        "predicate":{
                           "type":"COMPLEX",
                           "operation":"OR",
                           "predicates":[
                              {
                                 "type":"NUMERIC",
                                 "value":{
                                    "userValue":null,
                                    "defaultValue":50.0,
                                    "dynamicValue":null
                                 },
                                 "operation":"LESS_OR_EQUAL"
                              },
                              {
                                 "type":"NUMERIC",
                                 "value":{
                                    "userValue":null,
                                    "defaultValue":30.0,
                                    "dynamicValue":null
                                 },
                                 "operation":"GREATER"
                              }
                           ]
                        },
                        "valueType":"NUMERIC"
                     }
                  ]
               },
               "dashboardId":null,
               "alarmDetails":null
            },
            "WARNING":{
               "schedule":{
                  "type":"CUSTOM",
                  "items":[
                     {
                        "endsOn":0,
                        "enabled":false,
                        "startsOn":0,
                        "dayOfWeek":1
                     },
                     {
                        "endsOn":64800000,
                        "enabled":true,
                        "startsOn":43200000,
                        "dayOfWeek":2
                     },
                     {
                        "endsOn":0,
                        "enabled":false,
                        "startsOn":0,
                        "dayOfWeek":3
                     },
                     {
                        "endsOn":57600000,
                        "enabled":true,
                        "startsOn":36000000,
                        "dayOfWeek":4
                     },
                     {
                        "endsOn":0,
                        "enabled":false,
                        "startsOn":0,
                        "dayOfWeek":5
                     },
                     {
                        "endsOn":0,
                        "enabled":false,
                        "startsOn":0,
                        "dayOfWeek":6
                     },
                     {
                        "endsOn":0,
                        "enabled":false,
                        "startsOn":0,
                        "dayOfWeek":7
                     }
                  ],
                  "timezone":"Europe/Kiev"
               },
               "condition":{
                  "spec":{
                     "type":"REPEATING",
                     "predicate":{
                        "userValue":null,
                        "defaultValue":5,
                        "dynamicValue":null
                     }
                  },
                  "condition":[
                     {
                        "key":{
                           "key":"tempConstant",
                           "type":"CONSTANT"
                        },
                        "value":30,
                        "predicate":{
                           "type":"NUMERIC",
                           "value":{
                              "userValue":null,
                              "defaultValue":0.0,
                              "dynamicValue":{
                                 "inherit":false,
                                 "sourceType":"CURRENT_DEVICE",
                                 "sourceAttribute":"tempThreshold"
                              }
                           },
                           "operation":"EQUAL"
                        },
                        "valueType":"NUMERIC"
                     }
                  ]
               },
               "dashboardId":null,
               "alarmDetails":null
            },
            "CRITICAL":{
               "schedule":null,
               "condition":{
                  "spec":{
                     "type":"SIMPLE"
                  },
                  "condition":[
                     {
                        "key":{
                           "key":"temperature",
                           "type":"TIME_SERIES"
                        },
                        "value":null,
                        "predicate":{
                           "type":"NUMERIC",
                           "value":{
                              "userValue":null,
                              "defaultValue":50.0,
                              "dynamicValue":null
                           },
                           "operation":"GREATER"
                        },
                        "valueType":"NUMERIC"
                     }
                  ]
               },
               "dashboardId":null,
               "alarmDetails":null
            }
         },
         "propagateRelationTypes":null
      }
   ],
   "configuration":{
      "type":"DEFAULT"
   },
   "provisionConfiguration":{
      "type":"ALLOW_CREATE_NEW_DEVICES",
      "provisionDeviceSecret":"vaxb9hzqdbz3oqukvomg"
   },
   "transportConfiguration":{
      "type":"MQTT",
      "deviceTelemetryTopic":"v1/devices/me/telemetry",
      "deviceAttributesTopic":"v1/devices/me/attributes",
      "transportPayloadTypeConfiguration":{
         "transportPayloadType":"PROTOBUF",
         "deviceTelemetryProtoSchema":"syntax =\"proto3\";\npackage telemetry;\n\nmessage SensorDataReading {\n\n  optional double temperature = 1;\n  optional double humidity = 2;\n  InnerObject innerObject = 3;\n\n  message InnerObject {\n    optional string key1 = 1;\n    optional bool key2 = 2;\n    optional double key3 = 3;\n    optional int32 key4 = 4;\n    optional string key5 = 5;\n  }\n}",
         "deviceAttributesProtoSchema":"syntax =\"proto3\";\npackage attributes;\n\nmessage SensorConfiguration {\n  optional string firmwareVersion = 1;\n  optional string serialNumber = 2;\n}",
         "deviceRpcRequestProtoSchema":"syntax =\"proto3\";\npackage rpc;\n\nmessage RpcRequestMsg {\n  optional string method = 1;\n  optional int32 requestId = 2;\n  optional string params = 3;\n}",
         "deviceRpcResponseProtoSchema":"syntax =\"proto3\";\npackage rpc;\n\nmessage RpcResponseMsg {\n  optional string payload = 1;\n}"
      }
   }
}

Let's review some specific objects examples related to the device profile configuration:

Alarm Schedule

Alarm Schedule JSON object represents the time interval during which the alarm rule is active. Note,

"schedule": null

means alarm rule is active all the time. 'daysOfWeek' field represents Monday as 1, Tuesday as 2 and so on. 'startsOn' and 'endsOn' fields represent hours in millis (e.g. 64800000 = 18:00 or 6pm). 'enabled' flag specifies if item in a custom rule is active for specific day of the week:

Specific Time Schedule

{
   "schedule":{
      "type":"SPECIFIC_TIME",
      "endsOn":64800000,
      "startsOn":43200000,
      "timezone":"Europe/Kiev",
      "daysOfWeek":[
         1,
         3,
         5