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

# Upsert Dataset Content

> Rollback the content of a dataset to a previous version.



## OpenAPI

````yaml https://api.galileo.ai/public/v2/openapi.json put /v2/datasets/{dataset_id}/content
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.galileo.ai
    description: Galileo Public APIs - galileo-v2
security: []
paths:
  /v2/datasets/{dataset_id}/content:
    put:
      tags:
        - datasets
      summary: Upsert Dataset Content
      description: Rollback the content of a dataset to a previous version.
      operationId: upsert_dataset_content_v2_datasets__dataset_id__content_put
      parameters:
        - name: dataset_id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            title: Dataset Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/RollbackRequest'
                - $ref: '#/components/schemas/UpsertDatasetContentRequest'
              title: Body
      responses:
        '204':
          description: Dataset content upserted successfully
        '404':
          description: Dataset not found
        '422':
          description: Validation error in request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '423':
          description: >-
            Resource lock could not be acquired; another update may be in
            progress
      security:
        - APIKeyHeader: []
        - OAuth2PasswordBearer: []
        - HTTPBasic: []
components:
  schemas:
    RollbackRequest:
      properties:
        rollback_version:
          type: integer
          title: Rollback Version
      type: object
      required:
        - rollback_version
      title: RollbackRequest
    UpsertDatasetContentRequest:
      properties:
        dataset_id:
          type: string
          format: uuid4
          title: Dataset Id
          description: The ID of the dataset to copy content from.
        version_index:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version Index
          description: >-
            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.
      type: object
      required:
        - dataset_id
      title: UpsertDatasetContentRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Galileo-API-Key
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: https://api.galileo.ai/login
    HTTPBasic:
      type: http
      scheme: basic

````