latestOpenAPI 3.1.0Apache License Version 2.02026-08-17498525913.3 KB

40169ccdec5c

device-controller

Get Device Credentials (getDeviceCredentialsByDeviceId)

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.

get/api/device/{deviceId}/credentials

Path parameters

deviceIdstring required

A string value representing the device id. For example, '784f394c-42b6-435a-983c-b7beff2784f9'

Response

OK

createdTimeinteger

Timestamp of the device credentials creation, in milliseconds

credentialsType'ACCESS_TOKEN' | 'X509_CERTIFICATE' | 'MQTT_BASIC' | 'LWM2M_CREDENTIALS'

Type of the credentials

credentialsIdstring required

Unique Credentials Id per platform instance. Used to lookup credentials from the database. By default, new access token for your device. Depends on the type of the credentials.

credentialsValuestring

Value of the credentials. Null in case of ACCESS_TOKEN credentials type. Base64 value in case of X509_CERTIFICATE. Complex object in case of MQTT_BASIC and LWM2M_CREDENTIALS

versioninteger

Example response

{
  "id": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9"
  },
  "createdTime": 1609459200000,
  "deviceId": {
    "id": "784f394c-42b6-435a-983c-b7beff2784f9",
    "entityType": "DEVICE"
  },
  "credentialsId": "Access token or other value that depends on the credentials type",
  "credentialsValue": "Null in case of ACCESS_TOKEN. See model definition."
}