latestOpenAPI 3.1.0Apache License Version 2.02026-08-17498525913.3 KB

40169ccdec5c

ota-package-controller

Get OTA Package Infos (getOtaPackages)

Returns a page of OTA Package 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 response schema for more details. OTA Package Info is a lightweight object that includes main information about the OTA Package excluding the heavyweight data.

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

get/api/otaPackages

Query parameters

pageSizeinteger required

Maximum amount of entities in a one page

pageinteger required

Sequence number of page starting from 0

textSearchstring

The case insensitive 'substring' filter based on the ota package title.

sortProperty'createdTime' | 'type' | 'title' | 'version' | 'tag' | 'url' | 'fileName' | 'dataSize' | 'checksum'

Property of entity to sort by

sortOrder'ASC' | 'DESC'

Sort order. ASC (ASCENDING) or DESC (DESCENDING)

Response

OK

totalPagesinteger

Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria

totalElementsinteger

Total number of elements in all available pages

hasNextboolean

'false' value indicates the end of the result set

Example response

{
  "data": [
    {
      "id": {
        "id": "784f394c-42b6-435a-983c-b7beff2784f9",
        "entityType": "OTA_PACKAGE"
      },
      "createdTime": 1609459200000,
      "tenantId": {
        "id": "784f394c-42b6-435a-983c-b7beff2784f9",
        "entityType": "TENANT"
      },
      "deviceProfileId": {
        "id": "784f394c-42b6-435a-983c-b7beff2784f9",
        "entityType": "DEVICE_PROFILE"
      },
      "type": "FIRMWARE",
      "title": "fw",
      "tag": "fw_1.0",
      "url": "http://thingsboard.org/fw/1",
      "hasData": true,
      "fileName": "fw_1.0",
      "contentType": "APPLICATION_OCTET_STREAM",
      "checksumAlgorithm": "CRC32",
      "checksum": "0xd87f7e0c",
      "dataSize": 8,
      "additionalInfo": {}
    }
  ]
}