Skip to content

API Reference

Sairo exposes a REST API that powers the web UI. All endpoints are available for programmatic use with the same authentication.

All endpoints require authentication except:

  • POST /api/auth/login — login
  • GET /healthz — health check
  • GET /api/share/{token} — public share link access

Authenticate with either:

  • Session cookie — automatically set after login via the web UI
  • Bearer token — pass an API token in the Authorization header:
Authorization: Bearer sairo_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
MethodPathDescription
POST/api/auth/loginLog in with username and password
POST/api/auth/logoutLog out and clear session cookie
GET/api/auth/meGet current user info
PUT/api/auth/change-passwordChange own password
POST/api/auth/2fa/setupBegin 2FA setup, returns QR code
POST/api/auth/2fa/verifyVerify TOTP code to complete 2FA setup
POST/api/auth/2fa/disableDisable 2FA on own account
GET/api/auth/usersList all users (admin only)
POST/api/auth/usersCreate a new user (admin only)
DELETE/api/auth/users/{username}Delete a user (admin only)
PUT/api/auth/users/{username}Update user (role, etc.) (admin only)
GET/api/auth/users/{username}/permissionsGet per-bucket permissions (admin only)
PUT/api/auth/users/{username}/permissionsSet per-bucket permissions (admin only)
DELETE/api/auth/users/{username}/permissions/{bucket}Remove bucket permission (admin only)
POST/api/auth/2fa/reset/{username}Reset a user’s 2FA (admin only)
POST/api/auth/2fa/enableEnable 2FA after setup verification
POST/api/auth/2fa/recoverLog in with a recovery code
POST/api/auth/refreshRefresh session token
GET/api/auth/tokensList own API tokens
POST/api/auth/tokensCreate a new API token
DELETE/api/auth/tokens/{token_id}Revoke an API token
MethodPathDescription
GET/api/auth/oauth/providersList available OAuth providers
GET/api/auth/oauth/{provider}/loginInitiate OAuth flow (google or github)
GET/api/auth/oauth/{provider}/callbackOAuth callback
POST/api/auth/ldapLDAP authentication
MethodPathDescription
GET/api/bucketsList all accessible buckets
POST/api/bucketsCreate a new bucket (admin only)
DELETE/api/buckets/{bucket}Delete an empty bucket (admin only)
MethodPathDescription
GET/api/buckets/{bucket}/listList objects at a prefix
GET/api/buckets/{bucket}/downloadDownload an object via presigned URL redirect
POST/api/buckets/{bucket}/uploadUpload a file
DELETE/api/buckets/{bucket}/objectsDelete an object
DELETE/api/buckets/{bucket}/folderDelete a folder (prefix)
POST/api/buckets/{bucket}/copyCopy an object
POST/api/buckets/{bucket}/renameRename an object
POST/api/buckets/{bucket}/create-folderCreate a folder (empty prefix)
GET/api/buckets/{bucket}/previewPreview file content (first 500 KB)
GET/api/buckets/{bucket}/presigned-urlGenerate a presigned download URL
GET/api/buckets/{bucket}/object-infoGet object metadata (size, ETag, etc.)
GET/api/buckets/{bucket}/file-metadataGet file metadata (Parquet/ORC/Avro schema)
GET/api/buckets/{bucket}/preview-tailPreview the tail of a file
GET/api/buckets/{bucket}/folder-sizeGet total size of a folder prefix
POST/api/buckets/{bucket}/refresh-prefixRefresh index for a specific prefix
MethodPathDescription
GET/api/buckets/{bucket}/object-versionsGet versions for a specific object
GET/api/buckets/{bucket}/list-versionsList all object versions in a bucket
POST/api/buckets/{bucket}/version-restoreRestore a specific version
POST/api/buckets/{bucket}/version-deleteDelete a specific version
POST/api/buckets/{bucket}/purge-versionsPurge non-current versions
POST/api/buckets/{bucket}/scan-versionsScan for all versions in a bucket
GET/api/buckets/{bucket}/version-presigned-urlPresigned URL for a specific version
MethodPathDescription
GET/api/buckets/{bucket}/versioningGet versioning status
PUT/api/buckets/{bucket}/versioningEnable or suspend versioning
GET/api/buckets/{bucket}/lifecycleGet lifecycle rules
PUT/api/buckets/{bucket}/lifecycleSet lifecycle rules
GET/api/buckets/{bucket}/corsGet CORS configuration
PUT/api/buckets/{bucket}/corsSet CORS configuration
GET/api/buckets/{bucket}/aclGet bucket ACL
PUT/api/buckets/{bucket}/aclSet bucket ACL
GET/api/buckets/{bucket}/policyGet bucket policy
PUT/api/buckets/{bucket}/policySet bucket policy
GET/api/buckets/{bucket}/taggingGet bucket tags
PUT/api/buckets/{bucket}/taggingSet bucket tags
DELETE/api/buckets/{bucket}/lifecycleDelete lifecycle rules
DELETE/api/buckets/{bucket}/corsDelete CORS configuration
DELETE/api/buckets/{bucket}/policyDelete bucket policy
GET/api/buckets/{bucket}/websiteGet bucket website configuration
GET/api/buckets/{bucket}/locationGet bucket location
MethodPathDescription
GET/api/buckets/{bucket}/object-aclGet object ACL
PUT/api/buckets/{bucket}/object-aclSet object ACL
GET/api/buckets/{bucket}/object-taggingGet object tags
PUT/api/buckets/{bucket}/object-taggingSet object tags
DELETE/api/buckets/{bucket}/object-taggingDelete object tags
GET/api/buckets/{bucket}/object-lockGet object lock configuration
GET/api/buckets/{bucket}/object-retentionGet object retention policy
GET/api/buckets/{bucket}/object-legal-holdGet object legal hold status
MethodPathDescription
GET/api/buckets/{bucket}/multipart-uploadsList in-progress multipart uploads
POST/api/buckets/{bucket}/abort-multipartAbort a multipart upload
MethodPathDescription
GET/api/buckets/{bucket}/storage-breakdownGet storage breakdown by prefix
GET/api/buckets/{bucket}/storage-historyGet storage growth over time
MethodPathDescription
GET/api/buckets/{bucket}/search?q={term}Full-text search within a bucket
MethodPathDescription
GET/api/buckets/{bucket}/crawl-statusGet indexing status for a bucket
POST/api/buckets/{bucket}/crawlTrigger a reindex of a bucket
MethodPathDescription
GET/api/share-linksList all share links (admin only)
POST/api/share-linksCreate a new share link
DELETE/api/share-links/{link_id}Delete a share link
GET/api/share/{token}Access a shared file (public, no auth)
MethodPathDescription
GET/api/audit-logGet audit log entries (admin only)
MethodPathDescription
GET/api/endpointsList configured S3 endpoints
POST/api/endpointsAdd a new S3 endpoint (admin only)
PUT/api/endpoints/{id}Update an S3 endpoint (admin only)
DELETE/api/endpoints/{id}Remove an S3 endpoint (admin only)
POST/api/endpoints/{id}/testTest endpoint connection (admin only)
GET/api/all-bucketsList buckets across all endpoints
MethodPathDescription
GET/api/licenseGet license info
POST/api/licenseActivate a license key (admin only)
MethodPathDescription
GET/healthzHealth check (no auth required)
GET/api/brandingGet branding configuration
GET/api/health-detailDetailed health with S3, DB, and crawler status
GET/api/health/s3S3 connectivity check
POST/api/health/s3/refreshRefresh S3 health check
GET/api/system-infoSystem information