Iot Hub Resource - Get Endpoint Health

Get the health for routing endpoints.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{iotHubName}/routingEndpointsHealth?api-version=2023-06-30

URI Parameters

Name In Required Type Description
iotHubName
path True

string

resourceGroupName
path True

string

subscriptionId
path True

string

The subscription identifier.

api-version
query True

string

The version of the API.

Responses

Name Type Description
200 OK

EndpointHealthDataListResult

OK

Other Status Codes

ErrorDetails

DefaultErrorResponse

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

IotHubResource_GetEndpointHealth

Sample request

GET https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub/routingEndpointsHealth?api-version=2023-06-30

Sample response

{
  "value": [
    {
      "endpointId": "id1",
      "healthStatus": "healthy",
      "lastSuccessfulSendAttemptTime": "Wed, 13 Sep 2022 18:04:32 GMT",
      "lastSendAttemptTime": "Wed, 13 Sep 2022 18:04:32 GMT"
    },
    {
      "endpointId": "id2",
      "healthStatus": "unknown"
    },
    {
      "endpointId": "id3",
      "healthStatus": "unhealthy",
      "lastKnownError": "NotFound",
      "lastKnownErrorTime": "Wed, 13 Sep 2022 18:04:32 GMT",
      "lastSuccessfulSendAttemptTime": "Wed, 13 Sep 2022 18:04:32 GMT",
      "lastSendAttemptTime": "Wed, 13 Sep 2022 18:04:32 GMT"
    }
  ]
}

Definitions

Name Description
EndpointHealthData

The health data for an endpoint

EndpointHealthDataListResult

The JSON-serialized array of EndpointHealthData objects with a next link.

EndpointHealthStatus

Health statuses have following meanings. The 'healthy' status shows that the endpoint is accepting messages as expected. The 'unhealthy' status shows that the endpoint is not accepting messages as expected and IoT Hub is retrying to send data to this endpoint. The status of an unhealthy endpoint will be updated to healthy when IoT Hub has established an eventually consistent state of health. The 'dead' status shows that the endpoint is not accepting messages, after IoT Hub retried sending messages for the retrial period. See IoT Hub metrics to identify errors and monitor issues with endpoints. The 'unknown' status shows that the IoT Hub has not established a connection with the endpoint. No messages have been delivered to or rejected from this endpoint

ErrorDetails

Error details.

EndpointHealthData

The health data for an endpoint

Name Type Description
endpointId

string

Id of the endpoint

healthStatus

EndpointHealthStatus

Health statuses have following meanings. The 'healthy' status shows that the endpoint is accepting messages as expected. The 'unhealthy' status shows that the endpoint is not accepting messages as expected and IoT Hub is retrying to send data to this endpoint. The status of an unhealthy endpoint will be updated to healthy when IoT Hub has established an eventually consistent state of health. The 'dead' status shows that the endpoint is not accepting messages, after IoT Hub retried sending messages for the retrial period. See IoT Hub metrics to identify errors and monitor issues with endpoints. The 'unknown' status shows that the IoT Hub has not established a connection with the endpoint. No messages have been delivered to or rejected from this endpoint

lastKnownError

string

Last error obtained when a message failed to be delivered to iot hub

lastKnownErrorTime

string

Time at which the last known error occurred

lastSendAttemptTime

string

Last time iot hub tried to send a message to the endpoint

lastSuccessfulSendAttemptTime

string

Last time iot hub successfully sent a message to the endpoint

EndpointHealthDataListResult

The JSON-serialized array of EndpointHealthData objects with a next link.

Name Type Description
nextLink

string

Link to more results

value

EndpointHealthData[]

JSON-serialized array of Endpoint health data

EndpointHealthStatus

Health statuses have following meanings. The 'healthy' status shows that the endpoint is accepting messages as expected. The 'unhealthy' status shows that the endpoint is not accepting messages as expected and IoT Hub is retrying to send data to this endpoint. The status of an unhealthy endpoint will be updated to healthy when IoT Hub has established an eventually consistent state of health. The 'dead' status shows that the endpoint is not accepting messages, after IoT Hub retried sending messages for the retrial period. See IoT Hub metrics to identify errors and monitor issues with endpoints. The 'unknown' status shows that the IoT Hub has not established a connection with the endpoint. No messages have been delivered to or rejected from this endpoint

Name Type Description
dead

string

degraded

string

healthy

string

unhealthy

string

unknown

string

ErrorDetails

Error details.

Name Type Description
code

string

The error code.

details

string

The error details.

httpStatusCode

string

The HTTP status code.

message

string

The error message.