> ## 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 specific datapoint



## OpenAPI

````yaml put /datapoints/{id}
openapi: 3.0.3
info:
  title: HoneyHive API
  version: 1.0.1
servers:
  - url: https://api.honeyhive.ai
security:
  - BearerAuth: []
paths:
  /datapoints/{id}:
    put:
      tags:
        - Datapoints
      summary: Update a specific datapoint
      operationId: updateDatapoint
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: ID of datapoint to update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDatapointRequest'
      responses:
        '200':
          description: Datapoint successfully updated
        '400':
          description: Error updating datapoint
      x-codeSamples:
        - lang: python
          label: updateDatapoint
          source: >-
            import honeyhive

            from honeyhive.models import components


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



            res = s.datapoints.update_datapoint(id='<value>',
            update_datapoint_request=components.UpdateDatapointRequest(
                inputs={
                    'query': 'what\'s the temperature in Reykjavik?',
                },
                history=[
                    {
                        'role': 'system',
                        'content': 'You are a helpful web assistant that helps users answer questions about the world based on the information provided to you by Google\'s search API. Answer the questions as truthfully as you can. In case you are unsure about the correct answer, please respond with "I apologize but I\'m not sure."',
                    },
                    {
                        'role': 'user',
                        'content': 'what\'s the temperature in Reykjavik?\n\n\n--Google search API results below:---\n\n"snippet":"2 Week Extended Forecast in Reykjavik, Iceland ; Feb 4, 29 / 20 °F · Snow showers early. Broken clouds. ; Feb 5, 27 / 16 °F · Light snow. Decreasing cloudiness.","snippet_highlighted_words":["Feb 4, 29 / 20 °F"]',
                    },
                ],
                ground_truth={
                    'role': 'assistant',
                    'content': 'The temperature in Reykjavik, Iceland is currently around 5F or -15C. Please note that weather conditions can change rapidly, so it\'s best to check a reliable source for the most up-to-date information.',
                },
                linked_evals=[
                    '<value>',
                ],
                linked_datasets=[
                    '<value>',
                ],
                metadata={
                    'question_type': 'capital-weather',
                    'random_field': 0,
                },
            ))


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

            import { UpdateDatapointRequest } from
            "honeyhive/dist/models/components";

            import { UpdateDatapointRequest } from
            "honeyhive/dist/models/operations";


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

            const updateDatapointRequest: UpdateDatapointRequest = {
              inputs: {
                "query": "what's the temperature in Reykjavik?",
              },
              history: [
                {
                  "role": "system",
                  "content": "You are a helpful web assistant that helps users answer questions about the world based on the information provided to you by Google's search API. Answer the questions as truthfully as you can. In case you are unsure about the correct answer, please respond with \"I apologize but I'm not sure.\"",
                },
                {
                  "role": "user",
                  "content": "what's the temperature in Reykjavik?\n\n\n--Google search API results below:---\n\n\"snippet\":\"2 Week Extended Forecast in Reykjavik, Iceland ; Feb 4, 29 / 20 °F · Snow showers early. Broken clouds. ; Feb 5, 27 / 16 °F · Light snow. Decreasing cloudiness.\",\"snippet_highlighted_words\":[\"Feb 4, 29 / 20 °F\"]",
                },
              ],
              groundTruth: {
                "role": "assistant",
                "content": "The temperature in Reykjavik, Iceland is currently around 5F or -15C. Please note that weather conditions can change rapidly, so it's best to check a reliable source for the most up-to-date information.",
              },
              linkedEvals: [
                "<value>",
              ],
              linkedDatasets: [
                "<value>",
              ],
              metadata: {
                "question_type": "capital-weather",
                "random_field": 0,
              },
            };

              const res = await sdk.datapoints.updateDatapoint(id, updateDatapointRequest);

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


            run();
components:
  schemas:
    UpdateDatapointRequest:
      type: object
      properties:
        inputs:
          type: object
          description: Arbitrary JSON object containing the inputs for the datapoint
          additionalProperties: true
        history:
          type: array
          items:
            type: object
            additionalProperties: true
          description: Conversation history associated with the datapoint
        ground_truth:
          type: object
          additionalProperties: true
          description: Expected output JSON object for the datapoint
        linked_evals:
          type: array
          items:
            type: string
          description: Ids of evaluations where the datapoint is included
        linked_datasets:
          type: array
          items:
            type: string
          description: Ids of all datasets that include the datapoint
        metadata:
          type: object
          additionalProperties: true
          description: Any additional metadata for the datapoint
      example:
        inputs:
          query: what's the temperature in Reykjavik?
        history:
          - role: system
            content: >-
              You are a helpful web assistant that helps users answer questions
              about the world based on the information provided to you by
              Google's search API. Answer the questions as truthfully as you
              can. In case you are unsure about the correct answer, please
              respond with "I apologize but I'm not sure."
          - role: user
            content: >-
              what's the temperature in Reykjavik?\n\n\n--Google search API
              results below:---\n\n"snippet":"2 Week Extended Forecast in
              Reykjavik, Iceland ; Feb 4, 29 / 20 °F · Snow showers early.
              Broken clouds. ; Feb 5, 27 / 16 °F · Light snow. Decreasing
              cloudiness.","snippet_highlighted_words":["Feb 4, 29 / 20 °F"]
        ground_truth:
          role: assistant
          content: >-
            The temperature in Reykjavik, Iceland is currently around 5F or
            -15C. Please note that weather conditions can change rapidly, so
            it's best to check a reliable source for the most up-to-date
            information.
        linked_event: 6bba5182-d4b1-4b29-a64a-f0a8bd964f76
        linked_evals: []
        linked_datasets: []
        metadata:
          question_type: capital-weather
          random_field: 0
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````