Service - Invoke Device Module Method

Invoke a direct method on a module of a device.
Invoke a direct method on a module of a device. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-direct-methods for more information

POST https://fully-qualified-iothubname.azure-devices.net/twins/{id}/modules/{moduleId}/methods?api-version=2018-06-30

URI Parameters

Name In Required Type Description
moduleId
path True
  • string
api-version
query True
  • string

Version of the Api.

Request Body

Name Type Description
connectTimeoutInSeconds
  • integer
methodName
  • string

Method to run

responseTimeoutInSeconds
  • integer

Responses

Name Type Description
200 OK

Returns the method response payload

Definitions

CloudToDeviceMethod

Parameters to execute a direct method on the device

CloudToDeviceMethodResult

Represents the Device Method Invocation Results.

CloudToDeviceMethod

Parameters to execute a direct method on the device

Name Type Description
connectTimeoutInSeconds
  • integer
methodName
  • string

Method to run

payload
  • object

Payload

responseTimeoutInSeconds
  • integer

CloudToDeviceMethodResult

Represents the Device Method Invocation Results.

Name Type Description
payload
  • object

Method invocation result payload.

status
  • integer

Method invocation result status.