{"openapi":"3.1.0","info":{"title":"Static Upload","description":"Static-site deployment and authenticated file-workspace operations. Discover usage at /agent-guide.md.","version":"0.3.0"},"paths":{"/api/health":{"get":{"summary":"Health","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/register":{"post":{"summary":"Register","operationId":"register_api_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Registration"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/login":{"post":{"summary":"Login","operationId":"login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/me":{"get":{"summary":"Me","operationId":"me_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/auth/logout":{"post":{"summary":"Logout","operationId":"logout_api_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}],"parameters":[{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}]}},"/api/profile":{"patch":{"summary":"Profile","operationId":"profile_api_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileSetting"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}],"parameters":[{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}]}},"/api/sites":{"get":{"summary":"List Sites","operationId":"list_sites_api_sites_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]},"post":{"summary":"Create Site","operationId":"create_site_api_sites_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewSite"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}],"parameters":[{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}]}},"/api/sites/{site_id}":{"get":{"summary":"Get Site","operationId":"get_site_api_sites__site_id__get","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]},"patch":{"summary":"Update Page","operationId":"update_page_api_sites__site_id__patch","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageSetting"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/files":{"get":{"summary":"Files","operationId":"files_api_sites__site_id__files_get","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/workspace":{"get":{"tags":["Workspace"],"summary":"Browse Workspace","description":"List a directory and the complete directory tree. Empty path means workspace root.","operationId":"browse_workspace","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"path","in":"query","required":false,"schema":{"type":"string","maxLength":1024,"default":"","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/files/download":{"get":{"tags":["Workspace"],"summary":"Download File","description":"Download one private workspace file as an attachment.","operationId":"download_file","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":1024,"title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/files/text":{"get":{"tags":["Workspace"],"summary":"Read Text File","description":"Read a UTF-8 text file. Maximum size 512 KiB; binary files use download_file.","operationId":"read_text_file","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":1024,"title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]},"put":{"tags":["Workspace"],"summary":"Write Text File","description":"Write UTF-8 text, up to 512 KiB. Published immediately; overwrite must be explicit.","operationId":"write_text_file","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextFile"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/files/upload":{"post":{"tags":["Workspace"],"summary":"Upload File","description":"Upload one file without replacing other files. Existing target requires overwrite=true.","operationId":"upload_file","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/workspace/directories":{"post":{"tags":["Workspace"],"summary":"Create Directory","description":"Create a directory, including missing parents.","operationId":"create_directory","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectorySetting"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/workspace/rename":{"post":{"tags":["Workspace"],"summary":"Rename Entry","description":"Rename or move a file/directory. Default-page path follows a renamed entry.","operationId":"rename_entry","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameSetting"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/workspace/delete":{"post":{"tags":["Workspace"],"summary":"Delete Entries","description":"Delete selected entries. Requires confirm=true; current default page is protected.","operationId":"delete_entries","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSetting"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/workspace/compress":{"post":{"tags":["Workspace"],"summary":"Compress Entries","description":"Create a ZIP of selected paths inside the workspace. Existing ZIPs cannot be overwritten.","operationId":"compress_entries","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompressSetting"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/workspace/extract":{"post":{"tags":["Workspace"],"summary":"Extract Zip","description":"Extract a workspace ZIP. Preserve internal paths; conflicts fail unless overwrite=true.","operationId":"extract_zip","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractSetting"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/deploy":{"post":{"summary":"Deploy","operationId":"deploy_api_sites__site_id__deploy_post","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_deploy_api_sites__site_id__deploy_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/backend":{"get":{"tags":["Backend"],"summary":"Get Backend","operationId":"get_backend","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]},"put":{"tags":["Backend"],"summary":"Save Backend Code","operationId":"save_backend_code","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackendCode"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/backend/status":{"get":{"tags":["Backend"],"summary":"Backend Status","operationId":"backend_status","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/backend/check":{"post":{"tags":["Backend"],"summary":"Check Backend Code","operationId":"check_backend_code","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackendCode"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/backend/start":{"post":{"tags":["Backend"],"summary":"Start Backend","operationId":"start_backend","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/backend/stop":{"post":{"tags":["Backend"],"summary":"Stop Backend","operationId":"stop_backend","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/backend/restart":{"post":{"tags":["Backend"],"summary":"Restart Backend","operationId":"restart_backend","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/admin/metrics":{"get":{"tags":["Administration"],"summary":"Server Metrics","operationId":"server_metrics","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/admin/projects/{site_id}/limits":{"patch":{"tags":["Administration"],"summary":"Set Backend Limits","operationId":"set_backend_limits","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackendLimits"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/database":{"get":{"tags":["Database"],"summary":"Database Schema","operationId":"database_schema","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/database/export":{"get":{"tags":["Database"],"summary":"Export Database","operationId":"export_database","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/vnd.sqlite3":{"schema":{"type":"string","format":"binary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/database/import":{"post":{"tags":["Database"],"summary":"Import Database","operationId":"import_database","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_database"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/database/tables/{table}":{"get":{"tags":["Database"],"summary":"Database Rows","operationId":"database_rows","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"table","in":"path","required":true,"schema":{"type":"string","title":"Table"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]},"post":{"tags":["Database"],"summary":"Insert Database Row","operationId":"insert_database_row","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"table","in":"path","required":true,"schema":{"type":"string","title":"Table"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseRow"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]},"patch":{"tags":["Database"],"summary":"Update Database Row","operationId":"update_database_row","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"table","in":"path","required":true,"schema":{"type":"string","title":"Table"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseRow"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]},"delete":{"tags":["Database"],"summary":"Delete Database Row","operationId":"delete_database_row","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"table","in":"path","required":true,"schema":{"type":"string","title":"Table"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseRow"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}},"/api/sites/{site_id}/database/query":{"post":{"tags":["Database"],"summary":"Execute Database Sql","operationId":"execute_database_sql","parameters":[{"name":"site_id","in":"path","required":true,"schema":{"type":"integer","title":"Site Id"}},{"name":"X-CSRF-Token","in":"header","required":true,"description":"Get from GET /api/auth/me in the same session. Registered WebMCP tools supply it internally.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseQuery"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"401":{"description":"Authentication required"},"403":{"description":"Invalid CSRF token or request origin"}},"security":[{"SessionCookie":[]}]}}},"components":{"schemas":{"BackendCode":{"properties":{"source":{"type":"string","maxLength":65536,"minLength":1,"title":"Source"}},"type":"object","required":["source"],"title":"BackendCode"},"BackendLimits":{"properties":{"database_limit_mb":{"type":"integer","maximum":1024.0,"minimum":1.0,"title":"Database Limit Mb","default":10},"qps_limit":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Qps Limit","default":100},"memory_limit_mb":{"type":"integer","maximum":512.0,"minimum":32.0,"title":"Memory Limit Mb","default":128},"timeout_seconds":{"type":"number","maximum":10.0,"minimum":0.1,"title":"Timeout Seconds","default":2}},"type":"object","title":"BackendLimits"},"Body_deploy_api_sites__site_id__deploy_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_deploy_api_sites__site_id__deploy_post"},"Body_import_database":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"confirm":{"type":"boolean","title":"Confirm","default":false}},"type":"object","required":["file"],"title":"Body_import_database"},"Body_upload_file":{"properties":{"path":{"type":"string","maxLength":1024,"minLength":1,"title":"Path"},"overwrite":{"type":"boolean","title":"Overwrite","default":false},"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["path","file"],"title":"Body_upload_file"},"CompressSetting":{"properties":{"paths":{"items":{"type":"string"},"type":"array","maxItems":5000,"minItems":1,"title":"Paths"},"destination":{"type":"string","maxLength":1024,"minLength":1,"title":"Destination"}},"type":"object","required":["paths","destination"],"title":"CompressSetting"},"Credentials":{"properties":{"user_id":{"type":"string","maxLength":39,"minLength":1,"title":"User Id"},"password":{"type":"string","maxLength":256,"minLength":8,"title":"Password"}},"type":"object","required":["user_id","password"],"title":"Credentials"},"DatabaseQuery":{"properties":{"sql":{"type":"string","maxLength":65536,"minLength":1,"title":"Sql"},"params":{"items":{},"type":"array","maxItems":1000,"title":"Params"}},"type":"object","required":["sql"],"title":"DatabaseQuery"},"DatabaseRow":{"properties":{"values":{"additionalProperties":true,"type":"object","title":"Values"},"key":{"additionalProperties":true,"type":"object","title":"Key"},"confirm":{"type":"boolean","title":"Confirm","default":false}},"type":"object","title":"DatabaseRow"},"DeleteSetting":{"properties":{"paths":{"items":{"type":"string"},"type":"array","maxItems":5000,"minItems":1,"title":"Paths"},"confirm":{"type":"boolean","title":"Confirm","default":false}},"type":"object","required":["paths"],"title":"DeleteSetting"},"DirectorySetting":{"properties":{"path":{"type":"string","maxLength":1024,"minLength":1,"title":"Path"}},"type":"object","required":["path"],"title":"DirectorySetting"},"ExtractSetting":{"properties":{"archive_path":{"type":"string","maxLength":1024,"minLength":1,"title":"Archive Path"},"destination":{"type":"string","maxLength":1024,"title":"Destination","default":""},"overwrite":{"type":"boolean","title":"Overwrite","default":false}},"type":"object","required":["archive_path"],"title":"ExtractSetting"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"NewSite":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"NewSite"},"PageSetting":{"properties":{"default_page":{"type":"string","maxLength":1024,"minLength":1,"title":"Default Page"}},"type":"object","required":["default_page"],"title":"PageSetting"},"ProfileSetting":{"properties":{"username":{"type":"string","minLength":1,"title":"Username"},"user_id":{"type":"string","maxLength":39,"minLength":1,"title":"User Id"},"confirm_breaking_links":{"type":"boolean","title":"Confirm Breaking Links","default":false},"current_password":{"type":"string","maxLength":256,"title":"Current Password","default":""}},"type":"object","required":["username","user_id"],"title":"ProfileSetting"},"Registration":{"properties":{"user_id":{"type":"string","maxLength":39,"minLength":1,"title":"User Id"},"password":{"type":"string","maxLength":256,"minLength":8,"title":"Password"},"username":{"type":"string","minLength":1,"title":"Username"}},"type":"object","required":["user_id","password","username"],"title":"Registration"},"RenameSetting":{"properties":{"path":{"type":"string","maxLength":1024,"minLength":1,"title":"Path"},"new_path":{"type":"string","maxLength":1024,"minLength":1,"title":"New Path"}},"type":"object","required":["path","new_path"],"title":"RenameSetting"},"TextFile":{"properties":{"path":{"type":"string","maxLength":1024,"minLength":1,"title":"Path"},"content":{"type":"string","maxLength":524288,"title":"Content"},"overwrite":{"type":"boolean","title":"Overwrite","default":false}},"type":"object","required":["path","content"],"title":"TextFile"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"SessionCookie":{"type":"apiKey","in":"cookie","name":"static_upload_session","description":"HttpOnly session cookie issued by registration/login. Browser agents reuse the logged-in browser session."}}}}