LangWatch Evaluators API

The Evaluators API from LangWatch — 3 operation(s) for evaluators.

Documentation

Specifications

OpenAPI Specification

langwatch-evaluators-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: LangWatch Agents Evaluators API
  version: 1.0.0
  description: LangWatch openapi spec
servers:
- url: https://app.langwatch.ai
security:
- project_api_key: []
tags:
- name: Evaluators
paths:
  /api/evaluators:
    get:
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    projectId:
                      type: string
                    name:
                      type: string
                    slug:
                      type:
                      - string
                      - 'null'
                    type:
                      type: string
                    config:
                      type:
                      - object
                      - 'null'
                      additionalProperties: {}
                    workflowId:
                      type:
                      - string
                      - 'null'
                    copiedFromEvaluatorId:
                      type:
                      - string
                      - 'null'
                    createdAt:
                      type: string
                    updatedAt:
                      type: string
                    fields:
                      type: array
                      items:
                        type: object
                        properties:
                          identifier:
                            type: string
                          type:
                            type: string
                          optional:
                            type: boolean
                        required:
                        - identifier
                        - type
                    outputFields:
                      type: array
                      items:
                        type: object
                        properties:
                          identifier:
                            type: string
                          type:
                            type: string
                          optional:
                            type: boolean
                        required:
                        - identifier
                        - type
                    workflowName:
                      type: string
                    workflowIcon:
                      type: string
                    platformUrl:
                      type: string
                      format: uri
                  required:
                  - id
                  - projectId
                  - name
                  - slug
                  - type
                  - config
                  - workflowId
                  - copiedFromEvaluatorId
                  - createdAt
                  - updatedAt
                  - fields
                  - outputFields
                  - platformUrl
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
      operationId: getApiEvaluators
      parameters: []
      description: Get all evaluators for a project
      tags:
      - Evaluators
    post:
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  projectId:
                    type: string
                  name:
                    type: string
                  slug:
                    type:
                    - string
                    - 'null'
                  type:
                    type: string
                  config:
                    type:
                    - object
                    - 'null'
                    additionalProperties: {}
                  workflowId:
                    type:
                    - string
                    - 'null'
                  copiedFromEvaluatorId:
                    type:
                    - string
                    - 'null'
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                  fields:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                        type:
                          type: string
                        optional:
                          type: boolean
                      required:
                      - identifier
                      - type
                  outputFields:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                        type:
                          type: string
                        optional:
                          type: boolean
                      required:
                      - identifier
                      - type
                  workflowName:
                    type: string
                  workflowIcon:
                    type: string
                  platformUrl:
                    type: string
                    format: uri
                required:
                - id
                - projectId
                - name
                - slug
                - type
                - config
                - workflowId
                - copiedFromEvaluatorId
                - createdAt
                - updatedAt
                - fields
                - outputFields
                - platformUrl
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
      operationId: postApiEvaluators
      parameters: []
      description: Create a new evaluator
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                config:
                  type: object
                  additionalProperties: {}
              required:
              - name
              - config
      tags:
      - Evaluators
  /api/evaluators/{idOrSlug}:
    get:
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  projectId:
                    type: string
                  name:
                    type: string
                  slug:
                    type:
                    - string
                    - 'null'
                  type:
                    type: string
                  config:
                    type:
                    - object
                    - 'null'
                    additionalProperties: {}
                  workflowId:
                    type:
                    - string
                    - 'null'
                  copiedFromEvaluatorId:
                    type:
                    - string
                    - 'null'
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                  fields:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                        type:
                          type: string
                        optional:
                          type: boolean
                      required:
                      - identifier
                      - type
                  outputFields:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                        type:
                          type: string
                        optional:
                          type: boolean
                      required:
                      - identifier
                      - type
                  workflowName:
                    type: string
                  workflowIcon:
                    type: string
                  platformUrl:
                    type: string
                    format: uri
                required:
                - id
                - projectId
                - name
                - slug
                - type
                - config
                - workflowId
                - copiedFromEvaluatorId
                - createdAt
                - updatedAt
                - fields
                - outputFields
                - platformUrl
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '404':
          description: Evaluator not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
      operationId: getApiEvaluatorsByIdOrSlug
      parameters:
      - schema:
          type: string
        in: path
        name: idOrSlug
        required: true
      description: Get a specific evaluator by ID or slug
      tags:
      - Evaluators
  /api/evaluators/{id}:
    put:
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  projectId:
                    type: string
                  name:
                    type: string
                  slug:
                    type:
                    - string
                    - 'null'
                  type:
                    type: string
                  config:
                    type:
                    - object
                    - 'null'
                    additionalProperties: {}
                  workflowId:
                    type:
                    - string
                    - 'null'
                  copiedFromEvaluatorId:
                    type:
                    - string
                    - 'null'
                  createdAt:
                    type: string
                  updatedAt:
                    type: string
                  fields:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                        type:
                          type: string
                        optional:
                          type: boolean
                      required:
                      - identifier
                      - type
                  outputFields:
                    type: array
                    items:
                      type: object
                      properties:
                        identifier:
                          type: string
                        type:
                          type: string
                        optional:
                          type: boolean
                      required:
                      - identifier
                      - type
                  workflowName:
                    type: string
                  workflowIcon:
                    type: string
                  platformUrl:
                    type: string
                    format: uri
                required:
                - id
                - projectId
                - name
                - slug
                - type
                - config
                - workflowId
                - copiedFromEvaluatorId
                - createdAt
                - updatedAt
                - fields
                - outputFields
                - platformUrl
        '400':
          description: Bad request (e.g. attempting to change evaluatorType)
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '404':
          description: Evaluator not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
      operationId: putApiEvaluatorsById
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      description: Update an existing evaluator
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                config:
                  type: object
                  additionalProperties: {}
      tags:
      - Evaluators
    delete:
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                required:
                - success
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '404':
          description: Evaluator not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                required:
                - error
      operationId: deleteApiEvaluatorsById
      parameters:
      - schema:
          type: string
        in: path
        name: id
        required: true
      description: Archive (soft-delete) an evaluator
      tags:
      - Evaluators
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.'
    admin_api_key:
      type: http
      scheme: bearer
      description: 'Admin API key for organization-level operations (managing projects, API keys). Create one in Settings > API Keys or via POST /api/api-keys. Format: sk-lw-{id}_{secret}.'