Skip to main content

What they are

@vertracloud/sdk-api (JavaScript/TypeScript), vertracloud-sdk-api (Python) and github.com/vertracloud/sdk-api-go (Go) are thin typed clients over the public API: one method per route, the same API key scopes, and nothing beyond that — no cache, no automatic retry, no state of its own. Use them instead of hand-rolling fetch/requests/net/http when you want types and errors already structured.

Installation

Authentication

All three clients take the API key at construction — the same key created under Settings → API keys in the dashboard, with the scopes your code will use (see Scopes).
All of them accept an optional base URL and timeout (baseUrl/timeoutMs, base_url/timeout, rest.WithBaseURL/rest.WithTimeout); the default already points to https://api.vertracloud.app. In Go, every call takes context.Context first and per-call options at the end — for example, rest.WithWorkspaceID(id) to act on a workspace resource.

Examples by domain

Applications

Databases

Snapshots

The scope ("applications" or "databases") is required on every snapshot call — the same resource ID could be an app or a database, and the API doesn’t guess.

Account

Workspaces

Billing and redemption

To redeem a promo code, use billing.redeem (client.billing.redeem(code) in JavaScript and Python, client.Billing.Redeem(ctx, code) in Go), with a key that has the redeem:write scope.

Streaming (apps.realtime)

GET /v1/apps/{id}/realtime is the only route in the catalog that streams live events (logs and system notes). JavaScript exposes an async generator; Python, an iterable stream object; Go, an iterator (Next/Event/Err) — none of them reconnect on their own if the connection drops.

Typed errors

Every response outside the 2xx range becomes a structured error, always with code (and details, when the API sends it) accessible — never a loose string to parse. In JavaScript and Python, the exception class indicates the HTTP status; in Go, every API error is a single *rest.APIError, and the status is checked through methods.
JavaScript
Python
Go
None of the clients print the API key to logs, toString()/__repr__/Error(), or error serialization — retry_after (in seconds) comes from details.retry_after in the error body or the Retry-After header on 429 responses. See Rate Limiting for per-route limits.

What you can’t do with an API key

Some management actions are only available in the dashboard, and are therefore not exposed by the SDKs: For AI agent automation over files, logs, apps and deploys, see the MCP server — it uses the same API key, with the same scope model.