POSThealth

NEAR Mainnethttps://near-mainnet.nodit.io/

Returns null as result when the RPC node is healthy.

This method takes no parameters; send an empty array [] as params. If the node is not healthy, it returns error instead of result: NODE_IS_SYNCING while the node is syncing, NO_NEW_BLOCKS (with the elapsed time in elapsed) when no new blocks have arrived for a while, and INTERNAL_ERROR for internal node errors.

Request Body
jsonrpcstringrequired
idstringrequired

Request ID. Any string; it is returned unchanged in the response.

methodstringrequired
paramsobject[]required

No parameters. Send an empty array [].

Responses
jsonrpcstring

JSON-RPC version

idstring

Request ID

resultobject

null when the node is healthy.

namestring (enum)

Error class. REQUEST_VALIDATION_ERROR (invalid request), HANDLER_ERROR (processing error), INTERNAL_ERROR (node internal error)

causeobject

The specific cause of the error.

namestring

Name of the error cause (e.g. UNKNOWN_BLOCK, UNKNOWN_ACCOUNT, PARSE_ERROR)

infoobject

Additional information about the error (block hash, height, account ID, etc.)

codeinteger

Legacy JSON-RPC error code (e.g. -32000 server error, -32700 parse error, -32601 method not found)

messagestring

Legacy error message

datastring

Legacy error details

X-API-KEY
RequestCU0
cURL
curl -X POST "https://near-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": "dontcare",
    "method": "health"
  }'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "result": null,
  "id": "dontcare"
}