---
title: "Upsert Dataset Content"
method: PUT
path: "/v2/datasets/{dataset_id}/content"
tags: ["datasets"]
---

# Upsert Dataset Content

`PUT /v2/datasets/{dataset_id}/content`

## Request

- Base URL: `https://api.galileo.ai`
- URL: `https://api.galileo.ai/v2/datasets/{dataset_id}/content`
- Auth: one of:
  - API key in header `Galileo-API-Key`
  - API key in header `Splunk-AO-API-Key`
  - OAuth 2
    - Password
    - Token URL: `https://api.galileo.ai/login`
  - HTTP basic

Rollback the content of a dataset to a previous version.

## Path parameters

- `dataset_id` string, uuid4, required

## Request body

- union
  - RollbackRequest
    - `rollback_version` integer, required
  - UpsertDatasetContentRequest
    - `dataset_id` string, uuid4, required: The ID of the dataset to copy content from.
    - `version_index` integer, nullable: The version index of the dataset to copy content from. If not provided, the content will be copied from the latest version of the dataset.

## Response `204`

Dataset content upserted successfully

## Other responses

- `404`: Dataset not found
- `422`: Validation error in request body
- `423`: Resource lock could not be acquired; another update may be in progress

---

[API](https://skmtc.dev/galileo/apis/galileo-api.md) - [All operations](https://skmtc.dev/galileo/apis/galileo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/galileo/apis/galileo-api/revisions/441b96da8c30?raw)
