Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions content/embeds/rc-cost-report-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
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.

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)

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 will contain a `costReportId`.
1. Use [`GET /cost-report/{costReportId}`]({{< relref "/operate/rc/api/api-reference#tag/Account/operation/getCostReport" >}}) to download the generated cost report.
Loading