Skip to main content
Automate cluster operations, integrate with your CI/CD, and build on top of the Ankra platform. The Ankra REST API lets you programmatically manage Ankra resources - such as clusters and add-ons - run operations, and retrieve statuses from your own tools, scripts, and pipelines.

Quickstart

1) Generate an API token

  1. Click your profile avatar (bottom‑left) in the Ankra dashboard.
  2. Profile → API Tokens → Add Token.
  3. Name the token, set permissions (if applicable), and copy it somewhere safe.
You won’t be able to view the token again after closing the dialog.

2) Make your first request

Bash (cURL)
Python
Node.js

Authentication

Use an API token in the Authorization header:
  • Tokens are created in the dashboard and may be scoped (if your organisation uses scoped tokens).
  • Revoke tokens anytime from Profile → API Tokens.
  • Prefer separate tokens for different use cases (e.g., CLI vs. CI/CD).

Security best practices

  • Treat tokens like passwords - never commit them to source control.
  • Grant only the minimum required permissions.
  • Rotate/revoke tokens regularly and immediately if you suspect compromise.
  • Store tokens as secrets in your CI/CD system (e.g., GitHub Actions, GitLab CI, Jenkins).
CLI example (authenticate once):
GitHub Actions example:

Errors

The API uses standard HTTP status codes. Error responses include a machine‑readable body to help diagnose issues.

Pagination & filtering

Endpoints that return collections may support pagination and filters. Refer to the endpoint’s page for available query parameters and response shapes.

Versioning

This reference covers the v1 API (/api/v1). Breaking changes are introduced only in new major versions; minor, non‑breaking updates may be added to v1.

Help & support

  • Check the endpoint pages for required parameters and examples.
  • Review token permissions if you receive 401/403 errors.
  • If you’re stuck, you can always reach us through the community slack.