メインコンテンツへスキップ

get-report

dci get-report <id> [flags]

Returns the results of the specified report.

  • id — Report ID or name as shown by dci 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.
Result rendering

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 overrides

--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

FlagTypeDefaultExampleDescription
--time-rangestringP7DAn 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-datestring (date)2025-01-01An optional parameter to override the report time settings. Must be provided together with endDate. Format: yyyy-mm-dd
--end-datestring (date)2025-01-31An 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.

FieldTypeDescription
idstringReport ID.
reportNamestringThe name of the report.
ownerstringEmail address of the report owner.
typestringOne of: "custom", "preset".
createTimeinteger (int64)The creation time of the report, in milliseconds since the epoch.
updateTimeinteger (int64)The time when this report was last updated, in milliseconds since the epoch.
urlUIstringThe URL of the report in DoiT console.
labelsarray of objectList of labels associated with the report.
labels[].idstringThe unique identifier of the label.
labels[].namestringThe name of the label.
resultobject
result.schemaarray of object
result.schema[].idstringStable allocation-group ID used to select the allocation dimension in report configurations. Omitted for other report columns.
result.schema[].namestringColumn name. Matches the corresponding value position in each row.
result.schema[].typestringWire-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[].unitstringSemantic unit of the column values. One of: "currency", "number", "percent".
result.schema[].currencystringEffective ISO 4217 currency code when unit is currency.
result.schema[].aggregationstringAuthoritative aggregation applied to this metric column. One of: "total", "percent_total", "percent_col", "percent_row", "total_over_total", "count".
result.mlFeaturesarray of string
result.rowsarray of array of string or number or integer
result.secondaryRowsarray of array of string or number or integerSecondary time range rows.
result.forecastRowsarray of array of string or number or integer
result.cacheHitbooleanIf true, results were fetched from the cache.

Example response (--output json)

{
"id": "rpt_dummy001abc",
"reportName": "Monthly Cost by Service",
"owner": "[email protected]",
"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",
"owner": "[email protected]",
"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 statusExit codeError codeMeaning
40030VALIDATION_ERRORThe arguments or request body were rejected. Review the command's flags and payload.
40110AUTHENTICATION_FAILEDNot signed in, or the API token is invalid. Run dci login or check DCI_API_KEY.
40311PERMISSION_DENIEDThe DoiT user or the active customer context does not have access.
40420RESOURCE_NOT_FOUNDThe requested resource does not exist. Check the identifier argument.
42950RATE_LIMITEDToo many requests. Retryable — the CLI reports the server-provided delay.

Aliases: getreport