Skip to content

Commit ddcc63a

Browse files
authored
Merge pull request #2370 from redis/DOC-5767
RC: Cost Report API
2 parents d41635a + 003a565 commit ddcc63a

File tree

5 files changed

+232
-2
lines changed

5 files changed

+232
-2
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
To get the cost report using the REST API:
2+
3+
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. Your account must have the **Owner** or **Viewer** role to generate a cost report through this endpoint.
4+
5+
The response includes a `taskId` that you can use to track the status of the report generation.
6+
7+
1. Use [`GET /tasks/{taskId}`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getTaskById" >}}) to check report generation status. The report is ready when the `status` is `processing-completed` and the `response` field contains a `costReportId`.
8+
1. Use [`GET /cost-report/{costReportId}`]({{< relref "/operate/rc/api/api-reference#tag/Account/operation/getCostReport" >}}) to download the generated cost report.
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
---
2+
Title: Generate FOCUS-compliant cost report
3+
linkTitle: Generate cost report
4+
alwaysopen: false
5+
categories:
6+
- docs
7+
- operate
8+
- rc
9+
description: Shows how to generate and download a cost report in FOCUS format using the Redis Cloud REST API.
10+
bannerText: The cost report API endpoint is currently in preview. [Contact support](https://redis.io/support/) to request access to this endpoint.
11+
weight: 60
12+
---
13+
14+
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.
15+
16+
{{< embed-md "rc-cost-report-api.md" >}}
17+
18+
The following sections provide examples for each step.
19+
20+
## Generate a cost report
21+
22+
To generate a cost report, use [`POST /cost-report`]({{< relref "/operate/rc/api/api-reference#tag/Account/operation/createCostReport" >}}). Your account must have the **Owner** or **Viewer** role to generate a cost report through this endpoint.
23+
24+
Include `startDate` and `endDate` in your request body using `YYYY-MM-DD` format. You can specify a date range up to 40 days.
25+
26+
```json
27+
{
28+
"startDate": "2025-01-01",
29+
"endDate": "2025-01-31"
30+
}
31+
```
32+
33+
More options and filters can be added to the request body to filter the report data.
34+
35+
| Option name | Type | Description |
36+
|-------------|--------|-------------|
37+
| `format` | Enum: `csv`, `json` | The format for the report file. Default is `csv`. |
38+
| `subscriptionIds` | Array of integers | Filters the report to only include the specified subscriptions. |
39+
| `databaseIds` | Array of integers | Filters the report to only include the specified databases. |
40+
| `subscriptionType` | Enum: `essentials`, `pro` | Filters the report to only include subscriptions of the specified type. |
41+
| `regions` | Array of strings | Filters the report to only include subscriptions in the specified regions. |
42+
| `tags` | Array of key-value pairs | Filters the report to only include databases with the specified [tags]({{< relref "/operate/rc/databases/tag-database" >}}). Both `key` and `value` are required for each tag. |
43+
44+
For example, the following request body generates a CSV report for all databases in the `us-east-1` region that have the `team:marketing` tag in January 2025:
45+
46+
```json
47+
{
48+
"startDate": "2025-01-01",
49+
"endDate": "2025-01-31",
50+
"format": "csv",
51+
"regions": ["us-east-1"],
52+
"tags": [
53+
{
54+
"key": "team",
55+
"value": "marketing"
56+
}
57+
]
58+
}
59+
```
60+
61+
The response body is a [task object]({{< relref "/operate/rc/api/get-started/manage-tasks#task-information" >}}) that contains the `taskId` for the task that generates the cost report:
62+
63+
```json
64+
{
65+
"taskId": "7ba51acc-cd1d-44c7-8453-281730d214ce",
66+
"commandType": "costReportCreateRequest",
67+
"status": "received",
68+
"description": "Task request received and is being queued for processing.",
69+
"timestamp": "2025-11-07T15:44:29.811142433Z",
70+
"links": [
71+
{
72+
"href": "https://api.redislabs.com/v1/tasks/7ba51acc-cd1d-44c7-8453-281730d214ce",
73+
"type": "GET",
74+
"rel": "task"
75+
}
76+
]
77+
}
78+
```
79+
80+
## Get cost report status
81+
82+
To get the status of the cost report generation, use [`GET /tasks/{taskId}`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getTaskById" >}}) with the `taskId` from the previous step.
83+
84+
When the report is ready, the `status` is `processing-completed` and the `response` field contains a `costReportId`:
85+
86+
```json
87+
{
88+
"taskId": "7ba51acc-cd1d-44c7-8453-281730d214ce",
89+
"commandType": "costReportCreateRequest",
90+
"status": "processing-completed",
91+
"description": "Request processing completed successfully and its resources are now being provisioned / de-provisioned.",
92+
"timestamp": "2025-11-07T15:44:31.168900133Z",
93+
"response": {
94+
"resource": {
95+
"costReportId": "a07524cf-6d4d-47ec-a1b7-810d1cbafcf7.json"
96+
}
97+
},
98+
"links": [
99+
{
100+
"href": "https://api.redislabs.com/v1/tasks/7ba51acc-cd1d-44c7-8453-281730d214ce",
101+
"type": "GET",
102+
"rel": "self"
103+
}
104+
]
105+
}
106+
```
107+
108+
## Download cost report
109+
110+
To get the cost report, use [`GET /cost-report/{costReportId}`]({{< relref "/operate/rc/api/api-reference#tag/Account/operation/getCostReport" >}}) with the `costReportId` from the previous step.
111+
112+
You can use this cost report with any FOCUS-compatible cost reporting tool to analyze and visualize your costs.
113+
114+
### Cost report fields
115+
116+
The cost report returned from the Redis Cloud REST API contains fields from the [FOCUS column library](https://focus.finops.org/focus-columns/). The Redis Cloud-specific implementation is described in the following sections.
117+
118+
#### Billing account and publisher fields
119+
120+
| Field | Type | Description |
121+
|---|---|---|
122+
| `BillingAccountId` | String | Redis Cloud account ID. |
123+
| `BillingAccountName` | String | Display name of the Redis Cloud account. |
124+
| `BillingAccountType` | String | Type of billing account structure. Always set to `Redis Cloud`. |
125+
| `PublisherName` | String | Publisher/vendor of the service, which is Redis. Always `redis.io`. |
126+
127+
#### Pricing fields
128+
129+
| Field | Type | Description |
130+
|---|---|---|
131+
| `PricingCategory` | String | Pricing model category. Always `Standard`. |
132+
| `PricingCurrency` | String | The currency used for pricing. Always `USD`. |
133+
| `PricingQuantity` | BigDecimal | Quantity of units being priced. For hourly services like Redis Cloud Pro, this is the number of hours. For monthly services like Redis Cloud Essentials and network costs, this is typically one month. |
134+
| `PricingUnit` | String | The unit of measure for pricing. Can be `Hours` (Pro), `Months` (Essentials), or `Network`. |
135+
136+
#### Period fields
137+
138+
| Field | Type | Description |
139+
|---|---|---|
140+
| `BillingPeriodStart` | Instant (ISO 8601 DateTime) | Start of the billing period (inclusive). |
141+
| `BillingPeriodEnd` | Instant (ISO 8601 DateTime) | End of the billing period (exclusive). |
142+
| `ChargePeriodStart` | Instant (ISO 8601 DateTime) | Start of the specific charge period (inclusive). May differ from billing period if the resource was created mid-period. |
143+
| `ChargePeriodEnd` | Instant (ISO 8601 DateTime) | End of the specific charge period (exclusive). May differ from billing period if the resource was deleted mid-period. |
144+
145+
#### Cost fields
146+
147+
| Field | Type | Description |
148+
|---|---|---|
149+
| `BilledCost` | BigDecimal | Cost that Redis will invoice you for. |
150+
| `BillingCurrency` | String (ISO 4217) | Currency code for all billing amounts. Always `USD`. |
151+
| `ConsumedQuantity` | BigDecimal | Actual amount of resources used. May be null for fixed-price plans. |
152+
| `ConsumedUnit` | String | Unit for `ConsumedQuantity`. Can be `Hours` or `Network`. |
153+
| `ContractedCost` | BigDecimal | Cost after applying contractual discounts but before credits. |
154+
| `ContractedUnitPrice` | BigDecimal | Per-unit price after applying your negotiated discounts. |
155+
| `EffectiveCost` | BigDecimal | True cost after all discounts, credits, and adjustments. |
156+
| `ListCost` | BigDecimal | Cost at Redis's published list prices before any discounts. |
157+
| `ListUnitPrice` | BigDecimal | Redis's published price per unit at list rates. |
158+
159+
#### Location, Resource, and SKU fields
160+
161+
| Field | Type | Description |
162+
|---|---|---|
163+
| `RegionId` | String | Cloud vendor region identifier. |
164+
| `RegionName` | String | Display name of the region. |
165+
| `ResourceId` | String | Identifier of the resource being charged. |
166+
| `ResourceName` | String | Display name you gave to the resource in the Redis Cloud console. |
167+
| `ResourceType` | String | Whether the charge is for a specific database or a subscription-level service. |
168+
| `Tags` | JSON Map<String, String> | User-defined tags on resources. |
169+
| `SkuPriceDetails` | JSON Map<String, Object> | Redis-specific technical details about the database configuration, such as RBUs, memory limit, and throughput. |
170+
171+
#### Charge fields
172+
173+
| Field | Type | Description |
174+
|---|---|---|
175+
| `ChargeCategory` | String | Category of the charge: `Usage`, `Purchase`, `Tax`, or `Adjustment`. |
176+
| `ChargeDescription` | String | A clear description of what you're being charged for, combining service type and resource details. |
177+
| `ChargeFrequency` | String | How often the charge occurs - always `Recurring`. |
178+
179+
#### Service fields
180+
181+
| Field | Type | Description |
182+
|---|---|---|
183+
| `ServiceCategory` | String | The high-level category of service - always `Databases`. |
184+
| `ServiceName` | String | The Redis Cloud service tier - `Redis Cloud Pro` or `Redis Cloud Essentials`. |
185+
| `ServiceSubcategory` | String | The specific type of database service - always `Caching`. |
186+

content/operate/rc/billing-and-payments/cost-report.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ weight: 39
1212

1313
The Redis Cloud cost report gives you a detailed breakdown of your Redis Cloud subscription usage and associated charges. You can use it to track, audit, and optimize your Redis Cloud spending across Essentials and Pro subscription plans.
1414

15-
You can download the cost report from the [**Billing and payments**]({{< relref "/operate/rc/billing-and-payments" >}}) and [**Usage reports**]({{< relref "/operate/rc/logs-reports/usage-reports" >}}) pages.
15+
You can download the cost report from the [**Billing and payments**]({{< relref "/operate/rc/billing-and-payments" >}}) and [**Usage reports**]({{< relref "/operate/rc/logs-reports/usage-reports" >}}) pages. You can also use the [Redis Cloud REST API](#rest-api) to get a cost report in [FOCUS](https://focus.finops.org/) format.
1616

1717
{{< embed-md "rc-cost-report-csv.md" >}}
1818

@@ -91,3 +91,14 @@ All columns after the **Total cost** column show the key values for any [tags]({
9191

9292
{{< embed-md "rc-pro-billing-units.md" >}}
9393

94+
## Get FOCUS format using REST API
95+
96+
{{< note >}}
97+
The cost report API endpoint is currently in preview. [Contact support](https://redis.io/support/) to request access to this endpoint.
98+
{{< /note >}}
99+
100+
You can use the [Redis Cloud REST API]({{< relref "/operate/rc/api" >}}) to get a cost report in [FinOps Open Cost and Usage Specification (FOCUS)](https://focus.finops.org/) compatible format.
101+
102+
{{< embed-md "rc-cost-report-api.md" >}}
103+
104+
The cost report returned from the Redis Cloud REST API contains fields from the [FOCUS column library](https://focus.finops.org/focus-columns/). See [Generate FOCUS-compliant cost report with REST API]({{< relref "/operate/rc/api/examples/generate-cost-report" >}}) for more details.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
Title: Redis Cloud changelog (December 2025)
3+
alwaysopen: false
4+
categories:
5+
- docs
6+
- operate
7+
- rc
8+
description: New features, enhancements, and other changes added to Redis Cloud during
9+
December 2025.
10+
highlights: FOCUS-compliant cost reports with REST API
11+
linktitle: December 2025
12+
weight: 55
13+
tags:
14+
- changelog
15+
---
16+
17+
## New features
18+
19+
### FOCUS-compliant cost reports with REST API
20+
21+
Select users can now generate and download [cost reports]({{< relref "/operate/rc/billing-and-payments/cost-report" >}}) in a [FinOps Open Cost and Usage Specification (FOCUS)](https://focus.finops.org/) compliant format using the Redis Cloud REST API. You can use this cost report with any FOCUS-compatible cost reporting tool to analyze and visualize your costs.
22+
23+
[Contact support](https://redis.io/support/) to request access to the cost report endpoint.
24+
25+
See [Generate FOCUS-compliant cost report with REST API]({{< relref "/operate/rc/api/examples/generate-cost-report" >}}) for examples.

content/operate/rc/changelog/november-2025.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ categories:
77
- rc
88
description: New features, enhancements, and other changes added to Redis Cloud during
99
November 2025.
10-
highlights: Redis 8.2 on Redis Cloud Pro, Automatic minor version upgrades
10+
highlights: Redis 8.2 on Redis Cloud Pro
1111
linktitle: November 2025
1212
weight: 60
1313
tags:

0 commit comments

Comments
 (0)