---
title: "Save the sample data window"
method: PUT
path: "/api/{org_id}/sample_data"
tags: ["Sample Data"]
---

# Save the sample data window

`PUT /api/{org_id}/sample_data`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/sample_data`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/sample_data/put.ts> (a function with typed inputs; its response is checked against the schema)

Records the time window the organization's sample data was loaded into. `start_time` must be lower than `end_time`, both in microseconds since the epoch. A saved window always reads back as `loaded`.

## Path parameters

- `org_id` string, required

## Request body

- PutSampleDataRequest
  - `end_time` integer, required
  - `start_time` integer, required

## Response `200`

Success

- SampleDataState: The time window the org's sample data was loaded into, in microseconds since the epoch.
  - `end_time` integer, nullable
  - `start_time` integer, nullable
  - `status` 'none' | 'loaded', required

## Other responses

- `400`: start_time is not lower than end_time
- `500`: Failure

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
