V2.5 Download Firmware File


Download firmware files.

Operation Permissions


Before invoking this API, ensure that the service account has been authorized the policy that includes the following service(s) and action permission(s). For how to authorize the service account, see Managing Service Accounts.


Required Service

Required Operation Permission

Firmware

Read OTA

Request Format

GET https://{apigw-address}/connect-service/v2.5/files?action=downloadFirmwareFile

Request Parameters (URI)

Name

Location (Path/Query)

Mandatory/Optional

Data Type

Description

orgId

Query

Mandatory

String

The organization ID which the asset belongs to. How to get orgId>>

firmwareId

Query

Mandatory

String

The target firmware ID for the firmware file.

Response Parameters

Name

Data Type

Description

code

Int

Return code of a request. + 0 indicates success. + non-zero values indicates failure.

msg

String

The explanation to the return code. Its value is OK if the request is successful.

requestId

String

A unique ID to identify a request.

data

null

Null.

Error Codes

Code

Message

Description

400

Bad Request

Failed to request the API.

401

Unauthorized

Not authorize required permissions.

403

Forbidden

Access denied.

404

Not Found

Resource not found.

500

Internal Server Error

There are internal server errors.

Samples

Request Sample

url: https://{apigw-address}/connect-service/v2.5/devices?action=downloadFirmware&orgId=yourOrgId
method: POST
requestBody:
{
    "firmwareId": "firmwareId"
}

Return Sample

{
    "code": 0,
    "msg": "OK",
    "requestId": "requestId",
    "data": {
        "firmwareFile": "firmwareFile"
    }
}