Updated on 2026-06-29 GMT+08:00

Modify an OTA Module

Function

This API is used to modify the alias and description of an OTA module.

URI

PUT /v5/iot/{project_id}/ota-upgrades/modules/{module_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Parameter description : project ID. For details, see Obtaining a Project ID.

module_id

Yes

String

Parameter description: ID of the OTA module, which is automatically generated by the platform and used to uniquely identify a module. The value is obtained after the module is created.

Value: The value can contain up to 36 characters. Only letters, digits, and hyphens (-) are allowed.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Instance-Id

No

String

Parameter description : instance ID. Unique identifier of each instance in the physical multi-tenant scenario. Mandatory for professional editions and recommended in other cases. Log in to the IoTDA console and choose Overview in the navigation pane to view the instance ID. For details, see Viewing Instance Details.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

alias_name

No

String

Parameter description: OTA module alias.

Value: The value can contain up to 64 characters. Only letters, digits, underscores (_), hyphens (-), and periods (.) are allowed.

description

No

String

Parameter description: module function description.

Value: up to 1,024 characters.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

module_id

String

OTA module ID.

app_id

String

Resource space ID.

product_id

String

ID of the product associated with the OTA module.

product_name

String

Name of the product associated with the OTA module.

module_name

String

OTA module name.

alias_name

String

OTA module alias.

description

String

Module description.

create_time

String

Time when the OTA module is created. The format is yyyyMMdd'T'HHmmss'Z'.

Example Requests

This API is used to modify an OTA module.

PUT https://{endpoint}/v5/iot/{project_id}/ota-upgrades/modules/{module_id}

{
  "alias_name" : "Micro Controller Unit",
  "description" : "Microcontroller unit firmware module."
}

Example Responses

Status code: 200

Successful response

{
  "module_id" : "28f61af50fc9452aa0ed5ea25c3cc3d3",
  "app_id" : "61f7e74d036aca5be29e1ed4",
  "product_id" : "5ba24f5ebbe8f56f5a14f605",
  "product_name" : "Thermometer",
  "module_name" : "MCU",
  "alias_name" : "Micro Controller Unit",
  "description" : "Microcontroller unit firmware module.",
  "create_time" : "20230211T121212Z"
}

Status Codes

Status Code

Description

200

Successful response

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal Server Error

Error Codes

See Error Codes.