aboutsummaryrefslogtreecommitdiff
path: root/apps/docs/openapi.json
diff options
context:
space:
mode:
Diffstat (limited to 'apps/docs/openapi.json')
-rw-r--r--apps/docs/openapi.json501
1 files changed, 1 insertions, 500 deletions
diff --git a/apps/docs/openapi.json b/apps/docs/openapi.json
index 1600761c..45d4402f 100644
--- a/apps/docs/openapi.json
+++ b/apps/docs/openapi.json
@@ -1,500 +1 @@
-{
- "openapi": "3.0.0",
- "info": {
- "title": "Supermemory API",
- "version": "1.0",
- "description": "API for Supermemory personal knowledge management system"
- },
- "servers": [
- {
- "url": "https://api.supermemory.ai/v1",
- "description": "Supermemory Production API"
- }
- ],
- "components": {
- "securitySchemes": {
- "bearerAuth": {
- "type": "http",
- "scheme": "bearer"
- }
- },
- "schemas": {
- "User": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "uuid": {
- "type": "string"
- },
- "email": {
- "type": "string"
- },
- "firstName": {
- "type": "string"
- },
- "lastName": {
- "type": "string"
- },
- "profilePictureUrl": {
- "type": "string"
- },
- "hasOnboarded": {
- "type": "boolean"
- }
- }
- },
- "Space": {
- "type": "object",
- "properties": {
- "uuid": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "ownerId": {
- "type": "string"
- },
- "isPublic": {
- "type": "boolean"
- },
- "createdAt": {
- "type": "string",
- "format": "date-time"
- },
- "permissions": {
- "type": "object",
- "properties": {
- "canRead": {
- "type": "boolean"
- },
- "canEdit": {
- "type": "boolean"
- },
- "isOwner": {
- "type": "boolean"
- }
- }
- }
- }
- },
- "Document": {
- "type": "object",
- "properties": {
- "uuid": {
- "type": "string"
- },
- "content": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "createdAt": {
- "type": "string",
- "format": "date-time"
- }
- }
- }
- }
- },
- "paths": {
- "/user": {
- "get": {
- "summary": "Get current user",
- "security": [
- {
- "bearerAuth": []
- }
- ],
- "responses": {
- "200": {
- "description": "User details",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/User"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized"
- }
- }
- }
- },
- "/spaces": {
- "get": {
- "summary": "List spaces",
- "security": [
- {
- "bearerAuth": []
- }
- ],
- "responses": {
- "200": {
- "description": "List of spaces",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "spaces": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Space"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "/spaces/create": {
- "post": {
- "summary": "Create space",
- "security": [
- {
- "bearerAuth": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "spaceName": {
- "type": "string",
- "minLength": 1,
- "maxLength": 100
- },
- "isPublic": {
- "type": "boolean"
- }
- }
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Space created"
- },
- "401": {
- "description": "Unauthorized"
- }
- }
- }
- },
- "/spaces/addContent": {
- "post": {
- "summary": "Add content to space",
- "security": [
- {
- "bearerAuth": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "spaceId": {
- "type": "string"
- },
- "documentId": {
- "type": "string"
- }
- },
- "required": ["spaceId", "documentId"]
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Content added to space successfully"
- },
- "401": {
- "description": "Unauthorized"
- }
- }
- }
- },
- "/memories": {
- "get": {
- "summary": "List memories",
- "security": [
- {
- "bearerAuth": []
- }
- ],
- "parameters": [
- {
- "name": "start",
- "in": "query",
- "schema": {
- "type": "integer",
- "default": 0
- }
- },
- {
- "name": "count",
- "in": "query",
- "schema": {
- "type": "integer",
- "default": 10
- }
- },
- {
- "name": "spaceId",
- "in": "query",
- "schema": {
- "type": "string"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "List of memories",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "items": {
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/Document"
- }
- },
- "total": {
- "type": "integer"
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "/chat": {
- "post": {
- "summary": "Chat with memory assistant",
- "security": [
- {
- "bearerAuth": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "messages": {
- "type": "array",
- "items": {
- "type": "object"
- }
- },
- "threadId": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Chat response stream",
- "content": {
- "text/event-stream": {
- "schema": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "/v1/add": {
- "post": {
- "summary": "Add new content",
- "security": [
- {
- "bearerAuth": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "content": {
- "type": "string",
- "minLength": 1
- },
- "spaces": {
- "type": "array",
- "maxItems": 5,
- "items": {
- "type": "string"
- }
- },
- "prefetched": {
- "type": "object",
- "properties": {
- "contentToVectorize": {
- "type": "string"
- },
- "contentToSave": {
- "type": "string"
- },
- "title": {
- "type": "string"
- },
- "type": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "ogImage": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Content added successfully"
- },
- "400": {
- "description": "Invalid request"
- },
- "401": {
- "description": "Unauthorized"
- }
- }
- }
- },
- "/search": {
- "post": {
- "summary": "Search content",
- "security": [
- {
- "bearerAuth": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "query": {
- "type": "string",
- "minLength": 1
- },
- "limit": {
- "type": "number",
- "minimum": 1,
- "maximum": 50,
- "default": 10
- },
- "threshold": {
- "type": "number",
- "minimum": 0,
- "maximum": 1,
- "default": 0
- }
- }
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Search results"
- }
- }
- }
- },
- "/user/spaces": {
- "get": {
- "summary": "Get user spaces",
- "security": [
- {
- "bearerAuth": []
- }
- ],
- "responses": {
- "200": {
- "description": "List of user spaces"
- },
- "401": {
- "description": "Unauthorized"
- }
- }
- }
- },
- "/integrations/notion/import": {
- "get": {
- "summary": "Import Notion content",
- "security": [
- {
- "bearerAuth": []
- }
- ],
- "responses": {
- "200": {
- "description": "Stream of import progress",
- "content": {
- "text/event-stream": {
- "schema": {
- "type": "string"
- }
- }
- }
- },
- "401": {
- "description": "Unauthorized"
- }
- }
- }
- }
- },
- "security": [
- {
- "bearerAuth": []
- }
- ]
-} \ No newline at end of file
+{"openapi":"3.1.0","info":{"title":"Supermemory API","description":"best memory api on 🌍","version":"2.0.0"},"servers":[{"url":"http://localhost:3000","description":"Local Server"},{"url":"https://v2.api.supermemory.ai","description":"Production Server"}],"paths":{"/add":{"post":{"responses":{"200":{"description":"Memory added successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"]}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"string"}},"required":["error"]}}}}},"operationId":"postAdd","tags":["Memory Management"],"parameters":[],"description":"Add a new memory with content and metadata","request":{"body":{"description":"Memory content and metadata","content":{"application/json":{"schema":{}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"spaceIds":{"type":"array","items":{"type":"string"}},"id":{"type":"string"}},"required":["content"]}}}}}},"/update/{id}":{"put":{"responses":{"200":{"description":"Memory updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"]}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"string"}},"required":["error"]}}}}},"operationId":"putUpdateById","tags":["Memory Management"],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"description":"Update an existing memory","request":{"params":{"description":"Memory ID","schema":{}},"body":{"description":"Updated memory content","content":{"application/json":{"schema":{}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string"},"metadata":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"spaceIds":{"type":"array","items":{"type":"string"}}},"required":["content"]}}}}}},"/delete/{id}":{"delete":{"responses":{"200":{"description":"Memory deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"404":{"description":"Memory not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"string"}},"required":["error"]}}}}},"operationId":"deleteDeleteById","tags":["Memory Management"],"parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"description":"Delete a memory","request":{"params":{"description":"Memory ID","schema":{}}}}},"/search":{"post":{"responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string"},"chunks":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"isRelevant":{"type":"boolean"}},"required":["content","isRelevant"]}},"score":{"type":"number"}},"required":["documentId","chunks","score"]}}},"required":["results"]}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"string"}},"required":["error"]}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"string"}},"required":["error"]}}}}},"operationId":"postSearch","tags":["Search"],"parameters":[],"description":"Search through documents with metadata filtering","request":{"body":{"description":"Search parameters","content":{"application/json":{"schema":{}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"q":{"type":"string","minLength":1},"limit":{"type":"integer","exclusiveMinimum":0,"default":10},"filters":{"anyOf":[{"type":"object","properties":{"OR":{"type":"array","items":{}},"AND":{"type":"array","items":{}}}},{"type":"object","additionalProperties":{}}]},"chunkSize":{"type":"integer","exclusiveMinimum":0,"default":3},"minScore":{"type":"number","minimum":0,"maximum":1,"default":0.5}},"required":["q"]}}}}}},"/fastsearch":{"get":{"responses":{"200":{"description":"Fast search results","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"content":{"type":"string"},"similarity":{"type":"number"}},"required":["id","content","similarity"]}}},"required":["results"]}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"string"}},"required":["error"]}}}}},"operationId":"getFastsearch","tags":["Search"],"parameters":[{"in":"query","name":"q","schema":{"type":"string","minLength":1},"required":true},{"in":"query","name":"limit","schema":{"type":"string","pattern":"^\\d+$"},"required":false}],"description":"Fast, lossy search using quantized embeddings","request":{"query":{"description":"Search parameters","schema":{}}}}}},"components":{"schemas":{}}} \ No newline at end of file