Cost & Recommendations API
These endpoints expose the two things most integrations need: what you spent, and what KOSTRA recommends you do about it. All calls require thex-optscale-token header (see Authentication).
Query expenses
| Parameter | Description |
|---|---|
start_date, end_date | The period to report, as Unix timestamps |
cloud_account_id | Restrict to one or more data sources — for example, a single Huawei Cloud account |
pool_id | Restrict to a pool in your organization structure |
region | Restrict to a cloud region |
resource_type | Restrict to a kind of resource |
limit | Cap the number of records returned |
Pool expense breakdown
List recommendations
Recommendations for one resource
A savings-report integration
A common pattern:GET .../optimizationsto retrieve current findings and their savings.- Filter to the categories or services your team owns.
- Push each finding to your tracker, and re-pull on a schedule so resolved items drop off as KOSTRA re-evaluates.