LangChain experiment-view-overrides API

The experiment-view-overrides API from LangChain — 2 operation(s) for experiment-view-overrides.

OpenAPI Specification

langchain-experiment-view-overrides-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: LangSmith access_policies experiment-view-overrides API
  description: 'The LangSmith API is used to programmatically create and manage LangSmith resources.


    ## Host

    https://api.smith.langchain.com


    ## Authentication

    To authenticate with the LangSmith API, set the `X-Api-Key` header

    to a valid [LangSmith API key](https://docs.langchain.com/langsmith/create-account-api-key#create-an-api-key).


    '
  version: 0.1.0
servers:
- url: /
tags:
- name: experiment-view-overrides
paths:
  /datasets/{dataset_id}/experiment-view-overrides:
    get:
      security:
      - API Key: []
      - Tenant ID: []
      - Bearer Auth: []
      description: 'Retrieves all experiment view override configurations for a specific dataset.

        This endpoint returns column display overrides including color gradients,

        precision settings, and column visibility configurations that customize how

        experiment results are displayed in the UI.


        The response includes all column overrides with their display settings:

        - Column identifiers (must start with inputs, outputs, reference_outputs, feedback, metrics, attachments, or metadata)

        - Color gradients for numeric data visualization

        - Precision settings for numeric columns (1-6 decimal places)

        - Hide flags to control column visibility'
      tags:
      - experiment-view-overrides
      summary: Get experiment view override configurations for a dataset
      parameters:
      - example: '"550e8400-e29b-41d4-a716-446655440000"'
        description: Dataset ID
        name: dataset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Successfully retrieved experiment view override configurations
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/experiment_view_overrides.ExperimentViewOverride'
        '400':
          description: Invalid dataset ID format" example({"error":"invalid dataset ID format"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '401':
          description: Unauthorized access" example({"error":"Unauthorized"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '404':
          description: Dataset not found or not accessible" example({"error":"dataset not found or not accessible"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '500':
          description: Internal server error" example({"error":"internal server error"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
    post:
      security:
      - API Key: []
      - Tenant ID: []
      - Bearer Auth: []
      description: 'Creates a new experiment view override configuration for a dataset with column display settings.

        This endpoint allows you to customize how experiment results are displayed by configuring

        column-specific overrides including colors, precision, and visibility.


        The request must include a ''column_overrides'' array with at least one override configuration.

        Each column override can specify:

        - column: Required field name (must start with inputs, outputs, reference_outputs, feedback, metrics, attachments, or metadata)

        - color_gradient: Optional array of [number, color] tuples for numeric data visualization

        - precision: Optional number (1-6) for decimal places in numeric columns

        - hide: Optional boolean to control column visibility


        Example request body:

        {

        "column_overrides": [

        {

        "column": "outputs.accuracy",

        "color_gradient": [[0.0, "#ff0000"], [0.5, "#ffff00"], [1.0, "#00ff00"]],

        "precision": 3

        },

        {

        "column": "inputs.model_type",

        "hide": false

        }

        ]

        }


        This operation fails if an override already exists for the dataset (use PATCH to update).'
      tags:
      - experiment-view-overrides
      summary: Create new experiment view override configuration for a dataset
      parameters:
      - example: '"550e8400-e29b-41d4-a716-446655440000"'
        description: Dataset ID
        name: dataset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '201':
          description: Successfully created experiment view override
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experiment_view_overrides.ExperimentViewOverride'
        '400':
          description: Invalid request data" example({"error":"column_overrides field is required"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '401':
          description: Unauthorized access" example({"error":"Unauthorized"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '404':
          description: Dataset not found" example({"error":"dataset not found or not accessible"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '409':
          description: Override already exists" example({"error":"experiment view override already exists"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '422':
          description: 'Validation error" example({"error":"column name at index 0 must start with one of: inputs, outputs, reference_outputs, feedback, metrics, attachments, metadata"})'
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '500':
          description: Internal server error" example({"error":"internal server error"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/experiment_view_overrides.ExperimentViewOverridePostRequest'
  /datasets/{dataset_id}/experiment-view-overrides/{id}:
    get:
      security:
      - API Key: []
      - Tenant ID: []
      - Bearer Auth: []
      description: 'Retrieves a specific experiment view override configuration using both dataset ID and override ID.

        This endpoint provides more precise access to experiment view overrides when you have

        the specific override ID, useful for direct links or cached references.


        The response includes the same column override information as the dataset-level endpoint:

        - Column identifiers with validation prefixes

        - Color gradient settings for numeric data visualization

        - Numeric precision configurations

        - Column visibility controls


        Both the dataset and override must exist and be accessible by the authenticated user.'
      tags:
      - experiment-view-overrides
      summary: Get experiment view override configuration by specific ID
      parameters:
      - example: '"550e8400-e29b-41d4-a716-446655440000"'
        description: Dataset ID
        name: dataset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - example: '"123e4567-e89b-12d3-a456-426614174000"'
        description: Experiment view override ID
        name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Successfully retrieved experiment view override configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experiment_view_overrides.ExperimentViewOverride'
        '400':
          description: Invalid ID format" example({"error":"invalid experiment view override ID format"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '401':
          description: Unauthorized access" example({"error":"Unauthorized"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '404':
          description: Override not found" example({"error":"experiment view override not found"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '500':
          description: Internal server error" example({"error":"internal server error"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
    delete:
      security:
      - API Key: []
      - Tenant ID: []
      - Bearer Auth: []
      description: 'Permanently deletes an experiment view override configuration for a dataset.

        This operation removes all column override settings including color gradients,

        precision configurations, and visibility settings.


        After deletion, the experiment view will revert to default column display settings.

        This action cannot be undone - you will need to recreate the override configuration

        if you want to restore custom column settings.


        Both the dataset and override must exist and be accessible by the authenticated user.

        The operation will fail if the override doesn''t exist or if the user doesn''t have

        appropriate permissions for the dataset.'
      tags:
      - experiment-view-overrides
      summary: Delete experiment view override configuration
      parameters:
      - example: '"550e8400-e29b-41d4-a716-446655440000"'
        description: Dataset ID
        name: dataset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - example: '"123e4567-e89b-12d3-a456-426614174000"'
        description: Experiment view override ID
        name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Successfully deleted experiment view override (no content returned)
        '400':
          description: Invalid ID format" example({"error":"invalid experiment view override ID format"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '401':
          description: Unauthorized access" example({"error":"Unauthorized"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '404':
          description: Override not found" example({"error":"experiment view override not found"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '500':
          description: Internal server error" example({"error":"internal server error"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
    patch:
      security:
      - API Key: []
      - Tenant ID: []
      - Bearer Auth: []
      description: 'Updates an existing experiment view override configuration by completely replacing

        the column overrides for the specified dataset and override ID.


        This endpoint performs a complete replacement of the column overrides configuration.

        All existing column overrides will be replaced with the new configuration provided

        in the request body. To add or modify individual columns, include the complete

        desired configuration in the request.


        The request format is identical to the create endpoint:

        - column_overrides: Required array with at least one override configuration

        - Each override can specify color gradients, precision, and visibility


        Example request body:

        {

        "column_overrides": [

        {

        "column": "metrics.f1_score",

        "color_gradient": [[0.0, "#ff4444"], [0.8, "#44ff44"]],

        "precision": 4

        },

        {

        "column": "feedback.rating",

        "hide": false

        }

        ]

        }


        Both the dataset and override must exist and be accessible by the authenticated user.'
      tags:
      - experiment-view-overrides
      summary: Update existing experiment view override configuration
      parameters:
      - example: '"550e8400-e29b-41d4-a716-446655440000"'
        description: Dataset ID
        name: dataset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - example: '"123e4567-e89b-12d3-a456-426614174000"'
        description: Experiment view override ID
        name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: Successfully updated experiment view override
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/experiment_view_overrides.ExperimentViewOverride'
        '400':
          description: Invalid request data" example({"error":"invalid experiment view override ID format"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '401':
          description: Unauthorized access" example({"error":"Unauthorized"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '404':
          description: Override not found" example({"error":"experiment view override not found"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '422':
          description: Validation error" example({"error":"'precision' must be between 1 and 6 for column at index 0"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
        '500':
          description: Internal server error" example({"error":"internal server error"})
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/experiment_view_overrides.ExperimentViewOverridePatchRequest'
components:
  schemas:
    experiment_view_overrides.ExperimentViewOverride:
      type: object
      properties:
        column_overrides:
          type: array
          items:
            $ref: '#/components/schemas/experiment_view_overrides.ColumnOverride'
        created_at:
          type: string
        dataset_id:
          type: string
        id:
          type: string
        modified_at:
          type: string
    experiment_view_overrides.ColumnOverride:
      type: object
      required:
      - column
      properties:
        color_gradient:
          type: array
          maxItems: 20
          items:
            type: array
            items: {}
        color_map:
          type: object
          additionalProperties: true
        column:
          type: string
          maxLength: 200
        disable_colors:
          type: boolean
        hide:
          type: boolean
        precision:
          type: integer
          maximum: 6
          minimum: 1
    experiment_view_overrides.ExperimentViewOverridePatchRequest:
      type: object
      required:
      - column_overrides
      properties:
        column_overrides:
          type: array
          maxItems: 50
          minItems: 1
          items:
            $ref: '#/components/schemas/experiment_view_overrides.ColumnOverride'
    experiment_view_overrides.ExperimentViewOverridePostRequest:
      type: object
      required:
      - column_overrides
      properties:
        column_overrides:
          type: array
          maxItems: 50
          minItems: 1
          items:
            $ref: '#/components/schemas/experiment_view_overrides.ColumnOverride'
  securitySchemes:
    API Key:
      type: apiKey
      in: header
      name: X-API-Key
    Tenant ID:
      type: apiKey
      in: header
      name: X-Tenant-Id
    Bearer Auth:
      type: http
      description: Bearer tokens are used to authenticate from the UI. Must also specify x-tenant-id or x-organization-id (for org scoped apis).
      scheme: bearer
    Organization ID:
      type: apiKey
      in: header
      name: X-Organization-Id