> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics

> Analytics reports: create them from a question, read their rows, see how each column is calculated, and explore what can be reported on.

## Queries

* [`analyticsCatalogEntities`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/queries/analytics-catalog-entities) — What analytics reports can be about with the store's Redo products: each entity a report can have one row per. Use `analyticsCatalogEntityDetails` to see what a report on one can show, and `analyticsCatalogSearch` to find where a metric lives.
* [`analyticsCatalogEntityDetails`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/queries/analytics-catalog-entity-details) — The fields, metrics, filters and relationships of catalog entities, to see what a report can show before asking for one.
* [`analyticsCatalogSearch`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/queries/analytics-catalog-search) — Search the analytics catalog by name, synonym or value, one result per term. Use it to check whether something can be reported on before asking for a report.
* [`analyticsReport`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/queries/analytics-report) — Fetch an analytics report by its id. Null when no such report exists or it belongs to another store.
* [`analyticsReportExport`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/queries/analytics-report-export) — An export from `analyticsReportExportStart`. Null when no such export exists for this store.
* [`analyticsReportRows`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/queries/analytics-report-rows) — Read an analytics report's rows. The first page runs the report once and saves the result for about a day; later pages, paged with the cursors it returns, read that saved result without running the report again, so they stay consistent even if the report is edited meanwhile. Pages hold up to 500 rows (100 by default), and only the first 100000 rows can be paged: use analyticsReportExportStart for more. A request may read at most 4 pages. An agent should not page through more than about 1,000 rows; edit the report to aggregate, or export it, instead. Null when the report does not exist or belongs to another store. Throws REPORT\_NOT\_READY (409) while the report is PREPARING or FAILED, RESULT\_EXPIRED (410) once a cursor's saved result has expired, and INVALID\_CURSOR or EXPORT\_REQUIRED (400).
* [`analyticsReports`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/queries/analytics-reports) — List the store's analytics reports, newest first.

## Mutations

* [`analyticsReportCreateFromPlan`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/mutations/analytics-report-create-from-plan) — Save a report from `analyticsReportPlan` without planning it again. Null when the plan is unknown or was made by another user or store.
* [`analyticsReportDelete`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/mutations/analytics-report-delete) — Delete a report, its versions and its schedule. Returns true if an owned report was deleted, false if none matched. Throws REPORT\_NOT\_READY (409) while the report is PREPARING.
* [`analyticsReportDuplicate`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/mutations/analytics-report-duplicate) — Copy a READY report into a new one. Returns the copy, or null when the report does not exist. Throws REPORT\_NOT\_READY (409) until the report is READY, and STALE\_REPORT (409) when it changed while being copied; retry.
* [`analyticsReportEdit`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/mutations/analytics-report-edit) — Change what a report calculates by describing the change in plain English, such as `add a column for refund amount` or `only last quarter`. Saves a new version. Takes 10 to 30 seconds. Null when the report does not exist. Throws ANALYTICS\_REPORT\_EDIT\_NOT\_POSSIBLE (400), with the reasons in the message, when the change can't be made as asked, and REPORT\_NOT\_READY (409) while the report is PREPARING.
* [`analyticsReportExportStart`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/mutations/analytics-report-export-start) — Write every row of a READY report to a CSV in the background. Returns the export while it is RUNNING; poll `analyticsReportExport` for the download link. The file is kept for 24 hours after the export starts. Null when the report does not exist. Throws REPORT\_NOT\_READY (409) until the report is READY.
* [`analyticsReportGenerate`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/mutations/analytics-report-generate) — Ask a question and have Redo build a report for it in the background. Returns the report while it is PREPARING; poll `analyticsReport` until it is READY (usually 10 to 30 seconds) or FAILED. To see what would be built first, use `analyticsReportPlan`.
* [`analyticsReportPlan`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/mutations/analytics-report-plan) — See what report Redo would build for a question, and whether it can be built as asked, without saving one. Also answers whether something can be reported on at all. To change a plan before saving it, call this again with the change as `question` and the plan's `planId` as `basePlanId`. Takes 10 to 30 seconds. Throws ANALYTICS\_PLAN\_NOT\_FOUND (404) when `basePlanId` is unknown or was made by another user or store.
* [`analyticsReportRevisionRestore`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/mutations/analytics-report-revision-restore) — Restore a saved version of a report from its `revisions`. Saves the restored version as a new one, so nothing is lost. Null when the report does not exist. Throws REVISION\_NOT\_FOUND (404) when it has no version with that number.
* [`analyticsReportScheduleRemove`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/mutations/analytics-report-schedule-remove) — Stop delivering a report on a schedule. Null when the report does not exist.
* [`analyticsReportScheduleSet`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/mutations/analytics-report-schedule-set) — Deliver a report on a schedule by email, SFTP or both, replacing any schedule it has. Deliveries run in the report's timezone. Null when the report does not exist. Throws INVALID\_SCHEDULE (400) for a bad cadence, cron or email address, REPORT\_NOT\_READY (409) until the report is READY, and STALE\_REPORT (409) when its schedule changed meanwhile; read the report again and retry.
* [`analyticsReportUpdate`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/mutations/analytics-report-update) — Change a report's title, timezone, columns or sorting, and save a new version. Null when the report does not exist. Throws STALE\_REPORT (409) when `expectedUpdatedAt` is out of date.

