openapi: 3.0.3
info:
  title: 'OpenBrain API Documentation'
  description: ''
  version: 1.0.0
servers:
  - url: 'http://localhost'
tags:
  - name: Endpoints
    description: ''
paths:
  /api/memories:
    post:
      summary: ''
      operationId: postApiMemories
      description: ''
      parameters: []
      responses: {}
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  description: 'Must be at least 1 character.'
                  example: bngzmiyvdljnikhw
                metadata:
                  type: object
                  description: ''
                  example: null
                  properties: {}
              required:
                - content
      security: []
    put:
      summary: ''
      operationId: putApiMemories
      description: ''
      parameters: []
      responses: {}
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                externalKey:
                  type: string
                  description: 'Must be at least 1 character.'
                  example: bngzmiyvdljnikhw
                content:
                  type: string
                  description: 'Must be at least 1 character.'
                  example: aykcmyuwpwlvqwrs
                metadata:
                  type: object
                  description: ''
                  example: null
                  properties: {}
                scope:
                  type: object
                  description: ''
                  example: null
                  properties:
                    source:
                      type: string
                      description: ''
                      example: architecto
                    project:
                      type: string
                      description: ''
                      example: architecto
              required:
                - externalKey
                - content
      security: []
  /api/memories/batch:
    post:
      summary: ''
      operationId: postApiMemoriesBatch
      description: ''
      parameters: []
      responses: {}
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  description: 'Must have at least 1 items.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      content:
                        type: string
                        description: 'Must be at least 1 character.'
                        example: bngzmiyvdljnikhw
                      metadata:
                        type: object
                        description: ''
                        example: null
                        properties: {}
                      externalKey:
                        type: string
                        description: 'Must be at least 1 character.'
                        example: aykcmyuwpwlvqwrs
                      scope:
                        type: object
                        description: ''
                        example: null
                        properties:
                          source:
                            type: string
                            description: ''
                            example: architecto
                          project:
                            type: string
                            description: ''
                            example: architecto
                    required:
                      - content
                continueOnError:
                  type: boolean
                  description: 'optional Continue processing batch items after an error.'
                  example: true
              required:
                - items
      security: []
  /api/memories/export:
    get:
      summary: ''
      operationId: getApiMemoriesExport
      description: ''
      parameters:
        -
          in: query
          name: includeDeleted
          description: 'optional Include soft-deleted memories.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'optional Include soft-deleted memories.'
            example: false
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                limit:
                  type: integer
                  description: 'Must be at least 1. Must not be greater than 500.'
                  example: 1
                cursor:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: 'n'
                filter:
                  type: object
                  description: ''
                  example: null
                  properties: {}
                includeDeleted:
                  type: boolean
                  description: 'optional Include soft-deleted memories.'
                  example: false
      security: []
  /api/memories/stats:
    get:
      summary: ''
      operationId: getApiMemoriesStats
      description: ''
      parameters:
        -
          in: query
          name: includeDeleted
          description: 'optional Include soft-deleted memories.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'optional Include soft-deleted memories.'
            example: false
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  type: object
                  description: ''
                  example: null
                  properties: {}
                includeDeleted:
                  type: boolean
                  description: 'optional Include soft-deleted memories.'
                  example: false
      security: []
  /api/memories/changes:
    get:
      summary: ''
      operationId: getApiMemoriesChanges
      description: ''
      parameters:
        -
          in: query
          name: includeDeleted
          description: 'optional Include soft-deleted memories.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'optional Include soft-deleted memories.'
            example: false
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                since:
                  type: string
                  description: 'Must not be greater than 64 characters.'
                  example: b
                limit:
                  type: integer
                  description: 'Must be at least 1. Must not be greater than 500.'
                  example: 22
                cursor:
                  type: string
                  description: 'Must not be greater than 255 characters.'
                  example: g
                filter:
                  type: object
                  description: ''
                  example: null
                  properties: {}
                includeDeleted:
                  type: boolean
                  description: 'optional Include soft-deleted memories.'
                  example: false
              required:
                - since
      security: []
  /api/memories/recent:
    get:
      summary: ''
      operationId: getApiMemoriesRecent
      description: ''
      parameters:
        -
          in: query
          name: includeDeleted
          description: 'optional Include soft-deleted memories.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'optional Include soft-deleted memories.'
            example: false
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                limit:
                  type: integer
                  description: 'Must be at least 1. Must not be greater than 50.'
                  example: 1
                filter:
                  type: object
                  description: ''
                  example: null
                  properties: {}
                includeDeleted:
                  type: boolean
                  description: 'optional Include soft-deleted memories.'
                  example: false
      security: []
  /api/memories/search:
    post:
      summary: ''
      operationId: postApiMemoriesSearch
      description: ''
      parameters: []
      responses: {}
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  description: 'Must be at least 1 character.'
                  example: bngzmiyvdljnikhw
                limit:
                  type: integer
                  description: 'Must be at least 1. Must not be greater than 50.'
                  example: 22
                filter:
                  type: object
                  description: ''
                  example: null
                  properties: {}
                includeDeleted:
                  type: boolean
                  description: 'optional Include soft-deleted memories.'
                  example: false
                minScore:
                  type: number
                  description: 'Must be at least 0. Must not be greater than 1.'
                  example: 1
                recencyWeight:
                  type: number
                  description: 'Must be at least 0. Must not be greater than 1.'
                  example: 1
                recencyHalflifeDays:
                  type: number
                  description: 'Must be at least 0.01.'
                  example: 54
              required:
                - query
      security: []
  '/api/memories/{id}':
    get:
      summary: ''
      operationId: getApiMemoriesId
      description: ''
      parameters:
        -
          in: query
          name: includeDeleted
          description: 'optional Include soft-deleted memories.'
          example: false
          required: false
          schema:
            type: boolean
            description: 'optional Include soft-deleted memories.'
            example: false
      responses:
        401:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Unauthenticated.
                properties:
                  message:
                    type: string
                    example: Unauthenticated.
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                includeDeleted:
                  type: boolean
                  description: 'optional Include soft-deleted memories.'
                  example: false
      security: []
    patch:
      summary: ''
      operationId: patchApiMemoriesId
      description: ''
      parameters: []
      responses: {}
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  description: 'Must be at least 1 character.'
                  example: bngzmiyvdljnikhw
                metadata:
                  type: object
                  description: ''
                  example: null
                  properties: {}
                metadataReplace:
                  type: boolean
                  description: 'optional Replace metadata instead of merging.'
                  example: false
      security: []
    put:
      summary: ''
      operationId: putApiMemoriesId
      description: ''
      parameters: []
      responses: {}
      tags:
        - Endpoints
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  description: 'Must be at least 1 character.'
                  example: bngzmiyvdljnikhw
                metadata:
                  type: object
                  description: ''
                  example: null
                  properties: {}
                metadataReplace:
                  type: boolean
                  description: 'optional Replace metadata instead of merging.'
                  example: false
      security: []
    delete:
      summary: ''
      operationId: deleteApiMemoriesId
      description: ''
      parameters: []
      responses: {}
      tags:
        - Endpoints
      security: []
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the memory.'
        example: architecto
        required: true
        schema:
          type: string
