{ "openapi": "3.0.3", "info": { "title": "Kumo CMS API", "version": "1.0.0", "description": "Complete document management API with API Key authentication via AWS Secrets Manager. Supports upload, retrieval, archiving, and restoration of documents.", "contact": { "name": "Kumo CMS Support", "email": "kumocms@beegether.net" } }, "servers": [ { "url": "https://api.example.com/v1", "description": "Production API" } ], "components": { "securitySchemes": { "apiKeyAuth": { "type": "apiKey", "in": "header", "name": "Authorization", "description": "API Key configured in AWS Secrets Manager. Format: Bearer " } }, "schemas": { "UploadRequest": { "type": "object", "required": ["file_name"], "properties": { "file_name": { "type": "string", "example": "document.pdf", "description": "Original file name" }, "file_size": { "type": "integer", "example": 1048576, "description": "File size in bytes" }, "content_type": { "type": "string", "example": "application/pdf", "default": "application/octet-stream" }, "meta_content": { "type": "string", "format": "byte", "description": "Base64 encoded meta.json file containing metadata" } } }, "UploadResponse": { "type": "object", "properties": { "document_id": { "type": "string", "description": "UUID generated for this document" }, "message": { "type": "string" }, "method": { "type": "string", "enum": ["presigned_url"] }, "upload_url": { "type": "string", "description": "Pre-signed URL for client-side upload" } } }, "Document": { "type": "object", "properties": { "document_id": { "type": "string" }, "file_name": { "type": "string" }, "storage_class": { "type": "string", "enum": ["STANDARD", "GLACIER", "DEEP_ARCHIVE"] }, "restore_status": { "type": "string", "enum": ["restored", "in_progress"] } } }, "DocumentList": { "type": "object", "properties": { "documents": { "type": "array", "items": { "$ref": "#/components/schemas/Document" } }, "count": { "type": "integer" } } }, "HealthCheckResponse": { "type": "object", "properties": { "status": { "type": "string", "enum": ["healthy", "unhealthy"] }, "checks": { "type": "object" } } }, "ErrorResponse": { "type": "object", "properties": { "error": { "type": "string" } } } } }, "paths": { "/documents": { "get": { "summary": "List documents", "tags": ["Documents"], "security": [ { "apiKeyAuth": [] } ], "responses": { "200": { "description": "List of documents", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentList" } } } } } }, "post": { "summary": "Upload document", "tags": ["Documents"], "security": [ { "apiKeyAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadRequest" } } } }, "responses": { "200": { "description": "Upload successful", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadResponse" } } } } } } }, "/documents/{id}": { "get": { "summary": "Retrieve document", "tags": ["Documents"], "security": [ { "apiKeyAuth": [] } ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Document details and download link" } } }, "delete": { "summary": "Delete document", "tags": ["Documents"], "security": [ { "apiKeyAuth": [] } ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Deleted successfully" } } } }, "/healthcheck": { "get": { "summary": "API health check", "tags": ["System"], "responses": { "200": { "description": "Healthy", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthCheckResponse" } } } } } } } } }