system_health - JSON-RPC Method
Description
Returns health status for the node including peer count and whether the node is syncing. Useful for readiness/liveness probes and diagnostics.
Parameters
This method does not require any parameters.
Returns
Field | Type | Description |
---|---|---|
peers | number | Number of connected peers |
isSyncing | boolean | Whether the node is currently syncing |
shouldHavePeers | boolean | Whether the node expects to have peers |
Code Examples
- cURL
- JavaScript
curl -s https://api-acala.n.dwellir.com/YOUR_API_KEY \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"system_health","params":[]}'
const res = await fetch('https://api-acala.n.dwellir.com/YOUR_API_KEY', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'system_health', params: [] })
});
const data = await res.json();
console.log(data.result);