---
title: "Get OTA Package (getOtaPackageById)"
method: GET
path: "/api/otaPackage/{otaPackageId}"
tags: ["ota-package-controller"]
---

# Get OTA Package (getOtaPackageById)

`GET /api/otaPackage/{otaPackageId}`

Fetch the OTA Package object based on the provided OTA Package Id. The server checks that the OTA Package is owned by the same tenant. OTA Package is a heavyweight object that includes main information about the OTA Package and also data. 

Available for users with 'TENANT_ADMIN' authority.

## Path parameters

- `otaPackageId` string, required

## Response `200`

OK

- OtaPackage
  - `id` OtaPackageId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'OTA_PACKAGE', required — string
  - `createdTime` integer — Timestamp of the ota package creation, in milliseconds
  - `tenantId` TenantId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'TENANT', required — string
  - `deviceProfileId` DeviceProfileId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'DEVICE_PROFILE', required — string
  - `type` 'FIRMWARE' | 'SOFTWARE' — OTA Package type.
  - `title` string — OTA Package title.
  - `version` string — OTA Package version.
  - `tag` string — OTA Package tag.
  - `url` string — OTA Package url.
  - `hasData` boolean — 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.
  - `fileName` string — OTA Package file name.
  - `contentType` string — OTA Package content type.
  - `checksumAlgorithm` 'MD5' | 'SHA256' | 'SHA384' | 'SHA512' | 'CRC32' | 'MURMUR3_32' | 'MURMUR3_128' — OTA Package checksum algorithm.
  - `checksum` string — OTA Package checksum.
  - `dataSize` integer — OTA Package data size.
  - `data` object
    - `short` integer
    - `char` string
    - `int` integer
    - `long` integer
    - `float` number, float
    - `double` number, double
    - `direct` boolean
    - `readOnly` boolean
  - `name` string
  - `additionalInfo` unknown

---

[API](https://skmtc.net/thingsboard/apis/thingsboard-rest-api.md) · [All operations](https://skmtc.net/thingsboard/apis/thingsboard-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/thingsboard/thingsboard-rest-api/revisions/40169ccdec5c/schema)
