Getting Started with ScientistCloud Data Portal

This guide will help you get started with the ScientistCloud Data Portal, from authentication to uploading your first dataset.

Prerequisites

  • A ScientistCloud account (email address)
  • curl command-line tool (for API examples)
  • jq for JSON parsing (optional but recommended)
  • Python 3.7+ (for Python examples)

Step 1: Authentication

The first step is to authenticate and obtain an access token.

Using curl

# Login and get token
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')

# Verify token echo "Token: ${TOKEN:0:20}..."

Response

{
  "success": true,
  "message": "Login successful",
  "data": {
    "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
    "expires_in": 86400,
    "token_type": "Bearer",
    "user": {
      "email": "your@email.com",
      "name": "Your Name"
    }
  }
}

Verify Authentication

curl -H "Authorization: Bearer $TOKEN" \
     "https://scientistcloud.com/api/auth/status"

Step 2: Upload Your First Dataset

Once authenticated, you can upload files to the portal.

Basic Upload

curl -X POST "https://scientistcloud.com/api/upload/upload" \
     -H "Authorization: Bearer $TOKEN" \
     -F "file=@/path/to/your/file.nxs" \
     -F "dataset_name=My First Dataset" \
     -F "sensor=4D_NEXUS" \
     -F "convert=true" \
     -F "is_public=false"

Upload Parameters

ParameterRequiredDescriptionExample
fileYesFile to upload@/path/to/file.nxs
dataset_nameYesName for the dataset"My Dataset"
sensorNoSensor typeIDX, 4D_NEXUS, TIFF, TIFF RGB, NETCDF, HDF5, RGB, MAPIR, OTHER. Contact Us if your sensor is not in the list
convertNoConvert to IDX formattrue or false
is_publicNoMake dataset publictrue or false
folderNoFolder name for organization"CHESS_4D"
team_uuidNoTeam UUID for sharing"team-uuid-here"
tagsNoComma-separated tags"tag1,tag2,tag3"

Upload Response

{
  "success": true,
  "job_id": "550e8400-e29b-41d4-a716-446655440000",
  "message": "Upload initiated",
  "dataset_uuid": "550e8400-e29b-41d4-a716-446655440000"
}

Step 3: Check Upload Status

After uploading, you can monitor the upload and conversion progress.

# Replace JOB_ID with the job_id from the upload response
curl -H "Authorization: Bearer $TOKEN" \
     "https://scientistcloud.com/api/upload/status/JOB_ID" | jq

Status Response

{
  "job_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "processing",
  "progress_percentage": 45,
  "message": "Converting dataset..."
}

Step 4: List Your Datasets

View all your datasets:

curl -X GET "https://scientistcloud.com/portal/api/datasets" \
     -H "Authorization: Bearer $TOKEN" | jq

Response

{
  "success": true,
  "datasets": [
    {
      "uuid": "550e8400-e29b-41d4-a716-446655440000",
      "name": "My First Dataset",
      "sensor": "4D_NEXUS",
      "created_at": "2024-01-15T10:30:00Z",
      "status": "completed"
    }
  ]
}

Step 5: Access Your Dataset

Once uploaded and processed, you can:

  • View in Portal: Navigate to https://scientistcloud.com/portal/ and select your dataset
  • Access via API: Use the dataset UUID to get details and files
  • Share with Team: Use the team UUID to share with collaborators

Using Ready-Made Scripts

For convenience, you can use the provided curl scripts. See the Curl Scripts documentation for details.

Example: Quick Upload Script

# Download and customize the script
./curl_for_chess.sh -u your@email.com -f /path/to/file.nxs -n "Dataset Name"

# Or use defaults (edit script to set your defaults) ./curl_for_chess.sh

Next Steps

Troubleshooting

Authentication Failed

# Check if auth service is running
curl https://scientistcloud.com/api/auth/health

# Verify your email is correct curl -X POST "https://scientistcloud.com/api/auth/login" \ -H "Content-Type: application/json" \ -d '{"email": "your@email.com"}'

Upload Failed

# Check upload service health
curl https://scientistcloud.com/api/upload/health

# Verify file exists and is readable ls -lh /path/to/your/file.nxs

# Check file size limits (contact admin if file is very large)

Token Expired

Tokens expire after 24 hours. Simply login again to get a new token:

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')

Support

For additional help: