LangGraph Listeners (v2) API

The Listeners (v2) API from LangGraph — 2 operation(s) for listeners (v2).

OpenAPI Specification

langgraph-listeners-v2-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: LangSmith Deployment Control Plane Agent Connections (v2) Agent Connections (v2) Listeners (v2) API
  description: 'The LangSmith Deployment Control Plane API is used to programmatically create and manage

    Agent Server deployments. For example, the APIs can be orchestrated to

    create custom CI/CD workflows.


    ## Host

    https://api.host.langchain.com


    ## Authentication

    To authenticate with the LangSmith Deployment Control Plane 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).


    ## Versioning

    Each endpoint path is prefixed with a version (e.g. `v1`, `v2`).


    ## Quick Start

    1. Call `POST /v2/deployments` to create a new Deployment. The response body contains the Deployment ID (`id`) and the ID of the latest (and first) revision (`latest_revision_id`).

    1. Call `GET /v2/deployments/{deployment_id}` to retrieve the Deployment. Set `deployment_id` in the URL to the value of Deployment ID (`id`).

    1. Poll for revision `status` until `status` is `DEPLOYED` by calling `GET /v2/deployments/{deployment_id}/revisions/{latest_revision_id}`.

    1. Call `PATCH /v2/deployments/{deployment_id}` to update the deployment.

    '
  version: 0.1.0
