openapi: 3.2.0 info: title: V1 Memory Stores API version: v1 description: Endpoints for managing memory stores (vector stores) and document search. servers: - url: https://api.airops.com variables: defaultHost: default: api.airops.com tags: - name: Memory Stores description: Endpoints for managing memory stores (vector stores) and document search. paths: /public_api/vector_stores/{memory_store_id}/search: get: summary: Search description: Perform a search on a memory store. tags: - Memory Stores operationId: searchMemoryStore parameters: - $ref: '#/components/parameters/memory_store_id' description: The Memory Store id - name: query in: query required: true schema: type: string description: The query to search for - name: topk in: query required: false schema: type: integer example: 10 minimum: 1 maximum: 1000 description: The number of results to return - name: filter in: query required: false schema: type: object properties: key: type: string value: type: string description: The filter to apply to the search. See https://docs.airops.com/basic-setup/memory-stores/memory-stores-metadata#how-to-filter-on-metadata for more information. security: - bearer: [] responses: '401': description: Authentication error '400': description: Invalid Request '200': description: Results found content: application/json: schema: type: object properties: matches: type: array items: $ref: '#/components/schemas/MemoryStoreSearchResultItem' /public_api/vector_stores/{memory_store_id}/vector_store_documents: post: summary: Add Document description: Add a document to a memory store. tags: - Memory Stores operationId: addDocumentToMemoryStore parameters: - $ref: '#/components/parameters/memory_store_id' description: The Memory Store id requestBody: content: application/json: schema: type: object properties: text: type: string description: The content of the document name: type: string description: The name of the document metadata: type: object description: The metadata of the document required: - name - text security: - bearer: [] responses: '401': description: Authentication error '400': description: Invalid Request '200': description: Document added content: application/json: schema: $ref: '#/components/schemas/MemoryStoreDocument' /public_api/vector_stores/{memory_store_id}/vector_store_documents/{memory_store_document_id}: put: summary: Update Document description: Update a document in a memory store. tags: - Memory Stores operationId: updateDocumentInMemoryStore parameters: - $ref: '#/components/parameters/memory_store_id' description: The Memory Store id - $ref: '#/components/parameters/memory_store_document_id' description: The id of the document to update requestBody: content: application/json: schema: type: object properties: text: type: string description: The content of the document name: type: string description: The name of the document metadata: type: object description: The metadata of the document required: - name - text security: - bearer: [] responses: '401': description: Authentication error '200': description: Document updated content: application/json: schema: $ref: '#/components/schemas/MemoryStoreDocument' delete: summary: Delete Document description: Delete a document from a memory store. tags: - Memory Stores operationId: deleteDocumentFromMemoryStore parameters: - $ref: '#/components/parameters/memory_store_id' description: The Memory Store id - $ref: '#/components/parameters/memory_store_document_id' description: The id of the document to delete security: - bearer: [] responses: '401': description: Authentication error '200': description: Document deleted components: schemas: MemoryStoreDocument: type: object properties: id: type: number document_type: type: string name: type: string source: type: string status: type: string sync_progress_percentage: type: number created_at: type: string format: date-time updated_at: type: string format: date-time vector_store_id: type: number MemoryStoreSearchResultItem: type: object properties: id: type: string score: type: number content: type: string document_name: type: string metadata: type: object required: - id - score - content - document_name - metadata parameters: memory_store_id: name: memory_store_id in: path required: true schema: type: string description: The Memory Store id memory_store_document_id: name: memory_store_document_id in: path required: true schema: type: string securitySchemes: bearer: type: http scheme: bearer