Skip to main content
POST
/
device
/
debug
/
logging
Enable or Disable Debug Logging
curl --request POST \
  --url https://api.getmelody.io/device/debug/logging \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "enabled": true
}
'
{
  "free_heap_size": 100000,
  "external_flash_size": 100000,
  "debug_logging_enabled": false
}

Authorizations

Authorization
string
header
required

Device Token for SDK operations. Obtain via: GET /api/haptics/device/device_token Format: {device_id}-{1|2}-{random} Note: ApiToken (from POST /device/otp/confirm) can also be used for most SDK endpoints.

Body

application/json
enabled
boolean
required

Set to true to enable debug logging on the device, false to disable.

Example:

true

Response

OK — debug logging state applied on device.

The debug information of the device.

free_heap_size
number

The free heap size of the device in bytes.

Example:

100000

external_flash_size
number

The external flash size of the device in bytes.

Example:

100000

debug_logging_enabled
boolean

Whether debug logging is currently enabled on the device. When true, the device emits DEBUG_LOG frames (frame type 21) over the WebSocket containing a DebugLogMessage { message: string } protobuf payload.

Example:

false