Skip to Content
ReferenceAPI Reference

API Reference

Every endpoint, with its parameters, request and response schemas and the authentication it takes, is in the interactive API reference. It is generated from the server’s OpenAPI spec, and you can send requests from it with your token.

Authentication

Management endpoints take an API token as a bearer token. Set RUSTRAK_URL to your server’s address and RUSTRAK_TOKEN to the token:

curl -H "Authorization: Bearer $RUSTRAK_TOKEN" "$RUSTRAK_URL/api/projects"

Create one under Settings → API Tokens. SDKs authenticate ingestion with the key in their DSN instead.

For TypeScript, @rustrak/client wraps every endpoint with typed methods.

The spec from your own server

The published images are built without the openapi feature, so they do not serve the spec: use the reference above. A server you build with it serves two more public endpoints:

EndpointWhat it is
GET /api-docs/openapi.jsonThe OpenAPI 3 spec
GET /docsThe same interactive reference, served by the server
cargo build --release --features openapi

To write the spec to apps/server/openapi.json without running the server:

cargo run --bin gen_openapi --features openapi
Last updated on