tags:
- name: Listeners (v2)
paths:
  /v2/listeners:
    get:
      tags:
      - Listeners (v2)
      summary: List Listeners
      description: List all listeners.
      operationId: list_listeners_v2_listeners_get
      security:
      - API Key: []
      - Tenant ID: []
      - Bearer Auth: []
      parameters:
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 100
          minimum: 1
          description: Maximum number of resources to return.
          default: 20
          title: Limit
        description: Maximum number of resources to return.
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          description: Pagination offset. Pass this value to subsequent requests to fetch the next page of resources.
          default: 0
          title: Offset
        description: Pagination offset. Pass this value to subsequent requests to fetch the next page of resources.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListenersList'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Listeners (v2)
      summary: Create Listener
      description: 'Create a listener.<br>

        <br>

        Creating a listener is only allowed for LangSmith organizations with self-hosted enterprise plans.'
      operationId: create_listener_v2_listeners_post
      security:
      - API Key: []
      - Tenant ID: []
      - Bearer Auth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListenerCreateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Listener'
        '403':
          description: Forbidden
          content:
            application/json:
              example:
                detail: Listeners cannot be created for LangSmith workspace ID '{workspace_id}'. Creating listeners is only allowed for LangSmith organizations with self-hosted enterprise plans.
        '409':
          description: Conflict
          content:
            application/json:
              example:
                detail: Listener for LangSmith workspace ID '{workspace_id}' and compute ID '{compute_id}' already exists.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v2/listeners/{listener_id}:
    get:
      tags:
      - Listeners (v2)
      summary: Get Listener
      description: Get a listener by ID.
      operationId: get_listener_v2_listeners__listener_id__get
      security:
      - API Key: []
      - Tenant ID: []
      - Bearer Auth: []
      parameters:
      - name: listener_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Listener ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Listener'
        '403':
          description: Forbidden
          content:
            application/json:
              example:
                detail: Listeners cannot be created for LangSmith workspace ID '{workspace_id}'. Creating listeners is only allowed for LangSmith organizations with self-hosted enterprise plans.
        '404':
          description: Not Found
          content:
            application/json:
              example:
                detail: Listener ID {listener_id} not found.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Listeners (v2)
      summary: Patch Listener
      description: Patch a listener by ID.
      operationId: patch_listener_v2_listeners__listener_id__patch
      security:
      - API Key: []
      - Tenant ID: []
      - Bearer Auth: []
      parameters:
      - name: listener_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Listener ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListenerPatchRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Listener'
        '403':
          description: Forbidden
          content:
            application/json:
              example:
                detail: Listeners cannot be created for LangSmith workspace ID '{workspace_id}'. Creating listeners is only allowed for LangSmith organizations with self-hosted enterprise plans.
        '404':
          description: Not Found
          content:
            application/json:
              example:
                detail: Listener ID {listener_id} not found.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Listeners (v2)
      summary: Delete Listener
      description: Delete a listener by ID.
      operationId: delete_listener_v2_listeners__listener_id__delete
      security:
      - API Key: []
      - Tenant ID: []
      - Bearer Auth: []
      parameters:
      - name: listener_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Listener ID
      responses:
        '204':
          description: Successful Response
        '403':
          description: Forbidden
          content:
            application/json:
              example:
                detail: Listeners cannot be created for LangSmith workspace ID '{workspace_id}'. Creating listeners is only allowed for LangSmith organizations with self-hosted enterprise plans.
        '404':
          description: Not Found
          content:
            application/json:
              example:
                detail: Listener ID {listener_id} not found.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ListenerComputeConfig:
      properties:
        k8s_namespaces:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Kubernetes Namespaces
          description: A list of Kubernetes namespaces to which the listener is configured for.<br><br>Only applicable for `k8s` compute type.
      type: object
      title: ListenerComputeConfig
      description: 'Fields for a listener that are specific to `compute_type`.<br>

        <br>

        All fields are nullable, but are validated based on `compute_type`.'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    ListenersList:
      properties:
        resources:
          items:
            $ref: '#/components/schemas/Listener'
          type: array
          title: Resources
        offset:
          type: integer
          title: Offset
          description: Pagination offset. Pass this value to subsequent requests to fetch the next page.
      type: object
      required:
      - resources
      - offset
      title: ListenersList
    ListenerCreateRequest:
      properties:
        version:
          anyOf:
          - type: string
          - type: 'null'
          title: Version
          description: The version of the listener.
        compute_type:
          type: string
          const: k8s
          title: Compute Type
          description: The compute type of the listener.<br><br>This cannot be changed (`PUT`) once the listener is created.
        compute_id:
          type: string
          title: Compute Id
          description: User assigned unique ID of the compute infrastructure for the listener.<br><br>For example, if `compute_type` is `k8s`, then the user may set this field to the Kubernetes cluster name. This cannot be changed (`PUT`) once the listener is created.
        compute_config:
          $ref: '#/components/schemas/ListenerComputeConfig'
      type: object
      required:
      - compute_type
      - compute_id
      - compute_config
      title: ListenerCreateRequest
      description: 'Request body for creating a listener.<br>

        <br>

        A listener must have a unique combination of `workspace_id` and `compute_id`.'
    ListenerPatchRequest:
      properties:
        version:
          anyOf:
          - type: string
          - type: 'null'
          title: Version
          description: The version of the listener.
        compute_config:
          anyOf:
          - $ref: '#/components/schemas/ListenerComputeConfig'
          - type: 'null'
      type: object
      title: ListenerPatchRequest
      description: Requst body for patching a listener.
    Listener:
      properties:
        version:
          anyOf:
          - type: string
          - type: 'null'
          title: Version
          description: The version of the listener.
        compute_type:
          type: string
          const: k8s
          title: Compute Type
          description: The compute type of the listener.<br><br>This cannot be changed (`PUT`) once the listener is created.
        compute_id:
          type: string
          title: Compute Id
          description: User assigned unique ID of the compute infrastructure for the listener.<br><br>For example, if `compute_type` is `k8s`, then the user may set this field to the Kubernetes cluster name. This cannot be changed (`PUT`) once the listener is created.
        compute_config:
          $ref: '#/components/schemas/ListenerComputeConfig'
        id:
          type: string
          format: uuid
          title: ID
          description: System assigned ID of the listener.<br><br>This is a read-only field.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The creation time of the listener.<br><br>This is a read-only field.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: The last update time of the listener.<br><br>This is a read-only field.
      type: object
      required:
      - compute_type
      - compute_id
      - compute_config
      - id
      - created_at
      - updated_at
      title: Listener
      description: Listener resource.
  securitySchemes:
    LangSmith API Key:
      type: apiKey
      in: header
      name: X-Api-Key