Staging API¶
The staging area holds uploaded files before they are linked to samples via bulk submission.
Upload a file¶
Requires authentication. Upload files directly — MD5 is computed server-side.
curl -X POST http://localhost:8000/api/v1/staging/upload \
-H "Authorization: Bearer $TOKEN" \
-F "file=@SAMPLE_001_R1.fastq.gz"
Response:
{
"id": 1,
"filename": "SAMPLE_001_R1.fastq.gz",
"file_size": 1234567890,
"checksum_md5": "d41d8cd98f00b204e9800998ecf8427e",
"status": "VERIFIED",
"upload_method": "direct",
"created_at": "2026-01-15T10:30:00"
}
List staged files¶
Returns all files staged by the authenticated user.
Delete a staged file¶
Presigned upload (alternative)¶
For large files or S3-compatible clients:
Initiate¶
curl -X POST http://localhost:8000/api/v1/staging/initiate \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"filename": "SAMPLE_001_R1.fastq.gz", "file_size": 1234567890}'
Response:
{
"staged_file_id": 1,
"presigned_url": "http://minio:9000/nfdp-staging/...",
"staging_path": "user_1/1/SAMPLE_001_R1.fastq.gz",
"expires_in": 86400
}
Upload to presigned URL¶
Complete¶
Lifecycle¶
- Upload — File stored in staging bucket
- Validation — Bulk submit matches staged files to sample sheet
- Confirmation — Files linked to runs, marked as "linked"
- Cleanup — Linked files moved to raw storage
Info
Staged files persist across sessions until used or deleted.