---
title: "Export a report"
method: POST
path: "/gdc/exporter/executor"
tags: ["export-reports"]
---

# Export a report

`POST /gdc/exporter/executor`

## Request

- Base URL: `https://secure.gooddata.com`
- URL: `https://secure.gooddata.com/gdc/exporter/executor`
- Auth: none declared

For more information, see [Export a Report use case](#section/Use-Cases/Export-a-report).

**Additional export options**
Export API request may contain additional options to customize the output file (applicable only to tabular report in PDF or XLS format). Options are specified under `exportOptions` key:

* `pageOrientation` ("portrait" or "landscape", optional) Specifies page orientation of the file produced. Default is "portrait".

* `optimalColumnWidth` ("yes" or "no", optional) Specifies whether the column width in the exported PDF file should be uniform or adjusted according to the actual column data, default is "no".

* `scaling` (PDF export only, optional) - Specifies scaling of the page. Scaling applies to both landscape and portrait orientations.
    * `pageScalePercentage` (number, optional) - Specifies a percentage to scale the exported PDF. Cannot be used with other scaling keywords. **Default:** 100
    * `scaleToPages` (number, optional) - Specifies a maximum number of pages for the exported PDF. Cannot be used with other scaling keywords.
    * `scaleToPagesX` (number, optional) -  Shrinks the horizontal content of the exported PDF to a maximum of this number of pages. Often used with the scaleToPagesY keyword. Cannot be combined with the pageScalePercentage or scaleToPages keywords.
    * `scaleToPagesY` (number, optional) - Shrinks the vertical content of the exported PDFs to a maximum number of pages. Often used with the scaleToPagesX keyword. Cannot be combined with the pageScalePercentage or scaleToPages keywords.


* `mergeHeaders` ("yes" or "no", XLSX export only, optional) - Merges repeating header cells. Default is "yes".The content of the **result** section is **execResult** JSON (which is returned after report computation).

* `urlParams` - URL parameters needed to be propagated to the exported dashboard URL to support dashboard macros (to make macros like %URL_PARAM(<param_name>)% be rendered correctly).

## Request body

- ResultReq
  - `result_req` object, required
    - `format` 'pdf' | 'xls' | 'xlsx' | 'csv' | 'html' | 'png': desired ExportOptionsformat
    - `executionContext` string, uri: saved dashboard filters modified by user
    - `exportOptions` ExportOptions: Options that can modify the default export behavior. The options vary for each export format.
      - `scaling` object: supported in PDF
        - `pageScalePercentage` integer: down-scaling factor (in percent), 100 means no scale-down
        - `scaleToPages` integer: total number of pages of target PDF file
        - `scaleToPagesX` integer: number of horizontal pages of target PDF file
        - `scaleToPagesY` integer: number of vertical pages of target PDF file
      - `pageOrientation` 'portrait' | 'landscape': set page orientation; supported in PDF
      - `optimalColumnWidth` 'false' | 'true': set 'yes' to automatically resize all columns to fit cell's content; supported in PDF
      - `urlParams` object[]: URL params; supported in PDF
      - `mergeHeaders` 'false' | 'true': merges repeating header cells; supported in xlsx
    - `result` ExecResult, required
      - `execResult` object, required
        - `reportView` ReportView, required
          - `chart` ChartContent
            - `styles` object
            - `buckets` object, required
              - …
            - `axes` ChartAxisItem[]
              - …
            - `sort` object
              - …
          - `reportName` string, required
          - `columnWidths` ColumnWidth[], required
            - `locator` Locators[], required
              - …
            - `width` integer, required
          - `defaultColumnWidt` integer: configurable default grid column width transfered from reportDefinition
          - `filters` ReportFilter, required
            - `expression` string, required
            - `tree` MAQLTree1
              - …
          - `having` ReportFilter[]
            - `expression` string, required
            - `tree` MAQLTree1
              - …
          - `rows` GridElement[], required
            - union
              - …
          - `columns` GridElement[], required
            - union
              - …
          - `sort` Sort, required
            - `columns` string[], required
            - `rows` string[], required
          - `oneNumber` OneNumberVisualization
            - `labels` object, required
          - `format` 'grid' | 'chart' | 'oneNumber', required
          - `metrics` MetricInfo[], required
            - `format` string, required
            - `title` string, required
            - `metricId` string, required
          - `sortedLookups` AttributeSortRule[]
            - `attributeSort` object, required
              - …
          - `summary` string
          - `promptFilters` PromptFilter[]
            - `promptUri` string, uri, required
            - `expression` string, required
          - `locked` union
            - '0' | '1': transfered lock state from report if available, for reportDefinition or repDef. content is not filled
            - 0 | 1: transfered lock state from report if available, for reportDefinition or repDef. content is not filled
            - boolean: transfered lock state from report if available, for reportDefinition or repDef. content is not filled
          - `unlisted` union: Legacy boolean allowing boolean values represented by booleans or numbers
            - '0' | '1'
            - 0 | 1
            - boolean
        - `reportDefinition` string, uri: points to report definition, until executed by content only
        - `dataResult` string, uri, required: points to data
        - `geoResult` string, uri: link to the geo representation of the result

## Response `201`

_

- Uri: URI containing mandatory root key
  - `uri` string, uri, required

---

[API](https://skmtc.dev/gooddata/apis/gooddata-api-documentation.md) - [All operations](https://skmtc.dev/gooddata/apis/gooddata-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/gooddata/apis/gooddata-api-documentation/revisions/e5dc0ee6ab00?raw)
