CredVault

Testing APIs with Swagger UI

CredVault ships an interactive OpenAPI explorer (Swagger UI). You can call real endpoints from the browser, see responses, and copy working request shapes — no client code required.

Open the API explorer

Go to:

https://credvault.net/api-docs

Or from any CredVault page, open /api-docs on the same host.

You should see the CredVault API title, a server selector, and tagged public data endpoints. The machine-readable OpenAPI document is also available at /swagger.json.

If you still see a CredVault “Page not found” screen, the edge proxy has not been updated yet. After Caddy routes /api-docs to the backend, this link works.

Before you test

  1. Create an API key in the dashboard (API Keys → Create New Key).
  2. Copy the key once (cvk_…). It is only shown at creation time.
  3. Grant at least the scopes you plan to try (data:read, data:write, webhooks:manage, etc.).

Authorize Swagger

  1. Click Authorize (padlock) at the top of Swagger UI.
  2. Prefer ApiKeyAuth — paste your full key into the X-API-Key value field.
  3. You can also use BearerAuth with cvk_… as the bearer token (same key).
  4. Click Authorize, then Close.

Every Try it out request will include that credential until you log out of the padlock dialog.

Try an endpoint

  1. Expand a path (for example GET /api/v1/data/{collection}).
  2. Click Try it out.
  3. Fill path/query fields (collection name, optional filters).
  4. Click Execute.
  5. Read the status code and JSON body below.

Quick smoke test

StepAction
1Authorize with cvk_…
2POST /api/v1/data/{collection} with a small JSON body
3GET /api/v1/data/{collection} and confirm the document appears
4GET /api/v1/data/{collection}/{id} with the returned _id

What is documented here

The explorer focuses on the public data API mounted at /api/v1/data:

  • Query / read documents
  • Create, update, delete documents
  • SQL-style LakeVault queries (POST /sql)
  • Batch operations
  • Webhook registration

Dashboard session routes (billing UI, admin, etc.) are not the primary surface in this explorer — use your cvk_… key against /api/v1/data/....

Curl equivalent

Swagger’s “Try it out” is the same request as:

Terminal
Test in API explorer
curl -sS https://credvault.net/api/v1/data/users \
  -H "X-API-Key: cvk_YOUR_KEY_HERE" \
  -H "Content-Type: application/json"
What you should seeA JSON response, an HTTP status, or a clear authentication or permission error.

Or with bearer style:

Terminal
Test in API explorer
curl -sS https://credvault.net/api/v1/data/users \
  -H "Authorization: Bearer cvk_YOUR_KEY_HERE"
What you should seeA JSON response, an HTTP status, or a clear authentication or permission error.

Common responses

StatusMeaningWhat to do
200 / 201SuccessUse the JSON body
401Missing or invalid keyRe-authorize; confirm the key starts with cvk_
403Key valid but scope too narrowAdd data:read / data:write / webhooks:manage
404No active cluster or missing documentCreate a cluster first, or check the id
429Rate limitedWait, then retry

Next steps

  • Create and rotate keys: API Keys
  • Install the CLI for the same backend: CIE CLI
  • Keep /api-docs open while you paste generated requests into your app