---
title: "Export report tables"
method: GET
path: "/api/v1/reports/report-tables/export"
tags: ["reports"]
---

# Export report tables

`GET /api/v1/reports/report-tables/export`

## Request

- Base URL: `https://point11.ai`
- URL: `https://point11.ai/api/v1/reports/report-tables/export`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://auth.point11.ai/oauth2/authorize`, token URL `https://auth.point11.ai/oauth2/token`)

Export a report's whole table as one CSV file, with the values the report shows, named after the report (`name`) when given. Pass the report definition as JSON text (`definition`, as reports_report_tables_get takes it). Answers the file's name, type and size with a short-lived `url` to GET it (fetch it before `expiresAt`; call again for a fresh export). A definition that does not fit its dataset is 400 INVALID_INPUT; a campaign the organization has no such product campaign for is 404 RESOURCE_NOT_FOUND; a campaign with no results in the scope is 409 PRECONDITION_FAILED (`details.reason: no_results`). Every export is audited.

## Query parameters

- `definition` string, required: The report definition as JSON text: `{version: 1, grain: "aggregate", dataset, scope: {campaignId (null: every campaign of the product, pooled, where the dataset allows it), dateRange}, rows, columns, values: [{measure, showAs}], filters: [{dimension, values}], sort, compare, chart: {mark, orientation, x, y, topN, labels} | null}` or `{version: 1, grain: "records", dataset, scope, fields, filters, sort: {field, direction} | null}`, its keys the dataset's (reports.datasets.list.v1).
- `name` string, nullable: The report's name, which names the file; omit it for the dataset's.

## Headers

- `Point11-Organization` string, uuid

## Response `200`

Success.

- ReportsReportTablesExportResponse
  - `filename` string, required: Suggested file name for saving the bytes
  - `contentType` string, required
  - `byteLength` integer, required
  - `url` string, uri, nullable, required: Short-lived presigned URL that GETs the bytes; null when this deployment cannot sign the object
  - `expiresAt` string, date-time, nullable, required: When url stops working (minutes after the call); null with url
  - `exportId` string, uuid, required: This export's id, recorded on its audit row.
  - `rowCount` integer, required: Rows in the file after its header, the total row included.
  - `span` union, required: What the figures were read over: a window dataset's trailing 30-day results window, a range dataset's days, every campaign pooled, each over its own window, or one run as it ran (its figures state no precision).
    - object
      - `kind` 'window', required
      - `asOf` string, date, required: The UTC day every value is as of: its trailing 30 days.
      - `from` string, date, required
      - `to` string, date, required
      - `comparedTo` string, date, required: The as-of day of the window a comparison reads.
    - object
      - `kind` 'range', required
      - `from` string, date, required
      - `to` string, date, required
    - object
      - `kind` 'campaigns', required
      - `campaigns` integer, required: How many campaigns had results, each read over its own window.
      - `from` string, date, required: The earliest campaign window's first day.
      - `to` string, date, required: The latest campaign window's last day.
    - object
      - `kind` 'run', required
      - `runId` string, required: The run the figures were read from.
      - `day` string, date, required: The UTC day the run started.

## Other responses

- `400`: The input, query, or Idempotency-Key is invalid.
- `401`: The bearer is missing, expired, or not accepted.
- `403`: The credential lacks the operation's scope or role, or the operation needs a different door.
- `404`: The resource or organization does not exist for this caller.
- `405`: This path takes another HTTP method, named in `Allow`.
- `409`: The request conflicts with current state or with prior use of its Idempotency-Key.
- `413`: The request, or the answer it asks for, is too large; narrow it.
- `429`: The credential's rate budget is spent; retry after `Retry-After` seconds.
- `500`: An unexpected server failure; retry later. Only `request_id` identifies it.
- `503`: A dependency is temporarily unavailable; retry after `Retry-After` seconds.
- `default`: Another status a product answers for its own refusal (for example `415` for an unsupported attachment); branch on `code`.

---

[API](https://skmtc.dev/point11/apis/point11-api.md) · [All operations](https://skmtc.dev/point11/apis/point11-api/llms.txt) · [OpenAPI document](https://skmtc.dev/point11/apis/point11-api/revisions/36a84c7aca11?raw)
