This guide covers the website first, then the API for automated uploads.
curl, jq, and Python 3.7+ with requestsOpen https://scientistcloud.com/portal/public/ to browse public datasets. Select a dataset in the sidebar and pick a dashboard from the toolbar. No account is required.
Website login (Auth0) is separate from API tokens. Scripts use /api/auth/login with your ScientistCloud account email.
TOKEN=$(curl -s -X POST "https://scientistcloud.com/api/auth/login" \
-H "Content-Type: application/json" \
-d '{"email": "your@email.com"}' | \
jq -r '.data.access_token')
echo "Token: ${TOKEN:0:20}..."
{
"success": true,
"message": "Login successful",
"data": {
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"expires_in": 86400,
"token_type": "Bearer",
"user": {
"email": "your@email.com",
"name": "Your Name"
}
}
}
curl -H "Authorization: Bearer $TOKEN" \
"https://scientistcloud.com/api/auth/status"
Required form fields: file, user_email, dataset_name, and sensor.
curl -X POST "https://scientistcloud.com/api/upload/upload" \
-H "Authorization: Bearer $TOKEN" \
-F "file=@/path/to/your/file.nxs" \
-F "user_email=your@email.com" \
-F "dataset_name=My First Dataset" \
-F "sensor=4D_NEXUS" \
-F "convert=true" \
-F "is_public=false"
| Parameter | Required | Description | Example |
|---|---|---|---|
file | Yes | File to upload | @/path/to/file.nxs |
user_email | Yes | Owner email | "your@email.com" |
dataset_name | Yes | Name for the dataset | "My Dataset" |
sensor | Yes | Sensor type | IDX, 4D_NEXUS, TIFF, TIFF RGB, NETCDF, HDF5, RGB, MAPIR, ORNL_CHESS_STRAIN, OTHER. Contact us if your sensor is not in the list |
convert | No | Convert to IDX format | true or false |
is_public | No | Make dataset public | true or false |
folder | No | Folder name for organization | "CHESS_4D" |
team_uuid | No | Team UUID for sharing | "team-uuid-here" |
tags | No | Comma-separated tags | "tag1,tag2,tag3" |
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "queued",
"message": "Upload initiated",
"dataset_uuid": "550e8400-e29b-41d4-a716-446655440000"
}
curl -H "Authorization: Bearer $TOKEN" \
"https://scientistcloud.com/api/upload/status/JOB_ID" | jq
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "processing",
"progress_percentage": 45,
"message": "Converting dataset..."
}
curl -s "https://scientistcloud.com/api/v1/datasets/by-user?user_email=your@email.com" \
-H "Authorization: Bearer $TOKEN" | jq
Response includes datasets.my, datasets.shared, datasets.team, and counts.
Once uploaded and processed, you can:
https://scientistcloud.com/portal/ and select your datasetSee Curl Scripts and Python Examples.
./curl_for_chess.sh -u your@email.com -f /path/to/file.nxs -n "Dataset Name"
# Check if the auth service is running (trailing slash required)
curl https://scientistcloud.com/api/health/
# Confirm login for your account email
curl -X POST "https://scientistcloud.com/api/auth/login" \
-H "Content-Type: application/json" \
-d '{"email": "your@email.com"}'
The website uses Auth0. If the portal login page fails, use Sign In on https://scientistcloud.com/portal/index.php rather than the API token flow.
# Check upload service health (trailing slash required)
curl https://scientistcloud.com/api/upload-health/
# Check file exists and is readable
ls -lh /path/to/your/file.nxs
# Check size limits
curl https://scientistcloud.com/api/upload/limits
Access tokens expire after 24 hours. Log in again:
TOKEN=$(curl -s -X POST "https://scientistcloud.com/api/auth/login" \
-H "Content-Type: application/json" \
-d '{"email": "your@email.com"}' | \
jq -r '.data.access_token')