LangChain service-accounts API

The service-accounts API from LangChain — 2 operation(s) for service-accounts.

OpenAPI Specification

langchain-service-accounts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: LangSmith access_policies service-accounts 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: service-accounts
paths:
  /api/v1/service-accounts:
    get:
      tags:
      - service-accounts
      summary: Get Service Accounts
      description: Get the current organization's service accounts.
      operationId: get_service_accounts_api_v1_service_accounts_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ServiceAccount'
                type: array
                title: Response Get Service Accounts Api V1 Service Accounts Get
      security:
      - API Key: []
      - Organization ID: []
      - Bearer Auth: []
    post:
      tags:
      - service-accounts
      summary: Create Service Account
      description: Create a service account
      operationId: create_service_account_api_v1_service_accounts_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceAccountCreateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceAccountCreateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - API Key: []
      - Organization ID: []
      - Bearer Auth: []
  /api/v1/service-accounts/{service_account_id}:
    delete:
      tags:
      - service-accounts
      summary: Delete Service Account
      description: Delete a service account
      operationId: delete_service_account_api_v1_service_accounts__service_account_id__delete
      security:
      - API Key: []
      - Organization ID: []
      - Bearer Auth: []
      parameters:
      - name: service_account_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Service Account Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceAccountDeleteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ServiceAccountCreateResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        name:
          type: string
          title: Name
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        default_workspace_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Default Workspace Id
        organization_identity_id:
          type: string
          format: uuid
          title: Organization Identity Id
      type: object
      required:
      - id
      - created_at
      - updated_at
      - name
      - organization_id
      - default_workspace_id
      - organization_identity_id
      title: ServiceAccountCreateResponse
    ServiceAccountDeleteResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        name:
          type: string
          title: Name
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        default_workspace_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Default Workspace Id
      type: object
      required:
      - id
      - created_at
      - updated_at
      - name
      - organization_id
      - default_workspace_id
      title: ServiceAccountDeleteResponse
    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
    ServiceAccountWorkspaceAssignment:
      properties:
        workspace_id:
          type: string
          format: uuid
          title: Workspace Id
        role_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Role Id
      type: object
      required:
      - workspace_id
      title: ServiceAccountWorkspaceAssignment
    ServiceAccount:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        name:
          type: string
          title: Name
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        default_workspace_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Default Workspace Id
      type: object
      required:
      - id
      - created_at
      - updated_at
      - name
      - organization_id
      - default_workspace_id
      title: ServiceAccount
    ServiceAccountCreateRequest:
      properties:
        name:
          type: string
          title: Name
        workspaces:
          items:
            $ref: '#/components/schemas/ServiceAccountWorkspaceAssignment'
          type: array
          title: Workspaces
          default: []
      type: object
      required:
      - name
      title: ServiceAccountCreateRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
  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