Devices - Get Module Telemetry Value
Get module telemetry value
Get the last telemetry value from a module.
GET https://{subdomain}.{baseDomain}/api/devices/{deviceId}/modules/{moduleName}/telemetry/{telemetryName}?api-version=2022-07-31
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
base
|
path | True |
string |
The base domain for all Azure IoT Central service requests. |
device
|
path | True |
string |
Unique ID of the device. |
module
|
path | True |
string |
Name of the device module. |
subdomain
|
path | True |
string |
The application subdomain. |
telemetry
|
path | True |
string |
Name of this device telemetry. |
api-version
|
query | True |
string |
The version of the API being called. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Success |
|
Other Status Codes |
An error response received from the IoT Central Service. Headers x-ms-error-code: string |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Get telemetry from module
Sample Request
GET https://appsubdomain.azureiotcentral.com/api/devices/mx1/modules/environment/telemetry/ambient?api-version=2022-07-31
Sample Response
{
"value": {
"temperature": 20.961113326000568,
"humidity": 24
},
"timestamp": "2020-04-16T03:24:44.84Z"
}
Definitions
Name | Description |
---|---|
Device |
The device telemetry definition. |
Error |
The response error definition. |
Error |
The detail information of the error. |
DeviceTelemetry
The device telemetry definition.
Name | Type | Description |
---|---|---|
timestamp |
string |
String-formatted date representing the time when the telemetry value was sent. |
value |
|
The last known value of this device telemetry. |
Error
The response error definition.
Name | Type | Description |
---|---|---|
error |
Error details for current request. |
ErrorDetails
The detail information of the error.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
message |
string |
Error message details. |
requestId |
string |
Correlation Id for current request. |
time |
string |
The time that error request failed. |