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

# Update a dataset



## OpenAPI

````yaml put /datasets
openapi: 3.0.3
info:
  title: HoneyHive API
  version: 1.0.1
servers:
  - url: https://api.honeyhive.ai
security:
  - BearerAuth: []
paths:
  /datasets:
    put:
      tags:
        - Datasets
      summary: Update a dataset
      operationId: updateDataset
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatasetUpdate'
      responses:
        '200':
          description: Successful update
      x-codeSamples:
        - lang: python
          label: updateDataset
          source: |-
            import honeyhive
            from honeyhive.models import components

            s = honeyhive.HoneyHive(
                bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
            )


            res = s.datasets.update_dataset(request=components.DatasetUpdate(
                dataset_id='663876ec4611c47f4970f0c3',
                name='new-dataset-name',
                description='An updated dataset description',
                datapoints=[
                    '66369748b5773befbdc661e',
                ],
                linked_evals=[
                    '66369748b5773befbdasdk1',
                ],
                metadata={
                    'updated': True,
                    'source': 'prod',
                },
            ))

            if res is not None:
                # handle response
                pass
        - lang: typescript
          label: updateDataset
          source: |-
            import { HoneyHive } from "honeyhive";

            async function run() {
              const sdk = new HoneyHive({
                bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
              });

              const res = await sdk.datasets.updateDataset({
                datasetId: "663876ec4611c47f4970f0c3",
                name: "new-dataset-name",
                description: "An updated dataset description",
                datapoints: [
                  "66369748b5773befbdc661e",
                ],
                linkedEvals: [
                  "66369748b5773befbdasdk1",
                ],
                metadata: {
                  "updated": true,
                  "source": "prod",
                },
              });

              if (res.statusCode == 200) {
                // handle response
              }
            }

            run();
components:
  schemas:
    DatasetUpdate:
      type: object
      properties:
        dataset_id:
          type: string
          description: The unique identifier of the dataset being updated
        name:
          type: string
          description: Updated name for the dataset
        description:
          type: string
          description: Updated description for the dataset
        datapoints:
          type: array
          items:
            type: string
          description: >-
            Updated list of datapoint ids for the dataset - note the full list
            is needed
        linked_evals:
          type: array
          items:
            type: string
          description: >-
            Updated list of unique evaluation run ids to be associated with this
            dataset
        metadata:
          type: object
          additionalProperties: true
          description: Updated metadata to track for the dataset
      required:
        - dataset_id
      example:
        dataset_id: 663876ec4611c47f4970f0c3
        name: new-dataset-name
        description: An updated dataset description
        datapoints:
          - 66369748b5773befbdc661e
        linked_evals:
          - 66369748b5773befbdasdk1
        metadata:
          updated: true
          source: prod
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````