TriportRPC

Polygon mesh admin health

Internal, loopback-only admin endpoint that reports the live health of the Polygon mesh pool blocks (bor, heimdall, aggregator).

Polygon— (not part of the public scope/key system)— (admin endpoint; not tier-gated, not RPS-limited)

GET /v1/polygon/mesh/health returns a point-in-time snapshot of the Polygon mesh upstream pools. The mesh is organized into up to three independent pool blocks:

  • bor — the Polygon Bor execution-layer pool.
  • heimdall — the Heimdall consensus-layer pool.
  • aggregator — the aggregator pool.

For each block the response reports how many hosts are configured and how many are currently available, quarantined, or degraded, followed by a per-host breakdown. A block only appears in the response if its pool is actually wired up at startup, so the set of keys under blocks reflects the live configuration of the node you are querying.

Use it to confirm that a node's mesh upstreams are reachable, to see which hosts have been quarantined by the health checker, and to inspect per-host last errors when debugging routing problems.

Access restrictions

Access is enforced by a loopback-only admin guard. A request is allowed only if either of the following is true:

  1. The request originates from a loopback address (127.0.0.1 or ::1), or
  2. The request carries an X-Admin-Token header whose value matches the server's configured admin token (when one is set).

Any other request receives 403 Forbidden. Because the endpoint is loopback-only, operators typically reach it through an SSH tunnel to the host rather than over the public network. The endpoint also accepts GET only — any other HTTP method returns 405 Method Not Allowed.

Parameters

This endpoint takes no path, query, or body parameters.

X-Admin-Token (header)stringoptional
Admin token; an alternative to loopback access. When the server has a token configured, a matching value grants access from a non-loopback address.

Response

The response also sets an X-Mesh-Source: polygon-mesh-admin header.

generated_atstring (RFC 3339, UTC)
When the snapshot was taken.
blocksobject
Map of block name → block health. Keys are a subset of bor, heimdall, aggregator depending on what is configured.

Errors

CodeMeaningWhen it happens
403{"error":"admin endpoint loopback-only"}Request is neither from a loopback address nor carrying a matching X-Admin-Token.
405{"error":"only GET supported"}Any HTTP method other than GET.

See the shared errors page for the standard error envelope used by the public API. Note that this admin endpoint returns its own compact error bodies rather than the public envelope.

Examples

JavaScript (fetch)

// Run from the host or through an SSH tunnel to the node's loopback interface.
const res = await fetch("https://api.triport.io/v1/polygon/mesh/health", {
  headers: { "X-Admin-Token": process.env.TRIPORT_ADMIN_TOKEN },
});
if (!res.ok) throw new Error(`mesh health: ${res.status}`);
const health = await res.json();
for (const [block, info] of Object.entries(health.blocks)) {
  console.log(`${block}: ${info.available_count}/${info.host_count} available`);
}

TypeScript SDK (@triport/sdk)

// The mesh admin health endpoint is an internal operational route and is not
// part of the public @triport/sdk client surface. Query it directly:
const res = await fetch("https://api.triport.io/v1/polygon/mesh/health", {
  headers: { "X-Admin-Token": process.env.TRIPORT_ADMIN_TOKEN ?? "" },
});
const health = (await res.json()) as {
  generated_at: string;
  blocks: Record<string, { host_count: number; available_count: number }>;
};

Python (triport-sdk)

import os
import requests


# Internal admin endpoint — not part of the triport-sdk public client.
resp = requests.get(
    "https://api.triport.io/v1/polygon/mesh/health",
    headers={"X-Admin-Token": os.environ["TRIPORT_ADMIN_TOKEN"]},
)
resp.raise_for_status()
for block, info in resp.json()["blocks"].items():
    print(block, info["available_count"], "/", info["host_count"])

Notes

  • Loopback-only by design. This endpoint is bound behind the mesh admin guard and is not exposed to external callers. It is not gated by tier, scope, or RPS limits because it never serves public traffic.
  • Block set varies by node. A block (bor, heimdall, aggregator) is included only when its pool is configured on the node being queried; expect fewer than three blocks on partial deployments.
  • Hosts are sorted by id for stable, diff-friendly output across repeated calls.
  • Related operational route: the Prometheus metrics mirror at /v1/polygon/metrics/.