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

# Datasets

> Synthetic patient data for populating sandboxes.

Datasets hold synthetic patient data (FHIR bundles, files, or other formats) that can be loaded into [Sandboxes](/api-reference/resources/sandboxes). Datasets can be hand-crafted or generated from a prompt.

## Endpoints

| Method   | Endpoint                                                  | Description         |
| -------- | --------------------------------------------------------- | ------------------- |
| `GET`    | [`/datasets`](/api-reference/endpoint/listDatasets)       | List datasets       |
| `POST`   | [`/datasets`](/api-reference/endpoint/createDataset)      | Create a dataset    |
| `GET`    | [`/datasets/{id}`](/api-reference/endpoint/getDataset)    | Get dataset details |
| `PATCH`  | [`/datasets/{id}`](/api-reference/endpoint/updateDataset) | Update a dataset    |
| `DELETE` | [`/datasets/{id}`](/api-reference/endpoint/deleteDataset) | Delete a dataset    |

## Dataset Object

| Field             | Type                  | Description                        |
| ----------------- | --------------------- | ---------------------------------- |
| `id`              | string                | Unique identifier                  |
| `name`            | string                | Dataset name                       |
| `description`     | string \| null        | Optional description               |
| `type`            | FHIR \| Files \| null | Data format                        |
| `data`            | unknown \| null       | The dataset contents               |
| `config`          | object \| null        | Generation or schema configuration |
| `organization_id` | string                | Parent organization                |
| `created_at`      | datetime              | Creation timestamp                 |
| `updated_at`      | datetime              | Last modification timestamp        |

## SDK Example

```typescript theme={null}
// Create a dataset
const dataset = await verial.datasets.create({
  name: 'Diabetes patient panel',
})

// List all datasets
const datasets = await verial.datasets.list()

// Get a specific dataset
const details = await verial.datasets.get({ id: dataset.id })

// Update
await verial.datasets.update({
  id: dataset.id,
  description: '50 patients with Type 2 diabetes',
  data: fhirBundle,
})

// Generate data from a prompt
await verial.datasets.generate({
  id: dataset.id,
  prompt: '10 patients with pending prior auth requests',
})

// Delete
await verial.datasets.delete({ id: dataset.id })
```
