Get OTA Package Infos (getOtaPackages)
接口地址:/api/otaPackages/{deviceProfileId}/{type}{?page,pageSize,sortOrder,sortProperty,textSearch}
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
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 the ‘Model’ tab of the Response Class 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.
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
deviceProfileId | A string value representing the device profile id. For example, ‘784f394c-42b6-435a-983c-b7beff2784f9’ | path | true | string |
type | OTA Package type.,可用值:FIRMWARE,SOFTWARE | path | true | string |
pageSize | Maximum amount of entities in a one page | query | true | integer(int32) |
page | Sequence number of page starting from 0 | query | true | integer(int32) |
textSearch | The case insensitive ‘substring’ filter based on the ota package title. | query | false | string |
sortProperty | Property of entity to sort by,可用值:checksum,createdTime,dataSize,fileName,tag,title,type,url,version | query | false | string |
sortOrder | Sort order. ASC (ASCENDING) or DESC (DESCENDING),可用值:ASC,DESC | query | false | string |
响应参数:
参数名称 | 参数说明 | 类型 |
data | Array of the entities | array |
additionalInfo | OTA Package description. | JsonNode |
checksum | OTA Package checksum. | string |
checksumAlgorithm | OTA Package checksum algorithm.,可用值:CRC32,MD5,MURMUR3_128,MURMUR3_32,SHA256,SHA384,SHA512 | string |
contentType | OTA Package content type. | string |
createdTime | Timestamp of the ota package creation, in milliseconds | integer(int64) |
dataSize | OTA Package data size. | integer(int64) |
deviceProfileId | JSON object with Device Profile Id. Device Profile Id of the ota package can’t be changed. | DeviceProfileIdRes |
entityType | string,可用值:DEVICE_PROFILE | string |
id | ID of the entity, time-based UUID v1 | string |
fileName | OTA Package file name. | string |
hasData | 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. | boolean |
id | JSON object with the ota package Id. Specify existing ota package Id to update the ota package. Referencing non-existing ota package id will cause error. Omit this field to create new ota package. | OtaPackageIdRes |
entityType | string,可用值:OTA_PACKAGE | string |
id | ID of the entity, time-based UUID v1 | string |
tag | OTA Package tag. | string |
tenantId | JSON object with Tenant Id. Tenant Id of the ota package can’t be changed. | TenantIdRes |
entityType | string,可用值:TENANT | string |
id | ID of the entity, time-based UUID v1 | string |
title | OTA Package title. | string |
type | OTA Package type.,可用值:FIRMWARE,SOFTWARE | string |
url | OTA Package url. | string |
version | OTA Package version. | string |
hasNext | ‘false’ value indicates the end of the result set | boolean |
totalElements | Total number of elements in all available pages | integer(int64) |
totalPages | Total number of available pages. Calculated based on the ‘pageSize’ request parameter and total number of entities that match search criteria | integer(int32) |
响应示例:
{}
Get OTA Package Infos (getOtaPackages)
接口地址:/api/otaPackages{?page,pageSize,sortOrder,sortProperty,textSearch}
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
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 the ‘Model’ tab of the Response Class 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.
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 |
pageSize | Maximum amount of entities in a one page | query | true | integer(int32) |
page | Sequence number of page starting from 0 | query | true | integer(int32) |
textSearch | The case insensitive ‘substring’ filter based on the ota package title. | query | false | string |
sortProperty | Property of entity to sort by,可用值:checksum,createdTime,dataSize,fileName,tag,title,type,url,version | query | false | string |
sortOrder | Sort order. ASC (ASCENDING) or DESC (DESCENDING),可用值:ASC,DESC | query | false | string |
响应参数:
参数名称 | 参数说明 | 类型 |
data | Array of the entities | array |
additionalInfo | OTA Package description. | JsonNode |
checksum | OTA Package checksum. | string |
checksumAlgorithm | OTA Package checksum algorithm.,可用值:CRC32,MD5,MURMUR3_128,MURMUR3_32,SHA256,SHA384,SHA512 | string |
contentType | OTA Package content type. | string |
createdTime | Timestamp of the ota package creation, in milliseconds | integer(int64) |
dataSize | OTA Package data size. | integer(int64) |
deviceProfileId | JSON object with Device Profile Id. Device Profile Id of the ota package can’t be changed. | DeviceProfileIdRes |
entityType | string,可用值:DEVICE_PROFILE | string |
id | ID of the entity, time-based UUID v1 | string |
fileName | OTA Package file name. | string |
hasData | 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. | boolean |
id | JSON object with the ota package Id. Specify existing ota package Id to update the ota package. Referencing non-existing ota package id will cause error. Omit this field to create new ota package. | OtaPackageIdRes |
entityType | string,可用值:OTA_PACKAGE | string |
id | ID of the entity, time-based UUID v1 | string |
tag | OTA Package tag. | string |
tenantId | JSON object with Tenant Id. Tenant Id of the ota package can’t be changed. | TenantIdRes |
entityType | string,可用值:TENANT | string |
id | ID of the entity, time-based UUID v1 | string |
title | OTA Package title. | string |
type | OTA Package type.,可用值:FIRMWARE,SOFTWARE | string |
url | OTA Package url. | string |
version | OTA Package version. | string |
hasNext | ‘false’ value indicates the end of the result set | boolean |
totalElements | Total number of elements in all available pages | integer(int64) |
totalPages | Total number of available pages. Calculated based on the ‘pageSize’ request parameter and total number of entities that match search criteria | integer(int32) |
响应示例:
{}