---
title: "Update Playground Scratch Dataset"
method: PATCH
path: "/projects/{project_id}/playgrounds/{playground_id}/scratch_dataset"
tags: ["playgrounds"]
---

# Update Playground Scratch Dataset

`PATCH /projects/{project_id}/playgrounds/{playground_id}/scratch_dataset`

Update the content of a scratch dataset.

This endpoint works similarly to `PATCH /datasets/{dataset_id}/content`.

## Path parameters

- `project_id` string, uuid4, required
- `playground_id` string, uuid4, required

## Headers

- `If-Match` string, nullable — ETag of the dataset as a version identifier.

## Request body

- UpdateDatasetContentRequest — This structure represent the valid edits operations that can be performed on a dataset. There edit operations are: - Row edits: These edits are performed on a specific row of the dataset. - EditMode.id: The edit is performed on the index (numeric index). DEPRECATED - EditMode.row_id: The edit is performed on the row_id of the row. - Global edits: These edits are performed on the entire dataset and should not be mixed with row edits. - EditMode.global_edit
  - `edits` union[], required
    - union
      - DatasetPrependRow
        - `edit_type` 'prepend_row'
        - `values` object, required
        - `row_id` string, uuid4, nullable
      - DatasetAppendRow
        - `edit_type` 'append_row'
        - `values` object, required
        - `row_id` string, uuid4, nullable
      - DatasetUpdateRow
        - `row_id` string, uuid4, required
        - `edit_type` 'update_row'
        - `values` object, required
      - DatasetDeleteRow
        - `row_id` string, uuid4, required
        - `edit_type` 'delete_row'
      - DatasetFilterRows — This global operation filters a set of rows and discard the rest.
        - `edit_type` 'filter_rows'
        - `row_ids` string[], required
      - DatasetCopyRecordData — Prepend or append trace or span data to dataset.
        - `edit_type` 'copy_record_data'
        - `project_id` string, uuid4, nullable
        - `queue_id` string, uuid4, nullable
        - `ids` string[], required — List of trace or span IDs to copy data from
        - `prepend` boolean — A flag to control appending vs prepending
        - `use_generated_output_column` boolean — DEPRECATED and ignored. Record copies always map the record's output to the generated_output column and dataset_output to the output (ground truth) column. Retained so requests from older clients still validate; will be removed.
      - DatasetRemoveColumn — Drop a column from the dataset schema.
        - `edit_type` 'remove_column'
        - `column_name` string, required
      - DatasetRenameColumn — Rename a column in the dataset schema, preserving values.
        - `edit_type` 'rename_column'
        - `column_name` string, required
        - `new_column_name` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-22** `83e631725038` — 1 info
  - request property `edits/items/oneOf[subschema #6: DatasetCopyRecordData]/use_generated_output_column` deprecated
- **2026-07-26** `05003e7835a2` — 1 info
  - the endpoint scheme security `ClassicAPIKeyHeader` was added to the API

[Change history](https://skmtc.dev/galileo/apis/galileo-api-server/changes/projects/:project_id/playgrounds/:playground_id/scratch_dataset/patch.md)

---

[API](https://skmtc.dev/galileo/apis/galileo-api-server.md) · [All operations](https://skmtc.dev/galileo/apis/galileo-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/galileo/galileo-api-server/revisions/8b1d1a4a933e/schema)
