{"openapi":"3.0.0","info":{"title":"Centrali Storage Service API","version":"1.0.0","description":"API documentation for the Centrali Storage Service - File storage, uploads, downloads, and folder management backed by Azure Blob Storage."},"servers":[{"url":"https://api.centrali.io/storage/ws/{workspaceSlug}/api/v1","description":"Workspace-scoped Storage API","variables":{"workspaceSlug":{"default":"demo","description":"The workspace slug"}}}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"File":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"mime_type":{"type":"string"},"size":{"type":"integer"},"render_id":{"type":"string"},"folder_id":{"type":"string","format":"uuid"},"workspace_slug":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"is_public":{"type":"boolean"}}},"Folder":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"parent_id":{"type":"string","format":"uuid"},"workspace_slug":{"type":"string"},"created_at":{"type":"string","format":"date-time"}}},"Error":{"type":"object","properties":{"status":{"type":"integer"},"error":{"type":"string"},"message":{"type":"string"}}}}},"security":[{"bearerAuth":[]}],"tags":[{"name":"Files","description":"File operations"},{"name":"Folders","description":"Folder operations"},{"name":"Sharing","description":"File sharing operations"}],"paths":{"/files":{"post":{"summary":"Upload a file","tags":["Files"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"folder_id":{"type":"string","format":"uuid"}}}}}},"responses":{"201":{"description":"File uploaded successfully"},"400":{"description":"Invalid request"},"413":{"description":"File too large"}}}},"/files/meta":{"get":{"summary":"List file metadata","tags":["Files"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"List of files"}}}},"/files/meta/{file_id}":{"get":{"summary":"Get file metadata","tags":["Files"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"File metadata"},"404":{"description":"File not found"}}}},"/files/{file_id}":{"delete":{"summary":"Delete a file","tags":["Files"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"File deleted"},"404":{"description":"File not found"}}}},"/download/{render_id}":{"get":{"summary":"Download a file","tags":["Files"],"parameters":[{"name":"render_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File download"},"404":{"description":"File not found"}}}},"/render/{render_id}":{"get":{"summary":"Render/preview a file","tags":["Files"],"parameters":[{"name":"render_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File rendered for preview"},"404":{"description":"File not found"}}}},"/folders":{"get":{"summary":"List folders in workspace","tags":["Folders"],"responses":{"200":{"description":"List of folders"}}},"post":{"summary":"Create a folder","tags":["Folders"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"201":{"description":"Folder created"},"400":{"description":"Invalid request"}}}},"/folders/{folder_id}":{"get":{"summary":"Get folder details","tags":["Folders"],"parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Folder details"},"404":{"description":"Folder not found"}}}},"/folders/{folder_id}/sub-folders":{"get":{"summary":"List sub-folders","tags":["Folders"],"parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List of sub-folders"}}},"post":{"summary":"Create sub-folder","tags":["Folders"],"parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}}}}}},"responses":{"201":{"description":"Sub-folder created"}}}},"/folders/{folder_id}/items":{"get":{"summary":"List items in folder","tags":["Folders"],"parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"List of files and sub-folders"}}}},"/folders/{folder_id}/upload":{"post":{"summary":"Upload file to folder","tags":["Folders"],"parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"201":{"description":"File uploaded"}}}},"/files/{file_id}/share/{share_with}":{"post":{"summary":"Share file with user","tags":["Sharing"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"share_with","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"File shared"}}}},"/files/shared-with-me":{"get":{"summary":"List files shared with current user","tags":["Sharing"],"responses":{"200":{"description":"List of shared files"}}}},"/files/{file_id}/make-public":{"post":{"summary":"Make file public","tags":["Sharing"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"File made public"}}}},"/files/{file_id}/make-private":{"post":{"summary":"Make file private","tags":["Sharing"],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"File made private"}}}}}}