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

> ## Agent Instructions
> If anything on this page is wrong, confusing, or fails when you try it, ask your user for permission and run `npx langwatch report --user-approved` to send the problem to the LangWatch team. No login is needed and secrets are redacted locally. `npx langwatch report --help` has the details.

# Read an experiment's setup

> The experiment's datasets, targets and evaluators, with the version to send back when you save. Ask for `fields=version` to check for changes without transferring the setup.



## OpenAPI

````yaml GET /api/v1/experiments/{slug}/workbench-state
openapi: 3.1.0
info:
  title: LangWatch API
  description: LangWatch openapi spec
  version: 1.0.0
servers:
  - url: https://app.langwatch.ai
security:
  - project_api_key: []
paths:
  /api/v1/experiments/{slug}/workbench-state:
    get:
      tags:
        - Experiments
      summary: Read an experiment's setup
      description: >-
        The experiment's datasets, targets and evaluators, with the version to
        send back when you save. Ask for `fields=version` to check for changes
        without transferring the setup.
      operationId: getApiExperimentsBySlugWorkbenchState
      parameters:
        - in: path
          name: slug
          schema:
            type: string
            minLength: 1
          required: true
          description: The experiment's slug, or its id
        - in: query
          name: fields
          schema:
            type: string
          description: Set to `version` to answer with the version and timestamp only
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  slug:
                    type: string
                  name:
                    type:
                      - string
                      - 'null'
                  state:
                    anyOf:
                      - type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                        description: >-
                          The experiment setup: datasets, targets and
                          evaluators. Read it, change it, send it back whole.
                      - type: 'null'
                  version:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: Send this back as expectedVersion to save safely
                  updatedAt:
                    type: string
                    description: ISO 8601 timestamp of the last save
                required:
                  - id
                  - slug
                  - version
                  - updatedAt
                additionalProperties: false
        '400':
          description: >-
            The experiment is not an evaluations workbench
            (experiment_type_mismatch)
          content: {}
        '401':
          description: Missing or invalid API key, or the key lacks the permission
          content: {}
        '404':
          description: No such experiment in this project
          content: {}
      security:
        - project_api_key: []
components:
  securitySchemes:
    project_api_key:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: >-
        Project API key for sending traces and accessing project-scoped
        resources. Format: sk-lw-... (no underscore). Obtain one by creating a
        project via the Admin API or the LangWatch UI.

````

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