Skip to content

crate.index()

index(opts?: RequestOptions): Promise<ApiRootIndex>

The self-describing API root — a machine-readable map of every resource plus a ‘cold start’ recipe, task recipes, and a runtime error catalogue (v2). The one keyless endpoint, so a new integration or an agent can discover what’s possible before committing to anything.

EndpointGET /api/v2
Authanon
ReturnsApiRootIndex
Retryableyes
Idempotentyes
const root = await crate.index(); // works without an apiKey
console.log(root.cold_start.problem);
root.resources.forEach((r) => console.log(r.name, r.auth));
  • CrateAPIError — on a non-2xx response.