Cloudrive

API reference

Every REST endpoint of apps/api, its auth requirement, and the minimum organization role.

Base URL: the API origin (the SPA's origin in production). All bodies are JSON; the REST listener accepts request bodies up to 2 MB. Auth endpoints under /v1/auth are listed in Authentication.

Conventions

  • Auth: Authorization: Bearer <access_token> unless marked public.
  • Role: the minimum organization role (member < admin < owner); "member" means any member of the owning organization. See Authorization.
  • Lists take offset (default 0), limit (default 20, max 100), order_by and order (asc/desc), and answer { data: [...], metadata: { total, offset, limit } }.
  • Errors answer { message }. Validation failures are 422 with per-field messages; malformed JSON is 400; missing or invalid token 401; membership or role 403; unknown records 404.

System

MethodPathAuthNotes
GET/healthpublicLiveness, used by the container healthcheck
GET/public{"message":"Hello, World!"} only when SPA_DIR is empty

Account

MethodPathRoleNotes
GET/v1/me—The application user (session probe)
POST/v1/onboarding/survey—referral_source, use_cases[], optional details; one per user (upsert)

Providers

MethodPathRoleNotes
GET/v1/providers—The provider catalog

Organizations

MethodPathRoleBody
POST/v1/organizations—name, slug, logo? (caller becomes owner)
GET/v1/organizations—The caller's organizations
GET/v1/organizations/:orgIdmember
PATCH/v1/organizations/:orgIdadminname, logo?
DELETE/v1/organizations/:orgIdowner
GET/v1/organizations/:orgId/membersmember
POST/v1/organizations/:orgId/membersadminuser_id, role
PATCH/v1/organizations/:orgId/members/:userIdadminrole
DELETE/v1/organizations/:orgId/members/:userIdadmin
POST/v1/organizations/:orgId/invitationsadminemail, role? (admin/member)
GET/v1/organizations/:orgId/invitationsmember
PATCH/v1/organizations/:orgId/invitations/:invitationIdadminstatus (accepted/rejected/revoked/expired)
DELETE/v1/organizations/:orgId/invitations/:invitationIdadmin

Workspaces

MethodPathRoleBody
POST/v1/organizations/:orgId/workspacesadminname, slug, description?
GET/v1/organizations/:orgId/workspacesmember
GET/v1/workspaces/:wsIdmember
PATCH/v1/workspaces/:wsIdadminname, description?
DELETE/v1/workspaces/:wsIdadmin
GET/v1/workspaces/:wsId/membersmember
POST/v1/workspaces/:wsId/membersadmin*user_id, role
PATCH/v1/workspaces/:wsId/members/:userIdadmin*role
DELETE/v1/workspaces/:wsId/members/:userIdadmin*

* organization owner/admin, or a workspace admin.

Storage accounts

MethodPathRoleNotes
POST/v1/storage/accountsadminDirect connect with credentials (S3-compatible)
GET/v1/storage/accounts?workspace_id=member
GET/v1/storage/accounts/:accountIdmember
PATCH/v1/storage/accounts/:accountIdadmindisplay_name, status, settings
PUT/v1/storage/accounts/:accountId/credentialsadmincredentials
DELETE/v1/storage/accounts/:accountIdadminDisconnect
POST/v1/storage/oauth/:provider_slug/authorizeadminworkspace_id → { authorization_url, state, redirect_uri }
GET/v1/storage/oauth/:provider_slug/callbackpublicCalled by the provider; signed state
POST/v1/storage/accounts/:accountId/refreshadmin{ "status": "refreshed" }
GET/v1/storage/accounts/:accountId/quotamember{ total_bytes, used_bytes }

S3 gateway management and drive

MethodPathRoleNotes
POST/v1/workspaces/:wsId/s3/credentialsadminlabel?; the response includes secret_key once
GET/v1/workspaces/:wsId/s3/credentialsmember
DELETE/v1/workspaces/:wsId/s3/credentials/:credentialIdadminRevoke
POST/v1/workspaces/:wsId/s3/bucketsadminname, storage_account_id, root_prefix?
GET/v1/workspaces/:wsId/s3/bucketsmember
DELETE/v1/workspaces/:wsId/s3/buckets/:bucketIdadminRemoves the mapping only
GET/v1/workspaces/:wsId/s3/recent-filesmemberlimit (default 10, max 50)
GET/v1/workspaces/:wsId/drivememberprefix, account, limit (default 200, max 500)

The S3 protocol itself (port 9000) is described in S3 gateway.

On this page