You can call this operation to delete a file that is uploaded to IoT Platform from the specified device.

Request parameters

Parameter Type Required Description
Action String Yes The operation that you want to perform. Set the value to DeleteDeviceFile.
IotId String No The unique identifier of the device to which the file belongs.
Note If you provide this parameter, you do not need to provide the ProductKey or DeviceName parameters. As the GUID of the device, IotId corresponds to the combination of ProductKey and DeviceName. If you provide both IotId and the combination of ProductKey and DeviceName, IotId takes precedence.
ProductKey String No The key of the product to which the device belongs.
Note If you provide this parameter, you must also provide the DeviceName parameter.
DeviceName String No The name of the device to which the file belongs.
Note If you provide this parameter, you must also provide the ProductKey parameter.
FileId String Yes The file identifier.
Common request parameters N/A Yes See Common parameters.

Response parameters

Parameter Type Description
RequestId String The GUID generated by Alibaba Cloud for the request.
Success Boolean Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that the call has failed.
ErrorMessage String The error message returned when the call fails.
Code String The error code returned when the call fails. For more information about error codes, see Error codes.

Examples

Sample request

https://iot.cn-shanghai.aliyuncs.com/?Action=DeleteDeviceFile
&ProductKey=al*******
&DeviceName=deviceName1
&FileId=6UCo1SqbqnQEoh9aK*******
&Common request parameters

Sample responses

  • JSON format
    {
        "RequestId": "C25255EA-9F6E-4E04-85FE-AC1E9C136EBB",
        "Success": true
    }
  • XML format
    <? xml version="1.0" encoding="utf-8"? >
    <DeleteDeviceFileResponse>
      <RequestId>C25255EA-9F6E-4E04-85FE-AC1E9C136EBB</RequestId>
      <Success>true</Success>
    </DeleteDeviceFileResponse>