Ankra API Reference Introduction
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 addons—run operations, and retrieve statuses from your own tools, scripts, and pipelines.Quickstart
1) Generate an API token
- Click your profile avatar (bottom‑left) in the Ankra dashboard.
- Profile → API Tokens → Add Token.
- 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)Authentication
Use an API token in theAuthorization
header:
- Tokens are created in the dashboard and may be scoped (if your organization 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).
Errors
The API uses standard HTTP status codes. Error responses include a machine‑readable body to help diagnose issues.Code | Meaning |
---|---|
200 | Success |
400 | Bad request / validation |
401 | Missing or invalid token |
403 | Insufficient permissions |
404 | Resource not found |
429 | Too many requests (rate limit) |
5xx | Server errors |
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.