get-report
dci get-report <id> [flags]
Returns the results of the specified report.
id— Report ID or name as shown bydci list-reports. Names match exactly, by unique substring, or by close typo; run without an argument in a terminal to pick from a filter-as-you-type list.
In an interactive terminal the result renders as a pivot by default:
groups as rows, time periods as columns, a totals row, a first-to-last
trend column, and heatmap shading by magnitude. Machine formats (json,
yaml, csv, toon), agent mode, and explicit -C column selections keep
the flat row layout; pass --flat to get flat rows in a terminal or
--pivot to force the matrix anywhere. Period columns are always UTC, since
they label billing buckets. --chart draws a chart under the table (human
mode only), --raw-numbers prints exact unformatted values, and
--rows keyed returns result.rows as objects keyed by schema name. See
Report results.
--time-range takes an ISO 8601 duration such as P7D, P3M, or P1Y, counted
back from today. --start-date and --end-date must be given together and
cannot be combined with --time-range. Neither changes the saved report.
Examples
# Run a saved report and show its results as a pivot (groups as rows, periods as columns, totals and trend).
dci get-report <report-id>
# The same, by report name.
dci get-report "Monthly AWS Spend"
# Override the report's time settings with an explicit date range (both dates required, yyyy-mm-dd).
dci get-report <report-id> --start-date 2026-01-01 --end-date 2026-01-31
# The last 30 days as JSON rows keyed by column name, for scripts.
dci get-report <report-id> --time-range P30D --rows keyed --output json
Flags
| Flag | Type | Default | Example | Description |
|---|---|---|---|---|
--time-range | string | P7D | An optional parameter to override the report time settings. Value should be represented in the format P[n]Y[n]M[n]D[n]. In the representations, the [n] is replaced by the value for each of the date and time elements that follow the [n]. | |
--start-date | string (date) | 2025-01-01 | An optional parameter to override the report time settings. Must be provided together with endDate. Format: yyyy-mm-dd | |
--end-date | string (date) | 2025-01-31 | An optional parameter to override the report time settings. Must be provided together with startDate. Format: yyyy-mm-dd |
Every command also accepts the CLI-wide flags for output shaping — see Output formats and Table output options.
Output
OK - The request succeeded.
By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.
| Field | Type | Description |
|---|---|---|
id | string | Report ID. |
reportName | string | The name of the report. |
owner | string | Email address of the report owner. |
type | string | One of: "custom", "preset". |
createTime | integer (int64) | The creation time of the report, in milliseconds since the epoch. |
updateTime | integer (int64) | The time when this report was last updated, in milliseconds since the epoch. |
urlUI | string | The URL of the report in DoiT console. |
labels | array of object | List of labels associated with the report. |
labels[].id | string | The unique identifier of the label. |
labels[].name | string | The name of the label. |
result | object | |
result.schema | array of object | |
result.schema[].id | string | Stable allocation-group ID used to select the allocation dimension in report configurations. Omitted for other report columns. |
result.schema[].name | string | Column name. Matches the corresponding value position in each row. |
result.schema[].type | string | Wire-format type of the column values. Dimension columns use string; metric columns use float (cost, usage, saving, custom, and extended metrics) or integer (count aggregation). Time-series reports include a timestamp column. One of: "string", "float", "integer", "timestamp". |
result.schema[].unit | string | Semantic unit of the column values. One of: "currency", "number", "percent". |
result.schema[].currency | string | Effective ISO 4217 currency code when unit is currency. |
result.schema[].aggregation | string | Authoritative aggregation applied to this metric column. One of: "total", "percent_total", "percent_col", "percent_row", "total_over_total", "count". |
result.mlFeatures | array of string | |
result.rows | array of array of string or number or integer | |
result.secondaryRows | array of array of string or number or integer | Secondary time range rows. |
result.forecastRows | array of array of string or number or integer | |
result.cacheHit | boolean | If true, results were fetched from the cache. |
Example response (--output json)
{
"id": "rpt_dummy001abc",
"reportName": "Monthly Cost by Service",
"type": "custom",
"createTime": 1704067200000,
"updateTime": 1706745600000,
"urlUI": "https://console.doit.com/customers/cust_dummy123/analyze/reports/rpt_dummy001abc",
"labels": [],
"result": {
"schema": [
{
"name": "service_description",
"type": "string"
},
{
"name": "cost",
"type": "float",
"unit": "currency",
"currency": "USD",
"aggregation": "total"
},
{
"name": "usage",
"type": "float",
"unit": "number",
"aggregation": "total"
}
],
"rows": [
[
"Amazon Elastic Compute Cloud",
4821.37,
12450
],
[
"Cloud Storage",
912.05,
893021
],
[
"BigQuery",
356.88,
42
]
],
"cacheHit": true
}
}
Raw JSON schema
{
"type": "object",
"description": "Results returned when running a report; includes schema and rows.",
"properties": {
"id": {
"type": "string",
"description": "Report ID."
},
"reportName": {
"type": "string",
"description": "The name of the report."
},
"owner": {
"type": "string",
"description": "Email address of the report owner."
},
"type": {
"type": "string",
"enum": [
"custom",
"preset"
]
},
"createTime": {
"type": "integer",
"description": "The creation time of the report, in milliseconds since the epoch.",
"format": "int64"
},
"updateTime": {
"type": "integer",
"description": "The time when this report was last updated, in milliseconds since the epoch.",
"format": "int64"
},
"urlUI": {
"type": "string",
"description": "The URL of the report in DoiT console."
},
"labels": {
"type": "array",
"items": {
"required": [
"id",
"name"
],
"type": "object",
"description": "Metadata for a label.",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the label."
},
"name": {
"type": "string",
"description": "The name of the label."
}
}
},
"description": "List of labels associated with the report."
},
"result": {
"type": "object",
"properties": {
"schema": {
"type": "array",
"items": {
"type": "object",
"description": "Schema of a report result column.",
"properties": {
"id": {
"type": "string",
"description": "Stable allocation-group ID used to select the allocation dimension in report configurations. Omitted for other report columns."
},
"name": {
"type": "string",
"description": "Column name. Matches the corresponding value position in each row."
},
"type": {
"type": "string",
"description": "Wire-format type of the column values. Dimension columns use string; metric columns use float (cost, usage, saving, custom, and extended metrics) or integer (count aggregation). Time-series reports include a timestamp column.",
"enum": [
"string",
"float",
"integer",
"timestamp"
]
},
"unit": {
"type": "string",
"description": "Semantic unit of the column values.",
"enum": [
"currency",
"number",
"percent"
]
},
"currency": {
"type": "string",
"description": "Effective ISO 4217 currency code when unit is currency.",
"example": "USD"
},
"aggregation": {
"type": "string",
"description": "Authoritative aggregation applied to this metric column.",
"enum": [
"total",
"percent_total",
"percent_col",
"percent_row",
"total_over_total",
"count"
]
}
}
}
},
"mlFeatures": {
"type": "array",
"items": {
"type": "string",
"enum": [
"increasing",
"decreasing",
"none",
"forecast"
]
}
},
"rows": {
"type": "array",
"items": {
"type": "array",
"items": {
"description": "The content of a single cell from a BigQuery result. Can be a string, number, or null.",
"nullable": true,
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "integer"
}
]
}
}
},
"secondaryRows": {
"type": "array",
"description": "Secondary time range rows.",
"items": {
"type": "array",
"items": {
"description": "The content of a single cell from a BigQuery result. Can be a string, number, or null.",
"nullable": true,
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "integer"
}
]
}
}
},
"forecastRows": {
"type": "array",
"items": {
"type": "array",
"items": {
"description": "The content of a single cell from a BigQuery result. Can be a string, number, or null.",
"nullable": true,
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "integer"
}
]
}
}
},
"cacheHit": {
"type": "boolean",
"description": "If true, results were fetched from the cache."
}
}
}
},
"example": {
"id": "rpt_dummy001abc",
"reportName": "Monthly Cost by Service",
"type": "custom",
"createTime": 1704067200000,
"updateTime": 1706745600000,
"urlUI": "https://console.doit.com/customers/cust_dummy123/analyze/reports/rpt_dummy001abc",
"labels": [],
"result": {
"schema": [
{
"name": "service_description",
"type": "string"
},
{
"name": "cost",
"type": "float",
"unit": "currency",
"currency": "USD",
"aggregation": "total"
},
{
"name": "usage",
"type": "float",
"unit": "number",
"aggregation": "total"
}
],
"rows": [
[
"Amazon Elastic Compute Cloud",
4821.37,
12450
],
[
"Cloud Storage",
912.05,
893021
],
[
"BigQuery",
356.88,
42
]
],
"cacheHit": true
}
}
}
Errors
On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.
HTTP status to exit code mapping
| HTTP status | Exit code | Error code | Meaning |
|---|---|---|---|
| 400 | 30 | VALIDATION_ERROR | The arguments or request body were rejected. Review the command's flags and payload. |
| 401 | 10 | AUTHENTICATION_FAILED | Not signed in, or the API token is invalid. Run dci login or check DCI_API_KEY. |
| 403 | 11 | PERMISSION_DENIED | The DoiT user or the active customer context does not have access. |
| 404 | 20 | RESOURCE_NOT_FOUND | The requested resource does not exist. Check the identifier argument. |
| 429 | 50 | RATE_LIMITED | Too many requests. Retryable — the CLI reports the server-provided delay. |
Related
- get-report-config — Get report config
- list-reports — List reports
- update-report — Update a report
- query — Run a query
- async-run-report-by-id — Run a saved report asynchronously
- API reference: GET /analytics/v1/reports/{id}
Aliases: getreport