-
Notifications
You must be signed in to change notification settings - Fork 274
RC: Cost Report API #2370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
RC: Cost Report API #2370
Conversation
dwdougherty
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
mich-elle-luna
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
|
Missing some information related to FOCUS, for example, the list of fields FOCUS is providing (even 1 sentence and then add the link to the focus library fields (https://focus.finops.org/focus-columns/). |
ramiloif
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added detailed line-by-line comments based on the actual API implementation code. The main gaps are:
- Request body structure and parameters
- Validation rules (40-day limit, date format, etc.)
- Authentication/permission requirements
- Error responses documentation
- Beta API notice
- Response structure examples
Happy to provide more specific examples or clarifications for any of these!
| "servers": [ | ||
| { | ||
| "url": "https://api.redislabs.com/v1" | ||
| "url": "https://capi.k8s-billing-dev.sm-qa.qa.redislabs.com/v1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://capi.k8s-billing-dev.sm-qa.qa.redislabs.com/v1
This is the QA environment URL.
We shall stick with https://api.redislabs.com/v1
ramiloif
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added 6 focused comments identifying missing validation rules, error codes, and constraints from the implementation. Key items:
- 40-day maximum date range validation
- All 8 error codes with descriptions
- Beta status and permission requirements
- Tag validation rules
- HTTP 202 status clarification
All based on the actual API implementation code.
| ```json | ||
| { | ||
| "startDate": "2025-01-01", | ||
| "endDate": "2025-12-31" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing: Date range validation rules.
The implementation enforces a 40-day maximum date range. This should be documented here.
Suggested addition:
### Date range requirements
- Dates must be in `YYYY-MM-DD` format
- End date must be **after** start date (not equal)
- Maximum date range: **40 days**|
|
||
| You can use the Redis Cloud REST API to generate and download a cost report in a [FinOps Open Cost and Usage Specification (FOCUS)](https://focus.finops.org/) compatible format. The report includes detailed information about your Redis Cloud subscription usage and associated charges. | ||
|
|
||
| {{< embed-md "rc-cost-report-api.md" >}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing: Beta status and permission requirements.
Should add a note here:
{{< note >}}
- This is a **beta API** - contact Redis Cloud Support to opt in
- Requires **OWNER** or **VIEWER** permission
{{< /note >}}| | `subscriptionIds` | Array of integers | Filters the report to only include the specified subscriptions. | | ||
| | `databaseIds` | Array of integers | Filters the report to only include the specified databases. | | ||
| | `subscriptionType` | Enum: `essentials`, `pro` | Filters the report to only include subscriptions of the specified type. | | ||
| | `regions` | Array of strings | Filters the report to only include subscriptions in the specified regions. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing: Tag validation rules.
Should note that for tags:
- Both
keyandvalueare required - Neither can be empty or null
- Will return error codes if invalid (
COST_REPORT_TAG_KEY_EMPTYorCOST_REPORT_TAG_VALUE_EMPTY)
| @@ -0,0 +1,7 @@ | |||
| To get the cost report using the REST API: | |||
|
|
|||
| 1. Use [`POST /cost-report`]({{< relref "/operate/rc/api/api-reference#tag/Account/operation/createCostReport" >}}) to generate a cost report, with the request body containing the `startDate` and `endDate` for the report as well as any optional filters. The response includes a `taskId` that you can use to track the status of the report generation. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing: This embedded section should mention key constraints:
- Date range limited to 40 days maximum
- Both endpoints require OWNER or VIEWER permission
- This is a beta API (contact support to opt in)


Need to clear the openapi.json file before merging.