Toolhouse API Keys API

The API Keys API from Toolhouse — 3 operation(s) for api keys.

OpenAPI Specification

toolhouse-api-keys-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Toolhouse Agent Runs API Keys API
  description: All the API! \o/
  version: 0.1.0
tags:
- name: API Keys
paths:
  /me/api-keys:
    get:
      tags:
      - API Keys
      summary: Get Api Keys
      description: Get all API Keys
      operationId: get_api_keys_me_api_keys_get
      responses:
        '200':
          description: Successfully retrieved all API keys
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ApiKeyHidden'
                type: array
                title: Response Get Api Keys Me Api Keys Get
        '500':
          description: Internal server error
      security:
      - HTTPBearer: []
    post:
      tags:
      - API Keys
      summary: Post Create Api Key
      description: Create API Key
      operationId: post_create_api_key_me_api_keys_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiKeyCreate'
        required: true
      responses:
        '200':
          description: Successfully created API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '500':
          description: Internal server error
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /me/api-keys/default:
    get:
      tags:
      - API Keys
      summary: Get Default Api Key
      description: Get default API Key
      operationId: get_default_api_key_me_api_keys_default_get
      responses:
        '200':
          description: Successfully retrieved default API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '500':
          description: Internal server error
      security:
      - HTTPBearer: []
  /me/api-keys/{api_key_id}:
    get:
      tags:
      - API Keys
      summary: Get Api Key
      description: Get API Key by ID
      operationId: get_api_key_me_api_keys__api_key_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: api_key_id
        in: path
        required: true
        schema:
          type: integer
          title: Api Key Id
      responses:
        '200':
          description: Successfully retrieved API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
        '404':
          description: API key not found
        '500':
          description: Internal server error
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - API Keys
      summary: Delete Api Key
      description: Delete API Key
      operationId: delete_api_key_me_api_keys__api_key_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: api_key_id
        in: path
        required: true
        schema:
          type: integer
          title: Api Key Id
      responses:
        '200':
          description: Successfully deleted API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKeyHidden'
        '404':
          description: API key not found
        '500':
          description: Internal server error
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ApiKeyCreate:
      properties:
        name:
          type: string
          title: Name
      type: object
      required:
      - name
      title: ApiKeyCreate
      description: API Key Create
    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
    ApiKey:
      properties:
        id:
          type: integer
          title: Id
        user_id:
          type: string
          title: User Id
        name:
          type: string
          title: Name
        archived:
          type: boolean
          title: Archived
          default: false
        api_key:
          type: string
          title: Api Key
      type: object
      required:
      - id
      - user_id
      - name
      - api_key
      title: ApiKey
      description: API Key
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ApiKeyHidden:
      properties:
        id:
          type: integer
          title: Id
        user_id:
          type: string
          title: User Id
        name:
          type: string
          title: Name
        archived:
          type: boolean
          title: Archived
          default: false
      type: object
      required:
      - id
      - user_id
      - name
      title: ApiKeyHidden
      description: API Key Hidden
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer