DOCS-2955: Add Usage API doc for Calico Cloud#2837
Conversation
✅ Deploy Preview succeeded!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for calico-docs-preview-next ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Adds a new Calico Cloud operations doc that explains how to generate a read-only API key in the web console and use it to run generated commands against the Usage API, and wires the new page into the operations sidebar.
Changes:
- Added a new
operations/usage-apidocumentation page describing API key creation and Usage API invocation. - Updated the Calico Cloud sidebar to include the new page after
usage-metrics.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| sidebars-calico-cloud.js | Adds the new operations/usage-api doc to the Calico Cloud operations navigation. |
| calico-cloud/operations/usage-api.mdx | New how-to page for generating an API key and using the Calico Cloud Usage API. |
|
|
||
| ## Prerequisites | ||
|
|
||
| * You are signed in to the web console as a user with the **Admin** and **Usage Metrics** roles, or the **Owner role**. |
|
|
||
| ## Additional information | ||
|
|
||
| * [Usage metrics](usage-metrics.mdx) |
Documents creating a read-only API key in the web console and using it to call the Usage API for vCPU usage data. Adds the page to the operations sidebar after usage-metrics.
fb2abc2 to
9d4e352
Compare
|
@asincu PTAL |
|
|
||
| 1. In the web console, click the user icon <IconUser width="20"/> **> Settings**. | ||
| 1. Under the **API Keys** tab, click **Generate new key**. | ||
| 1. Enter a description, choose a validity period, and then click **Create**. |
There was a problem hiding this comment.
We will be changing description to name
| * **Managed clusters** — per-cluster usage rows, with optional project filtering and CSV output. | ||
| * **Contracts** — your organization's contracts, including start and end dates, vCPU hours, package, and add-ons. | ||
| 1. Copy the generated command. | ||
| 1. In the command, replace `<your-secret>` with your API key, and set any query parameters, such as `startTime`, `endTime`, and `granularity`, for your query. |
There was a problem hiding this comment.
@asincu Should we mention in docs that the daily granularity limit of 93 days? (~3 months) and for monthly granularity is 3 years (36 months)?
{
"key": "time_range.too_large",
"message": "daily granularity is limited to a maximum range of 93 days"
}
{
"key": "time_range.too_large",
"message": "monthly granularity is limited to a maximum range of 36 months"
}

Adds a new operations page documenting how to create a read-only API key in the web console and use it to call the Calico Cloud Usage API for vCPU usage and managed cluster data. Adds the page to the operations sidebar after usage-metrics.