> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Export data from a report

POST https://api.sigmacomputing.com/v2/reports/{reportId}/export
Content-Type: application/json

This endpoint lets you create a file containing data exported from a report. Export the entire report or a single report page. Reports are exported as PDF documents.

Successful requests return a **queryId**. Use the **queryId** with the [/v2/query/\{queryId}/download](https://help.sigmacomputing.com/reference/download-query) endpoint to download the file when it is ready. See [Download an exported file](https://help.sigmacomputing.com/reference/download-query).

To export a report to a specific destination or recipient, see the [/v2/reports/\{reportId}/send](https://help.sigmacomputing.com/reference/send-report) endpoint.

### Usage notes

* Retrieve the **reportId** by calling the [/v2/reports](https://help.sigmacomputing.com/reference/list-reports) endpoint.
* This endpoint is rate limited to 400 requests per minute.
* If a page contains an expanded table, all pages of that table's data are included in the export, even if only the first page of the table is selected.
* Only PDF exports are supported. Use the `layout` parameter to specify either `portrait` or `landscape` layout.
* For security and privacy reasons, the `queryId` used to download the exported file expires 1 hour after your request is received. You can extend this to 6 hours using the `resultsValidityTimeMs` parameter.

### Usage scenarios

* **Conditional report export**: Based on an external set of conditions, export a report from Sigma.
* **Integration**: Integrate enriched and analyzed data with other applications, providing the necessary data in a format that these applications can process.

### Best practices

* Clearly specify parameters to retrieve only the necessary data, optimizing performance and reducing network load.

Reference: https://help.sigmacomputing.com/reference/export-report

## Authentication

- OAuth2 — send the obtained token as `Authorization: Bearer <token>`

## Servers

- `https://api.sigmacomputing.com` (Server for GCP (US) hosted organizations, default)
- `https://api.sa.gcp.sigmacomputing.com` (Server for GCP (KSA) hosted organizations)
- `https://api.uk.gcp.sigmacomputing.com` (Server for GCP (UK) hosted organizations)
- `https://aws-api.sigmacomputing.com` (Server for AWS US (West) hosted organizations)
- `https://api.us-a.aws.sigmacomputing.com` (Server for AWS US (East) hosted organizations)
- `https://api.ca.aws.sigmacomputing.com` (Server for AWS Canada hosted organizations)
- `https://api.eu.aws.sigmacomputing.com` (Server for AWS Europe (Frankfurt) hosted organizations)
- `https://api.ch.aws.sigmacomputing.com` (Server for AWS Europe (Zurich) hosted organizations)
- `https://api.au.aws.sigmacomputing.com` (Server for AWS Australia and APAC hosted organizations)
- `https://api.uk.aws.sigmacomputing.com` (Server for AWS UK hosted organizations)
- `https://api.in.aws.sigmacomputing.com` (Server for AWS Asia Pacific (Mumbai) hosted organizations)
- `https://api.us.azure.sigmacomputing.com` (Server for Azure US hosted organizations)
- `https://api.eu.azure.sigmacomputing.com` (Server for Azure Europe hosted organizations)
- `https://api.ca.azure.sigmacomputing.com` (Server for Azure Canada hosted organizations)
- `https://api.uk.azure.sigmacomputing.com` (Server for Azure United Kingdom hosted organizations)
- `https://api.au.azure.sigmacomputing.com` (Server for Azure Australia hosted organizations)

## Request

### Path parameters

- `reportId` (string, required) — Unique identifier of the report.

### Body (application/json)

This endpoint expects a reports_exportReport_Request.

- `reports_exportReport_Request`
  - Export an entire report: ReportsExportReportRequest0
  - Export a page of a report: ReportsExportReportRequest1

## Response

### 200

The response body.

- `jobComplete` (boolean, required)
- `queryId` (string, required)
- `rows` (list of map from string to any, optional)
- `message` (string, optional)

## Types

### ReportsExportReportRequest0

Export an entire report

- `format` (V2ReportsReportIdExportPostRequestBodyContentApplicationJsonSchemaOneOf0Format, required)
- `parameters` (map from string to string, optional) — Specify the control ID and control value of one or more control elements in the workbook or report to filter the returned data. The control must exist in the Sigma workbook or report and target an element before you can export based on the control value. **Syntax** \{ control-id: control-value } The control-id is configured in the Sigma workbook or report. The control-value is the value that is passed to the control. Values can take multiple forms, depending on the data type of the control: **Boolean** * Single value: "true" | "false" | ":null" * List of Boolean: "true,false,:null" (No space after the comma.) **Number** * Single value: "10.54", ":null" * List of values: "10.54,23.45,:null" (No space after the comma.) * Range of numbers: "min:10.54,max:23.45" (No space after the comma or colon.) **Text** * Single value: "some-text" | ":null" | ":empty" * List of values: "some-text,more-text,:null,:empty" (No space after the comma.) **Date** All dates use UTC time zones. * Fixed date using ISO-6801 format: "2022-01-01T01:01:59" | ":null" * Formats supported (where: %Y: year, %m: month, %d: day, %H:hours, %M: minutes, %S: seconds): * %Y-%m-%d * %Y-%m-%dT%H:%M * %Y-%m-%dT%H:%M:%S * List of fixed dates: "2022-01-01T01:01:59,2022-02-02T02:02:59,:null" * Relative date: "prior-day-3" | "next-day-3" * Format: \[prior|next]-\[year|quarter|month|week|isoWeek|day|hour|minute]-\[number] * Date range: "min:2022-01-01T01:01:59,max:next-day-3" (No spaces after the comma or colon.) * Leave max blank for "on or after" and min blank for "on or before", for example: * "Date-Range": "min:2020-04-01,max:" * "Date-Range": "min:,max:next-day-3" **Notes** * ":null" is a special value that denotes the null primitive value. * ":empty" is a special value that denotes the empty string "". Use [URL encoding](https://help.sigmacomputing.com/docs/special-characters-for-url-parameters) to encode characters in your control values (such as commas) to prevent the system from interpreting them as separators. For example: "New York, NY,Boston, MA" can be encoded as: "New%20York%2C%20NY,Boston%2C%20MA"
- `timeout` (double, optional)
- `tag` (string, optional) — Specifies the version tag of the report to be exported.

### ReportsExportReportRequest1

Export a page of a report

- `pageId` (string, required) — Identifier of the report page.
- `format` (V2ReportsReportIdExportPostRequestBodyContentApplicationJsonSchemaOneOf1Format, required)
- `parameters` (map from string to string, optional) — Specify the control ID and control value of one or more control elements in the workbook or report to filter the returned data. The control must exist in the Sigma workbook or report and target an element before you can export based on the control value. **Syntax** \{ control-id: control-value } The control-id is configured in the Sigma workbook or report. The control-value is the value that is passed to the control. Values can take multiple forms, depending on the data type of the control: **Boolean** * Single value: "true" | "false" | ":null" * List of Boolean: "true,false,:null" (No space after the comma.) **Number** * Single value: "10.54", ":null" * List of values: "10.54,23.45,:null" (No space after the comma.) * Range of numbers: "min:10.54,max:23.45" (No space after the comma or colon.) **Text** * Single value: "some-text" | ":null" | ":empty" * List of values: "some-text,more-text,:null,:empty" (No space after the comma.) **Date** All dates use UTC time zones. * Fixed date using ISO-6801 format: "2022-01-01T01:01:59" | ":null" * Formats supported (where: %Y: year, %m: month, %d: day, %H:hours, %M: minutes, %S: seconds): * %Y-%m-%d * %Y-%m-%dT%H:%M * %Y-%m-%dT%H:%M:%S * List of fixed dates: "2022-01-01T01:01:59,2022-02-02T02:02:59,:null" * Relative date: "prior-day-3" | "next-day-3" * Format: \[prior|next]-\[year|quarter|month|week|isoWeek|day|hour|minute]-\[number] * Date range: "min:2022-01-01T01:01:59,max:next-day-3" (No spaces after the comma or colon.) * Leave max blank for "on or after" and min blank for "on or before", for example: * "Date-Range": "min:2020-04-01,max:" * "Date-Range": "min:,max:next-day-3" **Notes** * ":null" is a special value that denotes the null primitive value. * ":empty" is a special value that denotes the empty string "". Use [URL encoding](https://help.sigmacomputing.com/docs/special-characters-for-url-parameters) to encode characters in your control values (such as commas) to prevent the system from interpreting them as separators. For example: "New York, NY,Boston, MA" can be encoded as: "New%20York%2C%20NY,Boston%2C%20MA"
- `timeout` (double, optional)
- `tag` (string, optional) — Specifies the version tag of the report to be exported.

### V2ReportsReportIdExportPostRequestBodyContentApplicationJsonSchemaOneOf0Format

- `type` (enum, required)
  - Allowed values: `pdf`
- `layout` (enum, required)
  - Allowed values: `portrait`, `landscape`

### V2ReportsReportIdExportPostRequestBodyContentApplicationJsonSchemaOneOf1Format

- `type` (enum, required)
  - Allowed values: `pdf`
- `layout` (enum, required)
  - Allowed values: `portrait`, `landscape`

## Examples

**Request**

```json
{
  "format": {
    "layout": "portrait",
    "type": "pdf"
  },
  "parameters": {
    "region": "North America"
  },
  "tag": "my-tag",
  "timeout": 5
}
```

**Response**

```json
{
  "jobComplete": false,
  "queryId": "88889999-aaaa-bbbb-cccc-ddddeeeeffff"
}
```

**SDK Code**

```python Export a report as PDF
import requests

url = "https://api.sigmacomputing.com/v2/reports/reportId/export"

payload = {
    "format": {
        "layout": "portrait",
        "type": "pdf"
    },
    "parameters": { "region": "North America" },
    "tag": "my-tag",
    "timeout": 5
}
headers = {
    "Authorization": "<token>.",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Export a report as PDF
const url = 'https://api.sigmacomputing.com/v2/reports/reportId/export';
const options = {
  method: 'POST',
  headers: {Authorization: '<token>.', 'Content-Type': 'application/json'},
  body: '{"format":{"layout":"portrait","type":"pdf"},"parameters":{"region":"North America"},"tag":"my-tag","timeout":5}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Export a report as PDF
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sigmacomputing.com/v2/reports/reportId/export"

	payload := strings.NewReader("{\n  \"format\": {\n    \"layout\": \"portrait\",\n    \"type\": \"pdf\"\n  },\n  \"parameters\": {\n    \"region\": \"North America\"\n  },\n  \"tag\": \"my-tag\",\n  \"timeout\": 5\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "<token>.")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Export a report as PDF
require 'uri'
require 'net/http'

url = URI("https://api.sigmacomputing.com/v2/reports/reportId/export")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<token>.'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"format\": {\n    \"layout\": \"portrait\",\n    \"type\": \"pdf\"\n  },\n  \"parameters\": {\n    \"region\": \"North America\"\n  },\n  \"tag\": \"my-tag\",\n  \"timeout\": 5\n}"

response = http.request(request)
puts response.read_body
```

```java Export a report as PDF
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.sigmacomputing.com/v2/reports/reportId/export")
  .header("Authorization", "<token>.")
  .header("Content-Type", "application/json")
  .body("{\n  \"format\": {\n    \"layout\": \"portrait\",\n    \"type\": \"pdf\"\n  },\n  \"parameters\": {\n    \"region\": \"North America\"\n  },\n  \"tag\": \"my-tag\",\n  \"timeout\": 5\n}")
  .asString();
```

```php Export a report as PDF
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sigmacomputing.com/v2/reports/reportId/export', [
  'body' => '{
  "format": {
    "layout": "portrait",
    "type": "pdf"
  },
  "parameters": {
    "region": "North America"
  },
  "tag": "my-tag",
  "timeout": 5
}',
  'headers' => [
    'Authorization' => '<token>.',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Export a report as PDF
using RestSharp;

var client = new RestClient("https://api.sigmacomputing.com/v2/reports/reportId/export");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "<token>.");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"format\": {\n    \"layout\": \"portrait\",\n    \"type\": \"pdf\"\n  },\n  \"parameters\": {\n    \"region\": \"North America\"\n  },\n  \"tag\": \"my-tag\",\n  \"timeout\": 5\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Export a report as PDF
import Foundation

let headers = [
  "Authorization": "<token>.",
  "Content-Type": "application/json"
]
let parameters = [
  "format": [
    "layout": "portrait",
    "type": "pdf"
  ],
  "parameters": ["region": "North America"],
  "tag": "my-tag",
  "timeout": 5
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sigmacomputing.com/v2/reports/reportId/export")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```