Using PING

In some cases, it may be necessary to verify whether the OData REST API is running and reachable.

A common way to test availability is to send a GET request to the $metadata endpoint or any other known endpoint.
However, these endpoints typically return metadata or payload data — which can be unnecessary if you only need to check service availability.

To solve this, the REST API provides a lightweight $ping endpoint.


Example Request

GET http://<server>:5181/odata/$ping

Response

If the service is available, it responds with:

HTTP/1.1 200 OK
Content-Length: 0

If the service is unavailable, the response will typically be one of the following status codes:

Status Code Meaning
502 Bad Gateway – the server received an invalid response.
503 Service Unavailable – the service is temporarily down or overloaded.
504 Gateway Timeout – the request to the service timed out.

💡 Tip:
The $ping endpoint is the most efficient way to perform health checks or monitoring without fetching unnecessary data.

Back to top