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

# Data Exports

> Request, track, and download compliance-grade data exports from the platform at /settings/exports.

The Data Exports page (`/settings/exports`) allows authorised users to initiate data export requests, monitor their processing status, and download completed export files.

## Overview

The page is gated behind `pf.export_requests.view` via `PermissionGate`. It renders a `DataTable` of export requests sourced from the `pf_export_requests` Supabase table, showing export type, format, entity types, status (pending / processing / completed / failed), and requested timestamp. When exports have a `pending` or `processing` status a **Refresh** button appears. Users holding `pf.export_requests.create` see a **New Export** button that opens `ExportRequestForm`. Completed exports show a **Download** action that generates a signed URL from the `pf-exports` storage bucket. Rows can be deleted, removing the history entry without affecting any imported records.

## Who it's for

Requires permission `pf.export_requests.view`. Creating exports also requires `pf.export_requests.create`.

## Before you start

* Ensure you hold `pf.export_requests.view`; otherwise a lock icon and access-denied message are shown.
* For new exports, you also need `pf.export_requests.create`.

## Steps

<Steps>
  <Step title="Open Data Exports">
    Navigate to `/settings/exports`. The table lists all previous export requests for your organisation.
  </Step>

  <Step title="Request a new export">
    Click **New Export** (requires `pf.export_requests.create`). Complete the `ExportRequestForm` dialog, selecting the export type, format, and entity types.
  </Step>

  <Step title="Monitor status">
    Pending and processing exports show animated status badges. Click **Refresh** to poll for updates.
  </Step>

  <Step title="Download a completed export">
    When status changes to **completed**, click the download icon in the Actions column. A signed URL is generated from the `pf-exports` storage bucket and opens in a new tab.
  </Step>

  <Step title="Remove an export history entry">
    Click the trash icon in the Actions column and confirm. The row is removed from history; downloaded files are not affected.
  </Step>
</Steps>

## Key concepts

<AccordionGroup>
  <Accordion title="Export status lifecycle">
    Requests progress through `pending` → `processing` → `completed` or `failed`. Processing is performed asynchronously; the page does not auto-poll — use the Refresh button.
  </Accordion>

  <Accordion title="Signed download URLs">
    Download links are signed for 1 hour (3600 seconds) via Supabase Storage. If a link expires, re-open the download action to generate a fresh URL.
  </Accordion>

  <Accordion title="Export formats">
    Format values are displayed in uppercase (e.g., CSV, XLSX). The available formats depend on the export type selected.
  </Accordion>
</AccordionGroup>

## Related

<Columns cols={2}>
  <Card title="Platform Foundation" icon="layer-group" href="/pf/overview">
    Platform Foundation overview.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index">
    Documentation coverage and governance.
  </Card>
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/platform.tsx
  * src/platform/export/pages/ExportHistoryPage.tsx
  * src/platform/export/hooks/useExportRequests.ts
</Accordion>
