LangSmith tenant API

The tenant API from LangSmith — 1 operation(s) for tenant.

OpenAPI Specification

langsmith-tenant-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: LangSmith access_policies tenant 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: tenant
paths:
  /api/v1/tenants:
    get:
      tags:
      - tenant
      summary: List Tenants
      description: Get all tenants visible to this auth
      operationId: list_tenants_api_v1_tenants_get
      security:
      - Bearer Auth: []
      parameters:
      - name: skip_create
        in: query
        required: false
        schema:
          type: boolean
          default: false
          title: Skip Create
      - name: include_deleted
        in: query
        required: false
        schema:
          type: boolean
          default: false
          title: Include Deleted
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TenantForUser'
                title: Response List Tenants Api V1 Tenants Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - tenant
      summary: Create Tenant
      description: Create a new organization and corresponding workspace.
      operationId: create_tenant_api_v1_tenants_post
      security:
      - Bearer Auth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/app__schemas__Tenant'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    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
    app__schemas__Tenant:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        organization_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Organization Id
        created_at:
          type: string
          format: date-time
          title: Created At
        display_name:
          type: string
          title: Display Name
        is_personal:
          type: boolean
          title: Is Personal
        is_deleted:
          type: boolean
          title: Is Deleted
        tenant_handle:
          anyOf:
          - type: string
          - type: 'null'
          title: Tenant Handle
        data_plane_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Data Plane Url
      type: object
      required:
      - id
      - created_at
      - display_name
      - is_personal
      - is_deleted
      title: Tenant
      description: Tenant schema.
    TenantCreate:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        organization_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Organization Id
        display_name:
          type: string
          minLength: 1
          pattern: ^[a-zA-Z0-9\-_ ']+$
          title: Display Name
        tenant_handle:
          anyOf:
          - type: string
          - type: 'null'
          title: Tenant Handle
        is_personal:
          type: boolean
          title: Is Personal
          default: false
      type: object
      required:
      - display_name
      title: TenantCreate
      description: Creation model for the tenant.
    TenantForUser:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        organization_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Organization Id
        created_at:
          type: string
          format: date-time
          title: Created At
        display_name:
          type: string
          title: Display Name
        is_personal:
          type: boolean
          title: Is Personal
        is_deleted:
          type: boolean
          title: Is Deleted
        tenant_handle:
          anyOf:
          - type: string
          - type: 'null'
          title: Tenant Handle
        data_plane_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Data Plane Url
        read_only:
          type: boolean
          title: Read Only
          default: false
          deprecated: true
        role_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Role Id
        role_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Role Name
        permissions:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Permissions
      type: object
      required:
      - id
      - created_at
      - display_name
      - is_personal
      - is_deleted
      title: TenantForUser
  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