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

# Update record

> Update a record in a data source (formerly known as "inference pipeline").



## OpenAPI

````yaml put /inference-pipelines/{inferencePipelineId}/rows
openapi: 3.0.3
info:
  contact:
    email: support@openlayer.com
    name: Openlayer
    url: https://openlayer.com/
  description: API for interacting with the Openlayer server.
  title: Openlayer API
  version: '1.0'
  x-logo:
    url: https://logo.clearbit.com/openlayer.com
servers:
  - url: https://api.openlayer.com/v1
    description: Our prod backend
security:
  - bearerAuth: []
paths:
  /inference-pipelines/{inferencePipelineId}/rows:
    put:
      tags:
        - Monitoring
      summary: Update a row
      description: Update a row in an inference pipeline.
      parameters:
        - $ref: '#/components/parameters/inferencePipelineId'
        - name: inferenceId
          in: query
          description: Specify the inference id as a query param.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                row:
                  type: object
                  minProperties: 1
                  maxProperties: 100
                config:
                  $ref: '#/components/schemas/DatastreamConfigUpdate'
                  nullable: true
              required:
                - row
      responses:
        '200':
          description: Status OK.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
        default:
          $ref: '#/components/responses/UnexpectedError'
      x-codeSamples:
        - lang: python
          source: |
            from openlayer import Openlayer

            client = Openlayer()

            response = client.inference_pipelines.rows.update(
                "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
                inference_id="0f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f",
                row={"ground_truth": "The sun is about 93 million miles from the earth."},
                config={"ground_truth_column_name": "ground_truth"},
            )
            print(response.success)
        - lang: typescript
          source: >
            import Openlayer from 'openlayer';


            const client = new Openlayer();


            const response = await
            client.inferencePipelines.rows.update('c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f',
            {
              inferenceId: '0f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f',
              row: { human_feedback: 'thumbs_up' },
              config: { humanFeedbackColumnName: 'human_feedback' },
            });


            console.log(response.success);
        - lang: go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/openlayer-ai/openlayer-go\"\n)\n\nclient := openlayer.NewClient()\nresponse, err := client.InferencePipelines.Rows.Update(\n\tcontext.TODO(),\n\t\"c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f\",\n\topenlayer.InferencePipelineRowUpdateParams{\n\t\tInferenceID: openlayer.F(\"0f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f\"),\n\t\tRow: openlayer.F[any](map[string]interface{}{\n\t\t\t\"ground_truth\": \"42\",\n\t\t}),\n\t\tConfig: openlayer.F(openlayer.InferencePipelineRowUpdateParamsConfig{\n\t\t\tGroundTruthColumnName: openlayer.F(\"ground_truth\"),\n\t\t}),\n\t},\n)\nif err != nil {\n\tpanic(err.Error())\n}\nfmt.Printf(\"%+v\\n\", response.Success)\n"
        - lang: java
          source: >
            import com.openlayer.api.client.OpenlayerClient;

            import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;

            import com.openlayer.api.core.JsonValue;

            import
            com.openlayer.api.models.inferencepipelines.rows.RowUpdateParams;

            import
            com.openlayer.api.models.inferencepipelines.rows.RowUpdateResponse;

            import java.util.Map;


            OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();


            RowUpdateParams params = RowUpdateParams.builder()
                .inferencePipelineId("c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f")
                .inferenceId("0f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f")
                .row(JsonValue.from(Map.of("human_feedback", "thumbs_up")))
                .config(RowUpdateParams.Config.builder()
                    .humanFeedbackColumnName("human_feedback")
                    .build())
                .build();
            RowUpdateResponse response =
            client.inferencePipelines().rows().update(params);
        - lang: ruby
          source: |
            require "openlayer"

            openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])

            response = openlayer.inference_pipelines.rows.update(
              "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
              inference_id: "0f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f",
              row: {human_feedback: "thumbs_up"},
              config: {human_feedback_column_name: "human_feedback"}
            )

            puts(response)
        - lang: curl
          source: >
            curl --request PUT \

            --url
            https://api.openlayer.com/v1/inference-pipelines/{inferencePipelineId}/rows?inferenceId=832y98d3
            \

            --header 'Authorization: Bearer <token>' \

            --header 'Content-Type: application/json' \

            --data '{
              "row": {
                "ground_truth": "The sun is 94.471 million miles from the earth."
              },
              "config": {
                "groundTruthColumnName": "ground_truth",
              }
            }'
components:
  parameters:
    inferencePipelineId:
      name: inferencePipelineId
      in: path
      description: The inference pipeline id (a UUID).
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    DatastreamConfigUpdate:
      type: object
      properties:
        inferenceIdColumnName:
          type: string
          description: >-
            Name of the column with the inference ids. This is useful if you
            want to update rows at a later point in time. If not provided, a
            unique id is generated by Openlayer.
          example: id
          writeOnly: true
          nullable: true
        latencyColumnName:
          type: string
          description: Name of the column with the latencies.
          example: latency
          nullable: true
        timestampColumnName:
          type: string
          nullable: true
          description: >-
            Name of the column with the timestamps. Timestamps must be in UNIX
            sec format. If not provided, the upload timestamp is used.
          example: timestamp
        groundTruthColumnName:
          type: string
          description: Name of the column with the ground truths.
          example: ground_truth
          nullable: true
        humanFeedbackColumnName:
          type: string
          description: Name of the column with human feedback.
          example: human_feedback
          nullable: true
  responses:
    UnexpectedError:
      description: Unexpected error.
      content:
        application/json:
          schema:
            type: object
            required:
              - code
              - error
            properties:
              code:
                type: integer
                format: int32
              error:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your workspace API key. See [Find your API
        key](https://www.openlayer.com/docs/workspace-and-projects/find-your-api-key)
        for more information.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.