API endpointy — /storage a /admin¶
Tento soubor doplňuje
docs/implementace.md(které pokrývá/auth,/org,/catalog) o sekce /storage a /admin, které tam dosud chybí.
Base URL (dev): http://192.168.1.55:8000
Auth: Authorization: Bearer {access_token} (header)
/storage (S3 Backup + Sync)¶
GET /storage/usage → { used_bytes, limit_bytes, files }
GET /storage/devices → [{ id, device_name, device_type, device_uid, last_seen_at }]
POST /storage/devices → registrace zařízení
GET /storage/devices/{id}/sync-dirs → sync adresáře pro zařízení
POST /storage/devices/{id}/sync-dirs → přidat sync adresář
PATCH /storage/devices/{id}/sync-dirs/{dir_id} → update (last_sync_at)
DELETE /storage/devices/{id}/sync-dirs/{dir_id}
GET /storage/token/{scope}/{dir_id} → dočasný S3 token (scope: private|public)
GET /storage/all-devices-with-dirs → přehled všech zařízení + dirs (pro restore)
/storage (Sharing — company-level ACL)¶
GET /storage/shares → moje sdílení + sdílené se mnou
POST /storage/shares → sdílet vlastní S3 prefix
PATCH /storage/shares/{id} → update (owner_write_back, label)
POST /storage/shares/{id}/notify → upozornit členy
GET /storage/shares/{id}/access → ACL seznam
POST /storage/shares/{id}/access → přidat grantee (user|role|company|all_company)
DELETE /storage/shares/{id}/access/{access_id}
POST /storage/share-links → vytvořit shareable link
GET /storage/share-links → moje linky
DELETE /storage/share-links/{id}
GET /storage/share/{token} → veřejný download (bez auth, redirect na S3)
/storage (Peer Sharing — sync_dir_shares)¶
POST /storage/peer-shares → sdílet sync adresář s uživatelem
GET /storage/peer-shares/sent → moje odeslané sdílení
GET /storage/peer-shares/received → sdílení zaslaná mně (pending+accepted)
POST /storage/peer-shares/{id}/accept → přijmout { local_path }
POST /storage/peer-shares/{id}/decline → odmítnout
DELETE /storage/peer-shares/{id} → smazat
PUT /storage/peer-shares/{id} → změnit oprávnění { permission }
GET /storage/peer-shares/{id}/files?path= → procházet soubory
GET /storage/peer-shares/{id}/presigned?path=&action=get|put → presigned URL
GET /storage/users/search?q= → hledat uživatele
GET /storage/company-search?q= → hledat firmy
GET /storage/notifications → notifikace o nových souborech
POST /storage/notifications/{id}/read
POST /storage/notifications/read-all
GET /storage/shares/subscribed → složky sdílené se mnou (ACL)
/admin (jen super_admin / company_admin avaxis)¶
GET /admin/apps → seznam všech aplikací
POST /admin/apps → { slug, name, description, category, visibility }
POST /admin/apps/{slug}/versions → { version, changelog, files:[{path,checksum,size,platform}] }
PUT /admin/apps/{slug}/versions/{ver}/promote → { to_channel: alpha|beta|stable }
PUT /admin/apps/{slug}/rollback → rollback na předchozí verzi
GET /admin/apps/{slug}/logs → logy instalací
GET /admin/companies ?q&status&plan
GET /admin/companies/{id}
PUT /admin/companies/{id}/plan
POST /admin/companies/{id}/trial → { days }
GET /admin/companies/{id}/storage
GET /admin/users ?q&company_id&status
POST /admin/users/{id}/impersonate
POST /admin/users/{id}/reset-password
PUT /admin/users/{id}/2fa-disable
GET /admin/registrations ?status=pending
PUT /admin/registrations/{id} → { action: approve|reject, note }
GET /admin/settings
PUT /admin/settings → { key, value }
GET /admin/stats → dashboard statistiky