TMS File API
Danh sách endpoint REST API v1.
GET
/api/v1/health-checksKiểm tra dịch vụ TMS File đang hoạt động.
POST
/api/v1/files/uploadUpload một file: tạo bản ghi metadata, ghi file vào storage theo binding của tổ chức.
POST
/api/v1/files/batchUpload hàng loạt file (multipart items[]); all-or-nothing — ghi DB trong transaction rồi ghi disk tuần tự.
GET
/api/v1/files/{fileId}Đọc file: LOCAL trả stream bytes; CLOUD redirect tới presigned URL. Query `disposition=attachment` để tải xuống.
DELETE
/api/v1/files/{fileId}Xóa file (soft purge): đặt purge_status = SYSTEM_PURGE; job batch xóa bytes trên storage rồi xóa bản ghi DB.
GET
/api/v1/storage-providersDanh sách storage provider đang hoạt động — trả về mảng `{ providerCode, providerName }`.
POST
/api/v1/organization-storage-bindings/createTạo binding lưu trữ file cho tổ chức (một binding hoạt động cho mỗi tổ chức).
PUT
/api/v1/organization-storage-bindings/updateCập nhật binding lưu trữ file đang hoạt động của tổ chức.