Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

ThingsBoard device-controller API

Device

ThingsBoard device-controller API is one of 58 APIs that ThingsBoard publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

This API exposes 11 JSON Schema definitions.

Tagged areas include device-controller. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and 11 JSON Schemas.

This API exposes 25 operations across 21 paths, and defines 30 schemas. It is described by OpenAPI 3.1.0, at version 4.3.0.3DEMO.

Requests are made against 2 base URLs: https://demo.thingsboard.io, http://localhost:8080.

25 operations 21 paths 30 schemas 4 DELETE11 GET10 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
4.3.0.3DEMO
Servers
https://demo.thingsboard.io
http://localhost:8080
Authentication
HTTP Loginpassword, API Key
License
Resource Areas
1

Authentication & Security 2

ThingsBoard device-controller API declares 2 security schemes for authenticating requests. It uses HTTP loginpassword authentication (HTTP login form). An API key is passed in the header as X-Authorization (API key form).

  • HTTP login form — Enter Username / Password
  • API key form — Enter the API key value with 'ApiKey' prefix in format: ApiKey Example: ApiKey tb5te51SkLRYpjGrujUGwqkjFvooWBlQpVe2An2Dr3w13wjfxDW NOTE: Use only ONE authentic…

Paths & Operations 25

Across 21 paths, the API surfaces 25 operations — 4 DELETE, 11 GET, 10 POST. Each is listed below with its method, path, parameters, and response codes.

device-controller 25

Device

POST
/api/tenant/{tenantId}/device/{deviceId}
Assign Device to Tenant (assignDeviceToTenant)
assignDeviceToTenant 2 params → 200
POST
/api/edge/{edgeId}/device/{deviceId}
Assign Device to Edge (assignDeviceToEdge)
assignDeviceToEdge 2 params → 200
DELETE
/api/edge/{edgeId}/device/{deviceId}
Unassign Device from Edge (unassignDeviceFromEdge)
unassignDeviceFromEdge 2 params → 200
GET
/api/devices
Get Devices by Ids (getDevicesByIds)
getDevicesByIds 1 param → 200
POST
/api/devices
Find Related Devices (findByQuery)
findByQuery_3 body → 200
POST
/api/device
Create or Update Device (saveDevice)
saveDevice 4 params body → 200
POST
/api/device/credentials
Update Device Credentials (updateDeviceCredentials)
updateDeviceCredentials body → 200
POST
/api/device/bulk_import
Import the Bulk of Devices (processDevicesBulkImport)
processDevicesBulkImport body → 200
POST
/api/device-with-credentials
Create Device (saveDevice) with Credentials
saveDeviceWithCredentials_1 3 params body → 200
POST
/api/customer/{customerId}/device/{deviceId}
Assign Device to Customer (assignDeviceToCustomer)
assignDeviceToCustomer 2 params → 200
POST
/api/customer/public/device/{deviceId}
Make Device Publicly Available (assignDeviceToPublicCustomer)
assignDeviceToPublicCustomer 1 param → 200
POST
/api/customer/device/{deviceName}/claim
Claim Device (claimDevice)
claimDevice 1 param body → 200
DELETE
/api/customer/device/{deviceName}/claim
Reclaim Device (reClaimDevice)
reClaimDevice 1 param → 200
GET
/api/tenant/devices
Get Tenant Device (getTenantDevice)
getTenantDevices 7 params → 200
GET
/api/tenant/deviceInfos
Get Tenant Device Infos (getTenantDeviceInfos)
getTenantDeviceInfos 8 params → 200
GET
/api/edge/{edgeId}/devices
Get Devices Assigned to Edge (getEdgeDevices)
getEdgeDevices 11 params → 200
GET
/api/devices/count/{otaPackageType}/{deviceProfileId}
Count Devices by Device Profile (countByDeviceProfileAndEmptyOtaPackage)
countByDeviceProfileAndEmptyOtaPackage 2 params → 200
GET
/api/device/{deviceId}
Get Device (getDeviceById)
getDeviceById 1 param → 200
DELETE
/api/device/{deviceId}
Delete Device (deleteDevice)
deleteDevice 1 param → 200
GET
/api/device/{deviceId}/credentials
Get Device Credentials (getDeviceCredentialsByDeviceId)
getDeviceCredentialsByDeviceId 1 param → 200
GET
/api/device/typesdeprecated
Get Device Types (getDeviceTypes)
getDeviceTypes → 200
GET
/api/device/info/{deviceId}
Get Device Info (getDeviceInfoById)
getDeviceInfoById 1 param → 200
GET
/api/customer/{customerId}/devices
Get Customer Devices (getCustomerDevices)
getCustomerDevices 7 params → 200
GET
/api/customer/{customerId}/deviceInfos
Get Customer Device Infos (getCustomerDeviceInfos)
getCustomerDeviceInfos 9 params → 200
DELETE
/api/customer/device/{deviceId}
Unassign Device from Customer (unassignDeviceFromCustomer)
unassignDeviceFromCustomer 1 param → 200

Schemas 30

The contract defines 30 schemas that model the data the API accepts and returns. The most detailed are DeviceInfo (17 properties), Device (13 properties), DeviceCredentials (7 properties), RelationsSearchParameters (6 properties). Each schema is shown below with its type and property counts.

DeviceTransportConfiguration
object
1 property 1 required
MqttDeviceTransportConfiguration
ColumnMapping
object
2 properties
DeviceData
object
2 properties
CustomerId
object
2 properties 2 required
PageDataDeviceInfo
object
4 properties
ClaimRequest
object
Claiming request which can optionally contain secret key
1 property
DeviceCredentialsId
object
1 property 1 required
BulkImportResultDevice
object
4 properties
BulkImportRequest
object
2 properties
DeviceProfileId
object
2 properties 2 required
SnmpDeviceTransportConfiguration
DefaultDeviceConfiguration
OtaPackageId
object
2 properties 2 required
DeviceConfiguration
object
1 property 1 required
DeviceId
object
2 properties 2 required
PageDataDevice
object
4 properties
CoapDeviceTransportConfiguration
DefaultDeviceTransportConfiguration
Mapping
object
4 properties
EntitySubtype
object
3 properties
RelationsSearchParameters
object
6 properties
JsonNode
A value representing the any type (object or primitive)
SaveDeviceWithCredentialsRequest
object
The JSON object with device and credentials. See method description above for example.
2 properties 2 required
Lwm2mDeviceTransportConfiguration
DeviceSearchQuery
object
The device search query JSON
3 properties
DeviceInfo
object
17 properties 2 required
TenantId
object
2 properties 2 required
DeviceCredentials
object
A JSON value representing the device credentials.
7 properties 3 required
Device
object
13 properties 2 required

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

thingsboard-device-controller-api-openapi.yml Raw ↑

Other APIs ThingsBoard publishes across the network.

ThingsBoard admin-controller API
ThingsBoard ai-model-controller API
ThingsBoard alarm-comment-controller API
ThingsBoard alarm-controller API
ThingsBoard api-key-controller API
ThingsBoard asset-controller API
ThingsBoard asset-profile-controller API
ThingsBoard audit-log-controller API
ThingsBoard auth-controller API
ThingsBoard calculated-field-controller API
ThingsBoard component-descriptor-controller API
ThingsBoard customer-controller API