For the complete documentation index, see llms.txt. This page is also available as Markdown.

health - Cosmos

Example code for the health JSON-RPC method. Complete guide on how to use health JSON-RPC in GetBlock Web3 documentation.

Performs a basic health check on the node. Returns an empty result object if the node is responsive. Use this as a cheap liveness probe in monitoring tools.

Parameters

  • None

Request Example

# JSON-RPC over HTTP POST (canonical)
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "health",
    "params": [],
    "id": "getblock.io"
}'

# URI over HTTP GET (alternate, for simple methods)
curl --location --request GET 'https://go.getblock.io/<ACCESS-TOKEN>/health'

Response Example

Response Parameters

Field
Type
Description

result

object

Empty object — the presence of a non-error response indicates health

Use Cases

  • Liveness probes in monitoring and alerting systems

  • Pre-flight checks before routing reads to this node

  • Simple health endpoints for status dashboards

Error Handling

Status Code
Error Message
Cause

404

Not Found

Missing or invalid <ACCESS-TOKEN>

-32603

Internal error

Server-side error while processing the request

429

Too Many Requests

Rate limit exceeded for your plan

SDK Integration

Last updated

Was this helpful?