Call Actors
Check Health
Check that an actor is reachable through the gateway. Resolves the actor, waits for it to be ready unless rvt-skip-ready-wait is set, and returns a plain-text ok.
GET https://api.rivet.dev/gateway/{actor}/health
Examples
curl "https://api.rivet.dev/gateway/$ACTOR_ID/health" \
-H "x-rivet-token: $RIVET_TOKEN"
import { createClient } from "rivetkit/client";
import type { registry } from "./index";
const client = createClient<typeof registry>(process.env.RIVET_ENDPOINT);
// The RivetKit client has no dedicated health call. Resolve the actor ID,
// build its gateway URL, and hit /health with plain fetch instead.
const actorId = await client.counter.getOrCreate(["my-counter"]).resolve();
const gatewayUrl = await client.counter.getForId(actorId).getGatewayUrl();
const response = await fetch(`${gatewayUrl}/health`);
console.log(response.status, await response.text()); // 200 ok
Authentication
Send a token in the x-rivet-token header, inline in the path as {actor_id}@{token}, or in the rvt-token query parameter. Use a public token (pk_) from browsers and a secret token (sk_) from trusted backends. See Authentication.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
actor | string | Yes | Actor ID, actor ID with an inline token ({actor_id}@{token}), or actor name combined with the rvt-* query parameters. |
Actor Selector
{actor} accepts an actor ID, an actor ID with an inline routing token ({actor_id}@{token}), or an actor name combined with the rvt-* query parameters below. See Actor Routing for the full rules.
Responses
200
The actor is running and reachable. Body is the text ok.
Content type: text/plain.