Skip to content

Firmware Upload Session

Uploading an .ota file is implemented as a sequential upload session in the OTA slot.


Retrieve the current upload-session status and OTA image validity.

Auth: Bearer (powerUser).

{
"uploadInProgress": false,
"imageValid": true,
"receivedBytes": 524288,
"totalBytes": 524288,
"percent": 100,
"lastError": 0,
"lastInstallState": "ready",
"meta": {
"fwVersion": "1.0",
"buildTimestamp": 1785412800,
"deviceStr": "TR-100E (48)",
"description": "Production firmware"
}
}
FieldTypeDescription
uploadInProgressbooleanErase/receive/verify is in progress
imageValidbooleanThe OTA image has been fully uploaded and verified
receivedBytesnumberNumber of confirmed bytes
totalBytesnumberExpected image size
percentnumberProgress as a percentage
lastErrornumberError code (0 = none)
lastInstallStatestringMost recent installation state: "idle", "ready", "running", "failed", "unknown"
metaobjectMetadata of the verified image; present only when imageValid: true
meta.fwVersionstringFirmware version from the OTA image, up to 15 ASCII characters (for example, 1.0 or 1.2.3-rc4)
meta.buildTimestampnumberBuild Unix timestamp
meta.deviceStrstringTarget hardware tag; TR-100E (48) for this device
meta.descriptionstringImage description

Open an upload session, set the image size, and prepare the OTA slot.

Auth: Bearer (powerUser).

{
"size": 524288
}
FieldTypeRequiredDescription
sizenumberyesInteger: OTA image size in bytes (> 0 and ≤ the OTA slot size)
  • Calling this endpoint again resets an incomplete session.
  • If erase/verify is in progress → 503 ERROR_NOT_READY.
{
"acceptedOffset": 0
}

POST /api/service/firmware/upload/chunk/?offset=0

Section titled “POST /api/service/firmware/upload/chunk/?offset=0”

Write a chunk of the OTA image.

Auth: Bearer (powerUser).

  • Content-Type: application/octet-stream
  • Query parameter offset: chunk offset within the complete image.
  • Body: raw chunk bytes (maximum 1024 bytes).
ParameterTypeRequiredDescription
offsetnumberyesInteger: non-negative offset within the complete OTA image
  • offset must match the expected offset or refer to an already confirmed chunk (idempotent retry).
  • Gap → 400 ERROR_INVALID_VALUE.
  • Chunk > 1024 bytes → 400 ERROR_INVALID_VALUE.
{
"acceptedOffset": 1024
}

Complete the upload session and start validation.

Auth: Bearer (powerUser).

{
"confirm": true
}
  • Incomplete image or validation failure → 400 ERROR_INVALID_VALUE.
{
"uploadInProgress": false,
"imageValid": true,
"receivedBytes": 524288,
"totalBytes": 524288,
"percent": 100,
"lastError": 0,
"lastInstallState": "ready",
"meta": {
"fwVersion": "1.0",
"buildTimestamp": 1785412800,
"deviceStr": "TR-100E (48)",
"description": "Production firmware"
}
}

POST /api/service/firmware/upload/discard/

Section titled “POST /api/service/firmware/upload/discard/”

Delete the staged OTA image and reset the upload session.

Auth: Bearer (powerUser).

{
"confirm": true
}

An empty or syntactically invalid JSON body → 400 ERROR_API_PARSING. A missing confirm, a non-boolean value, or false → 400 ERROR_INVALID_ARGUMENT.

Returns the complete status in the same format as GET /api/service/firmware/upload/status/.