latestOpenAPI 3.1.0Apache License Version 2.02026-08-17498525913.3 KB

40169ccdec5c

ota-package-controller

Create Or Update OTA Package Info (saveOtaPackageInfo)

Create or update the OTA Package Info. When creating OTA Package Info, platform generates OTA Package id as time-based UUID. The newly created OTA Package id will be present in the response. Specify existing OTA Package id to update the OTA Package Info. Referencing non-existing OTA Package Id will cause 'Not Found' error.

OTA Package combination of the title with the version is unique in the scope of tenant.

Available for users with 'TENANT_ADMIN' authority.

post/api/otaPackage

Request body

createdTimeinteger

Timestamp of the ota package creation, in milliseconds

type'FIRMWARE' | 'SOFTWARE'

OTA Package type.

titlestring

OTA Package title.

versionstring

OTA Package version.

tagstring

OTA Package tag.

urlstring

OTA Package url.

hasDataboolean

Indicates OTA Package 'has data'. Field is returned from DB ('true' if data exists or url is set). If OTA Package 'has data' is 'false' we can not assign the OTA Package to the Device or Device Profile.

fileNamestring

OTA Package file name.

contentTypestring

OTA Package content type.

checksumAlgorithm'MD5' | 'SHA256' | 'SHA384' | 'SHA512' | 'CRC32' | 'MURMUR3_32' | 'MURMUR3_128'

OTA Package checksum algorithm.

checksumstring

OTA Package checksum.

dataSizeinteger

OTA Package data size.

usesUrlboolean

Indicates OTA Package uses url. Should be 'true' if uses url or 'false' if will be used data.

namestring
{"stackTrail":"components:schemas:JsonNode","oasType":"schema","type":"unknown","description":"A value representing the any type (object or primitive)","example":{}}

Example request

{
  "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,
  "usesUrl": true,
  "additionalInfo": {}
}

Response

OK

createdTimeinteger

Timestamp of the ota package creation, in milliseconds

type'FIRMWARE' | 'SOFTWARE'

OTA Package type.

titlestring

OTA Package title.

versionstring

OTA Package version.

tagstring

OTA Package tag.

urlstring

OTA Package url.

hasDataboolean

Indicates OTA Package 'has data'. Field is returned from DB ('true' if data exists or url is set). If OTA Package 'has data' is 'false' we can not assign the OTA Package to the Device or Device Profile.

fileNamestring

OTA Package file name.

contentTypestring

OTA Package content type.

checksumAlgorithm'MD5' | 'SHA256' | 'SHA384' | 'SHA512' | 'CRC32' | 'MURMUR3_32' | 'MURMUR3_128'

OTA Package checksum algorithm.

checksumstring

OTA Package checksum.

dataSizeinteger

OTA Package data size.

namestring
{"stackTrail":"components:schemas:JsonNode","oasType":"schema","type":"unknown","description":"A value representing the any type (object or primitive)","example":{}}

Example response

{
  "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": {}
}