Delete Firmware¶
Delete a firmware.
Operation Permissions¶
Required Authorization |
Required Operation Permission |
---|---|
Device Management |
Full Access |
Request Format¶
POST https://{apigw-address}/connect-service/v2.1/ota-firmwares?action=delete
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 firmware ID. |
Error Codes¶
Code |
Message |
Description |
---|---|---|
24404 |
Firmware not found |
The firmware cannot be found. |
24604 |
Firmware cannot be deleted |
The firmware cannot be deleted. |
Samples¶
Request Sample¶
url: https://{apigw-address}/connect-service/v2.1/ota-firmwares?action=delete&orgId=yourOrgId&firmwareId=yourFirmwareId
method: POST
Return Sample¶
{
"code":0,
"msg":"OK",
"requestId":"3bdf31b4-e357-4d4c-8cf9-a40dc129a407",
"data":null
}
Java SDK Sample¶
package com.envisioniot.enos.connect_service.ota.firmware;
import com.envision.apim.poseidon.config.PConfig;
import com.envision.apim.poseidon.core.Poseidon;
import com.envisioniot.enos.connect_service.v2_1.ota.firmware.DeleteFirmwareFileRequest;
import com.envisioniot.enos.connect_service.v2_1.ota.firmware.DeleteFirmwareFileResponse;
public class DeleteFirmware {
public static void main(String[] args) {
final String appKey = "yourAppKey";
final String appSecret = "yourAppSecret";
String serverUrl = "yourServerUrl";
String orgId = "yourOrgId";
String firmwareId = "yourFirmwareId";
DeleteFirmwareFileRequest request = new DeleteFirmwareFileRequest();
request.setOrgId(orgId);
request.setFirmwareId(firmwareId);
DeleteFirmwareFileResponse response = Poseidon
.config(PConfig.init().appKey(appKey).appSecret(appSecret).debug())
.url(serverUrl)
.getResponse(request, DeleteFirmwareFileResponse.class);
}
}