API Overview

This page summarizes the current ScientistCloud API surface used by the portal.

Base URL

  • https://scientistcloud.com

Core Services

Authentication

EndpointMethodNotes
/api/auth/loginPOSTLogin by email; returns access and refresh tokens
/api/auth/refreshPOSTExchange refresh token for new tokens
/api/auth/logoutPOSTClient-side logout flow; expects token in request body
/api/auth/meGETCurrent user profile
/api/auth/statusGETValidate auth from bearer token/cookies

Upload Jobs

EndpointMethodNotes
/api/upload/uploadPOSTMain file upload endpoint
/api/upload/upload-pathPOSTUpload by server-side file path
/api/upload/status/{job_id}GETJob progress/status
/api/upload/jobsGETRecent jobs for a user
/api/upload/cancel/{job_id}POSTCancel job
/portal/api/jobs.phpGETPortal job list (user or admin); query scope=active\|all, admin=1 for admins
/portal/api/upload-status.php?job_id=GETPortal proxy to upload status (live % and bytes)
/portal/api/conversion-logs.php?dataset_uuid=GETConversion log tail for a dataset

Portal UI: Jobs toolbar button or index.php?jobs=1. Admins: set SC_PORTAL_ADMIN_EMAILS=you@example.com,other@example.com in server env.

/api/upload/supported-sourcesGETSupported upload source/sensor types
/api/upload/limitsGETUpload limits and thresholds
/portal/api/upload-large-initiate.phpPOSTSession-auth; starts resumable large upload (JSON body)
/api/upload/large/initiatePOSTFastAPI initiate (portal proxies via PHP above)
/api/upload/large/chunk/{upload_id}/{index}POST100 MB chunk (multipart field chunk)
/api/upload/large/resume/{upload_id}GETMissing chunk indices for resume
/api/upload/large/complete/{upload_id}POSTFinalize sparse staging file → dataset path
/api/upload/large/limitsGETChunk size and MAX_FILE_SIZE (default 10 TB)

Scale: Portal sends files ≥ 100 MB via chunked upload (4 parallel chunks). Single-shot PHP upload is for smaller files only. Datasets larger than MAX_FILE_SIZE (or multi‑PB): copy to JOB_IN_DATA_DIR/upload/{uuid}/ and use /api/upload/upload-path, or rsync from HPC.

Datasets (v1)

EndpointMethodNotes
/api/v1/datasetsGETList datasets with filters
/api/v1/datasets/by-userGETDatasets grouped as my, shared, team
/api/v1/datasets/publicGETPublic datasets
/api/v1/datasets/public/{identifier}GETPublic dataset details
/api/v1/datasetsPOSTCreate dataset metadata record
/api/v1/datasets/{identifier}GETDataset details (uuid/slug/id/name)
/api/v1/datasets/{identifier}PUTUpdate dataset metadata
/api/v1/datasets/{identifier}DELETEDelete dataset
/api/v1/datasets/{identifier}/statusGETDataset processing status
/api/v1/datasets/{identifier}/convertPOSTQueue conversion

Dataset Files (v1)

EndpointMethod
/api/v1/datasets/{identifier}/filesPOST
/api/v1/datasets/{identifier}/filesGET
/api/v1/datasets/{identifier}/files/{file_id}DELETE
/api/v1/datasets/{identifier}/file-contentGET
/api/v1/datasets/{identifier}/file-serveGET
/api/v1/datasets/{identifier}/settingsGET
/api/v1/datasets/{identifier}/settingsPUT
/api/v1/datasets/{identifier}/sizeGET
/api/v1/user/storageGET
/api/v1/teams/{team_uuid}/storageGET

S3 Runtime Helpers (new)

EndpointMethodPurpose
/api/v1/datasets/s3/presignPOSTGenerate signed/public URL for S3-backed dataset assets
/api/v1/datasets/s3/openvisus-resolved-idxPOSTGenerate resolved idx for OpenVisus runtime access

Auth Header

Most protected endpoints use:

Authorization: Bearer YOUR_ACCESS_TOKEN

Quick Workflow

# 1) Login
TOKEN=$(curl -s -X POST "https://scientistcloud.com/api/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"email":"user@example.com"}' | jq -r '.data.access_token')

# 2) Upload curl -s -X POST "https://scientistcloud.com/api/upload/upload" \ -H "Authorization: Bearer $TOKEN" \ -F "file=@/path/to/file.nxs" \ -F "user_email=user@example.com" \ -F "dataset_name=Example Dataset" \ -F "sensor=4D_NEXUS"

# 3) List datasets by user curl -s "https://scientistcloud.com/api/v1/datasets/by-user?user_email=user@example.com" | jq

Related Pages