## Objects

* [`AnalyticsCatalogDefinition`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-catalog-definition) — A calculation Redo defines on an entity: a metric to summarize, or a filter to apply.
* [`AnalyticsCatalogEntity`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-catalog-entity) — Something an analytics report can have one row per, such as returns or orders.
* [`AnalyticsCatalogEntityDetail`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-catalog-entity-detail) — An entity with everything a report on it can use.
* [`AnalyticsCatalogEntityDetails`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-catalog-entity-details) — The entities asked for, and the names that could not be used.
* [`AnalyticsCatalogField`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-catalog-field) — A value a report can show, group by, or filter on.
* [`AnalyticsCatalogMatch`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-catalog-match) — Something in the analytics catalog that matches a search term.
* [`AnalyticsCatalogRelationship`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-catalog-relationship) — How another entity relates to this one.
* [`AnalyticsReport`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report) — An analytics report: a question answered as a table, with columns, filters and sorting. Read its rows with `analyticsReportRows`, or export them all with `analyticsReportExportStart`.
* [`AnalyticsReportCadence`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-cadence) — When a scheduled report is delivered, in the report's timezone.
* [`AnalyticsReportColumn`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-column) — A report column and how it is calculated, written for a reader rather than as SQL.
* [`AnalyticsReportDefinition`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-definition) — What a report shows and how: its columns with their calculations, its filters, sorting and row limit.
* [`AnalyticsReportExport`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-export) — A CSV of every row of an analytics report, written in the background and kept for 24 hours after the export starts. Use it for more rows than `analyticsReportRows` should page.
* [`AnalyticsReportFilterDescription`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-filter-description) — A filter a report or column applies, in plain English.
* [`AnalyticsReportPlan`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-plan) — What Redo would build for a question, without saving a report. Pass `planId` to `analyticsReportCreateFromPlan` to save it.
* [`AnalyticsReportPlanColumn`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-plan-column) — A column a planned report would have.
* [`AnalyticsReportResultColumn`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-result-column) — A column of a report's rows, in the order `AnalyticsReportRow.values` lists them.
* [`AnalyticsReportRevision`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-revision) — A saved version of a report. Restore one with `analyticsReportRevisionRestore`.
* [`AnalyticsReportRow`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-row) — One row of an analytics report.
* [`AnalyticsReportSchedule`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-schedule) — When and where a report is delivered on a schedule.
* [`AnalyticsReportSort`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-sort) — One column a report is sorted by.

## Input objects

* [`AnalyticsReportCadenceInput`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-cadence-input) — When a report is delivered, in the report's timezone. WEEKLY needs `dayOfWeek`; MONTHLY needs `dayOfMonth`.
* [`AnalyticsReportColumnInput`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-column-input) — A column to keep, and optionally a new header for it.
* [`AnalyticsReportScheduleInput`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-schedule-input) — When and where to deliver a report. Give `cadence` or `cronExpression`, and at least one of `emailRecipients` or `sftpDelivery`.
* [`AnalyticsReportSortInput`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-sort-input) — A column to sort by.
* [`UpdateAnalyticsReportInput`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/update-analytics-report-input) — Changes to a report's settings. Omit a field to leave it unchanged. To change what the report calculates, use `analyticsReportEdit`.

## Enums

* [`AnalyticsCatalogMatchKind`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-catalog-match-kind) — What a catalog search match is.
* [`AnalyticsReportColumnKind`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-column-kind) — What a column holds, and so how its values are written in `AnalyticsReportRow.values`.
* [`AnalyticsReportExportStatus`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-export-status) — Where an analytics report export stands.
* [`AnalyticsReportFailureCode`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-failure-code) — Why an analytics report failed.
* [`AnalyticsReportFrequency`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-frequency) — How often a scheduled analytics report is delivered.
* [`AnalyticsReportPlanStatus`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-plan-status) — Whether a planned report can be made as asked.
* [`AnalyticsReportSortKey`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-sort-key) — A field this list can be ordered by; pass to the list's `orderBy` argument and pair with `reverse` to flip direction.
* [`AnalyticsReportStatus`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-status) — Where an analytics report stands.
* [`AnalyticsReportWeekday`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-report-weekday) — A day of the week.
* [`AnalyticsSortDirection`](https://developers.redo.com/docs/api-reference/v3/reference/analytics/analytics-sort-direction) — The direction an analytics report column is sorted in.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.