SDKs

TypeScript

Use @riptide/admin-client to call the Admin API from TypeScript. Request and response types come from the OpenAPI contract. The client handles retries, timeouts, idempotency keys, structured errors, and pagination.

Install and call

Use the Admin client in a server application that manages Riptide resources. For example, an onboarding service can create a publisher and then list the publishers already in its sandbox, as shown below. Supply your control-plane URL, tenant ID and authorized API key on the server; keep the key out of browser code.

npm install @riptide/admin-client

import { AdminAPIError, AdminClient } from "@riptide/admin-client";
const rt = new AdminClient({ baseUrl: "https://app.acme.example", apiKey: process.env.RIPTIDE_API_KEY });

try {
  const pub = await rt.call("createPublisher", { path: { tenant_id }, body: { public_id: "acme-pub", name: "Acme" } });
} catch (err) {
  if (err instanceof AdminAPIError) console.error(err.status, err.code, err.hint, err.requestId);
}

for await (const pub of rt.pages("listPublishers", { path: { tenant_id } })) console.log(pub.public_id);

Every operation id in the contract is a valid first argument, and its path, query, body and result are typed by the operations interface. TypeScript checks field names; missing required path parameters also return a named runtime error. Iterate through list responses with pages(), or gather all items with collect(). These helpers use items and next_cursor and raise CursorLoopError if the server repeats a cursor.

OptionBehaviour
apiKey / bearerAn rt_key_ API key sent as X-Riptide-Api-Key, or a session/JWT bearer token.
timeoutMsPer attempt, default 30 000; 0 disables.
retryFour attempts, 250 ms base doubling with full jitter, 5 s cap; a Retry-After (seconds or HTTP-date) replaces the wait and is capped too.
idempotencyKeyGenerator for mutating calls (default crypto.randomUUID); the same key is re-sent on every retry, or pass idempotencyKey per call to replay a known one.
fetch, headers, userAgentSupply a fetch implementation, extra headers, or a custom User-Agent.

Errors and retries

A non-2xx rejects with AdminAPIError: code is the stable error category (BAD_INPUT, UNAUTHORIZED, FORBIDDEN, NOT_ENTITLED, NOT_FOUND, LIMITING, TIMEOUT, CONFLICT, INTERNAL), hint a more specific error identifier, details the per-field errors on a BAD_INPUT, message free text that may change between releases. 429, 502, 503 and 504 and network errors are retried. Reads can always be retried; mutations require an Idempotency-Key so the server can return the original result. The same contract applies to the Python and Go SDKs and the CLI.

Use Python or Go for your integration

The Python and Go clients cover the same Admin API operations. Choose the client that fits your application while keeping the same permissions, request formats and retry behavior.