list-reports
dci list-reports [flags]
Returns a list of all Cloud Analytics reports that your account has access to. Reports are returned in reverse chronological order by default.
CLI default view
dci list-reports presents a curated table by default:
- Columns:
report name(fromreportName; a clickable link to the report in the DoiT console in interactive terminals),owner,updated (UTC)(fromupdateTime),folder(folderIdresolved to the folder name; blank for top-level reports), andlabels(label names, comma-joined). - In interactive tables,
updated (UTC)renders in your local timezone and is titledupdated (local); machine formats, agent mode, and--utckeep UTC — see Timestamps and timezones. - Rows are sorted by last update, newest first.
--output jsonand explicit-C/--fieldsselections return the raw fields documented below.
Examples
# Your most recently updated reports (one page of 50).
dci list-reports
# Reports owned by one user (server-side filter; keys are reportName, owner, type, updateTime, folderId, joined with `|`).
# Reports whose name contains a word, case-insensitively (combines with `--filter` using AND).
dci list-reports --name-contains sprint
# Every report as JSON, for scripts.
dci list-reports --all --output json
# Browse in the full-screen viewer; Enter prints the selected report's id.
dci list-reports -M interactive
Flags
| Flag | Type | Default | Example | Description |
|---|---|---|---|---|
--max-results | integer (int64) | 50 | The maximum number of results to return in a single page. Use the page tokens to iterate through the entire collection. | |
--page-token | string | Page token, returned by a previous call, to request the next page of results | ||
--filter | string | reportName:This Month vs. Last | An expression for filtering the results. The syntax is key:[<value>]. Multiple filters can be connected using a pipe |. See Filters. Possible filter keys: reportName, owner, type, updateTime, folderId | |
--name-contains | string | monthly spend | Case-insensitive substring match against the resource name. Combined with the "filter" parameter using AND semantics. | |
--min-creation-time | string | Min value for reports creation time, in milliseconds since the POSIX epoch. If set, only reports created after or at this timestamp are returned. | ||
--max-creation-time | string | Max value for reports creation time, in milliseconds since the POSIX epoch. If set, only reports created before or at this timestamp are returned. |
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 |
|---|---|---|
pageToken | string | Page token. It is used to request a specific page of the list results. |
rowCount | integer (int64) | The number of returned records. |
reports | array of object | |
reports[].id | string | Report ID. |
reports[].reportName | string | The name of the report. |
reports[].owner | string | Email address of the report owner. |
reports[].type | string | One of: "custom", "preset". |
reports[].createTime | integer (int64) | The creation time of the report, in milliseconds since the epoch. |
reports[].updateTime | integer (int64) | The time when this report was last updated, in milliseconds since the epoch. |
reports[].urlUI | string | The URL of the report in DoiT console. |
reports[].labels | array of object | List of labels associated with the report. |
reports[].labels[].id | string | The unique identifier of the label. |
reports[].labels[].name | string | The name of the label. |
Raw JSON schema
{
"type": "object",
"description": "List of reports.",
"properties": {
"pageToken": {
"type": "string",
"description": "Page token. It is used to request a specific page of the list results."
},
"rowCount": {
"type": "integer",
"description": "The number of returned records.",
"format": "int64",
"example": 5
},
"reports": {
"type": "array",
"items": {
"type": "object",
"description": "Report metadata and the console URL.",
"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."
}
}
}
}
}
}
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. |
Related
- get-report — Get report results
- get-report-config — Get report config
- create-report — Create a report
- update-report — Update a report
- delete-report — Delete a report
- API reference: GET /analytics/v1/reports
Aliases: listreports