Cloud To Device Messages - Purge Cloud To Device Message Queue

Deletes all the pending commands for a device in the IoT Hub.

DELETE https://fully-qualified-iothubname.azure-devices.net/devices/{id}/commands?api-version=2021-04-12

URI Parameters

Name In Required Type Description
id
path True

string

The unique identifier of the device.

api-version
query True

string

Version of the Api.

Responses

Name Type Description
200 OK

PurgeMessageQueueResult

OK.

Definitions

PurgeMessageQueueResult

The result of a device message queue purge operation.

Name Type Description
deviceId

string

The unique identifier of the device.

moduleId

string

The unique identifier of the module.

totalMessagesPurged

integer

The total number of messages purged.