Service - Get Module Twin

Gets a module twin.
Gets a module twin. See https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-device-twins for more information.

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

URI Parameters

Name In Required Type Description
id
path True
  • string

Device ID.

mid
path True
  • string

Module ID.

api-version
query True
  • string

Version of the Api.

Responses

Name Type Description
200 OK

Returns the device twin object

Definitions

DeviceCapabilities

Status of Capabilities enabled on the device

Twin

Twin Representation

TwinProperties

Represents Twin properties

X509Thumbprint

DeviceCapabilities

Status of Capabilities enabled on the device

Name Type Description
iotEdge
  • boolean

Twin

Twin Representation

Name Type Description
authenticationType enum:
  • certificateAuthority
  • none
  • sas
  • selfSigned

Corresponding Device's authentication type

capabilities

Status of Capabilities enabled on the device

cloudToDeviceMessageCount
  • integer

Number of messages sent to the corresponding Device from the Cloud

connectionState enum:
  • Connected
  • Disconnected

Corresponding Device's ConnectionState

deviceEtag
  • string

Device's ETag

deviceId
  • string

The deviceId uniquely identifies the device in the IoT hub's identity registry. A case-sensitive string (up to 128 char long) of ASCII 7-bit alphanumeric chars + {'-', ':', '.', '+', '%', '_', '#', '*', '?', '!', '(', ')', ',', '=', '@', ';', '$', '''}.

etag
  • string

Twin's ETag

lastActivityTime
  • string

The last time the device connected, received or sent a message. In ISO8601 datetime format in UTC, for example, 2015-01-28T16:24:48.789Z. This does not update if the device uses the HTTP/1 protocol to perform messaging operations.

moduleId
  • string

Gets and sets the Module Id.

properties

Gets and sets the Twin properties.

status enum:
  • disabled
  • enabled

Gets the corresponding Device's Status.

statusReason
  • string

Reason, if any, for the corresponding Device to be in specified Status

statusUpdateTime
  • string

Time when the corresponding Device's Status was last updated

tags
  • object

A JSON document read and written by the solution back end. Tags are not visible to device apps.

version
  • integer

Version for device twin, including tags and desired properties

x509Thumbprint

Corresponding Device's X509 thumbprint

TwinProperties

Represents Twin properties

Name Type Description
desired
  • object

Used in conjunction with reported properties to synchronize device configuration or condition. Desired properties can only be set by the solution back end and can be read by the device app. The device app can also be notified in real time of changes on the desired properties.

reported
  • object

Used in conjunction with desired properties to synchronize device configuration or condition. Reported properties can only be set by the device app and can be read and queried by the solution back end.

X509Thumbprint

Name Type Description
primaryThumbprint
  • string
secondaryThumbprint
  • string