---
title: "Get OTA Package Infos (getOtaPackages)"
method: GET
path: "/api/otaPackages"
tags: ["ota-package-controller"]
---

# Get OTA Package Infos (getOtaPackages)

`GET /api/otaPackages`

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.

## Query parameters

- `pageSize` integer, required
- `page` integer, required
- `textSearch` string
- `sortProperty` 'createdTime' | 'type' | 'title' | 'version' | 'tag' | 'url' | 'fileName' | 'dataSize' | 'checksum'
- `sortOrder` 'ASC' | 'DESC'

## Response `200`

OK

- PageDataOtaPackageInfo
  - `data` OtaPackageInfo[] — Array of the entities
    - `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.
    - `name` string
    - `additionalInfo` unknown
  - `totalPages` integer — Total number of available pages. Calculated based on the 'pageSize' request parameter and total number of entities that match search criteria
  - `totalElements` integer — Total number of elements in all available pages
  - `hasNext` boolean — 'false' value indicates the end of the result set

---

[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)
