{"components":{"securitySchemes":{"BearerAuth":{"bearerFormat":"API Token","scheme":"bearer","type":"http"}}},"info":{"description":"Bearer-token API for listing, uploading, downloading, moving, deleting, and sharing files.","title":"File Server API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/api/auth/token":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"label":{"type":"string"},"password":{"type":"string"},"username":{"type":"string"}},"required":["username","password"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Token created"}},"summary":"Issue a bearer token"}},"/api/files":{"delete":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"path":{"type":"string"}},"required":["path"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Item deleted"}},"security":[{"BearerAuth":[]}],"summary":"Delete a file or folder"},"get":{"parameters":[{"in":"query","name":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"File or folder metadata"}},"security":[{"BearerAuth":[]}],"summary":"List a folder or inspect a file"}},"/api/files/download":{"get":{"parameters":[{"in":"query","name":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Binary file response"}},"security":[{"BearerAuth":[]}],"summary":"Download a file or folder archive"}},"/api/files/move":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"destination":{"type":"string"},"source":{"type":"string"}},"required":["source"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Item moved"}},"security":[{"BearerAuth":[]}],"summary":"Move a file or folder"}},"/api/files/upload":{"post":{"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"files":{"items":{"format":"binary","type":"string"},"type":"array"},"path":{"type":"string"},"relativePaths[]":{"items":{"type":"string"},"type":"array"}},"type":"object"}}},"required":true},"responses":{"200":{"description":"Upload results"}},"security":[{"BearerAuth":[]}],"summary":"Upload one or more files"}},"/api/folders":{"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"type":"string"},"path":{"type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Folder created"}},"security":[{"BearerAuth":[]}],"summary":"Create a folder"}},"/api/public/shares/{token}":{"get":{"parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}},{"in":"query","name":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Public share metadata"}},"summary":"Inspect a public share"}},"/api/public/shares/{token}/download":{"get":{"parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}},{"in":"query","name":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Binary file response"}},"summary":"Download from a public share"}},"/api/shares":{"get":{"responses":{"200":{"description":"Share list"}},"security":[{"BearerAuth":[]}],"summary":"List the current user's shares"},"post":{"requestBody":{"content":{"application/json":{"schema":{"properties":{"path":{"type":"string"}},"required":["path"],"type":"object"}}},"required":true},"responses":{"200":{"description":"Share created"}},"security":[{"BearerAuth":[]}],"summary":"Create a public share link"}},"/api/shares/{token}":{"delete":{"parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Share revoked"}},"security":[{"BearerAuth":[]}],"summary":"Revoke a share"}}},"servers":[{"url":"http://nathanielstam.com"}]}
