V2.5 Report Device Firmware Version


Report device firmware versions.

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

Device Management

Full Access

Request Format

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

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

Request Parameters (Body)

Name

Mandatory/Optional

Data Type

Description

version

Mandatory

String

Firmware version number.

assetId

Mandatory

String

Asset ID.

productKey

Mandatory

String

The product key.

deviceKey

Mandatory

String

Device Key.

Response Parameters

Name

Data Type

Description

code

number

Failed or succeeded to create an alert. 0: succeeded, -1: failed.

msg

String

Returns OK if successful. Other returned values indicate failure.

requestId

String

A unique ID to identify a request.

Error Codes

Code

Message

Description

400

Invalid Argument

Invalid argument.

500

OTA Service Internal Error

There are internal errors in the OTA service.

404

Device Not Found

Device not found.

Samples

Request Sample

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

Return Sample

{
    "code": 0,
    "msg": "OK",
    "requestId": "151ddb7a-6352-4069-9ef9-a7eb940c99eb",
    "data": null
}