get-report
dci get-report id [flags]
Returns the results of the specified report.
Flags
--time-range: (string)
--start-date: (string format:date)
--end-date: (string format:date)
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 | |
result.schema[].type | string | |
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. |
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"
},
"type": {
"type": "string"
}
}
}
},
"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."
}
}
}
}
}
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 | 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. |
Aliases: getreport