🧬 Omics807 API Documentation

RESTful API for multi-omics analysis and collaboration

Introduction

The Omics807 REST API provides programmatic access to multi-omics analysis, collaboration features, and organization management. All API endpoints return JSON responses and use standard HTTP status codes.

Base URL: https://your-domain.replit.dev/api/v1

Key Features

  • JWT-based authentication
  • Multi-tenant organization support
  • DNA variant analysis automation
  • Single-cell RNA-seq processing
  • Team collaboration & sharing
  • Folder-based organization

Authentication

The Omics807 API uses JWT (JSON Web Tokens) for authentication. Include your token in the Authorization header of all requests.

Getting a JWT Token

POST /api/v1/auth/token

Exchange Replit Auth credentials for a JWT access token.

curl -X POST https://your-domain.replit.dev/api/v1/auth/token \
  -H "Content-Type: application/json" \
  -d '{
    "replit_user_id": "your-replit-user-id",
    "email": "user@example.com"
  }'
import requests

response = requests.post(
    'https://your-domain.replit.dev/api/v1/auth/token',
    json={
        'replit_user_id': 'your-replit-user-id',
        'email': 'user@example.com'
    }
)

data = response.json()
token = data['access_token']
print(f"Token: {token}")
const response = await fetch('https://your-domain.replit.dev/api/v1/auth/token', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    replit_user_id: 'your-replit-user-id',
    email: 'user@example.com'
  })
});

const data = await response.json();
const token = data.access_token;
console.log(`Token: ${token}`);

Using the Token

Include the JWT token in the Authorization header of all subsequent requests:

Authorization: Bearer YOUR_JWT_TOKEN
Important: Tokens expire after 24 hours. Store them securely and never commit them to version control.

Error Handling

The API uses conventional HTTP response codes to indicate success or failure:

Status Code Meaning
200Success
201Created
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing token
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
500Internal Server Error

Error Response Format

{
  "error": "Error message describing what went wrong",
  "details": "Additional context (optional)"
}

Authentication Endpoints

GET /api/v1/me Requires Auth

Get information about the authenticated user.

curl https://your-domain.replit.dev/api/v1/me \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Analysis Endpoints

GET /api/v1/organizations/{org_id}/analyses Requires Auth

List all analyses in an organization with optional filtering.

ParameterTypeDescription
typestringFilter by analysis type: dna, scrna, multi
statusstringFilter by status: pending, running, completed, failed
limitintegerNumber of results (default: 50, max: 500)
offsetintegerPagination offset
GET /api/v1/organizations/{org_id}/analyses/{uuid} Requires Auth

Get detailed information about a specific analysis.

POST /api/v1/organizations/{org_id}/analyses/dna Requires Auth

Create a new DNA variant analysis job.

Request Body

{
  "name": "BRCA1 Analysis",
  "vcf_url": "https://example.com/variants.vcf",
  "sequencing_type": "WGS",
  "reference_genome": "GRCh38",
  "settings": {
    "min_quality": 30,
    "enable_oncokb": true
  }
}
POST /api/v1/organizations/{org_id}/analyses/rna Requires Auth

Create a new single-cell RNA-seq analysis job.

POST /api/v1/organizations/{org_id}/analyses/multi Requires Auth

Create a multi-omics analysis by combining DNA and RNA analyses.

DELETE /api/v1/organizations/{org_id}/analyses/{uuid} Requires Auth

Delete an analysis. Only the owner or admins can delete analyses.

Sharing & Collaboration

POST /api/v1/organizations/{org_id}/analyses/{uuid}/share Requires Auth

Share an analysis with another user.

{
  "user_email": "colleague@example.com",
  "permission": "view"  // or "edit"
}
GET /api/v1/organizations/{org_id}/analyses/{uuid}/shares Requires Auth

List all users who have access to an analysis.

DELETE /api/v1/organizations/{org_id}/shares/{share_id} Requires Auth

Revoke shared access to an analysis.

GET /api/v1/organizations/{org_id}/shares Requires Auth

List all analyses shared with the current user.

POST /api/v1/organizations/{org_id}/analyses/{uuid}/favorite Requires Auth

Add an analysis to favorites.

DELETE /api/v1/organizations/{org_id}/analyses/{uuid}/favorite Requires Auth

Remove an analysis from favorites.

GET /api/v1/organizations/{org_id}/favorites Requires Auth

List all favorite analyses.

Folder Management

GET /api/v1/organizations/{org_id}/folders Requires Auth

List all folders the user has access to.

POST /api/v1/organizations/{org_id}/folders Requires Auth

Create a new folder for organizing analyses.

{
  "name": "Breast Cancer Study",
  "description": "Q1 2025 patient cohort",
  "is_public": false
}
GET /api/v1/organizations/{org_id}/folders/{folder_id} Requires Auth

Get folder details including members and analyses.

PATCH /api/v1/organizations/{org_id}/folders/{folder_id} Requires Auth

Update folder name, description, or visibility.

DELETE /api/v1/organizations/{org_id}/folders/{folder_id} Requires Auth

Delete a folder. Only the owner can delete folders.

POST /api/v1/organizations/{org_id}/folders/{folder_id}/members Requires Auth

Add a member to a folder with specific role.

DELETE /api/v1/organizations/{org_id}/folders/{folder_id}/members/{user_id} Requires Auth

Remove a member from a folder.

POST /api/v1/organizations/{org_id}/folders/{folder_id}/analyses Requires Auth

Add an analysis to a folder.

DELETE /api/v1/organizations/{org_id}/folders/{folder_id}/analyses/{uuid} Requires Auth

Remove an analysis from a folder.

Organizations (Web API)

Organization management endpoints are available through the web API:

GET /api/organizations Requires Auth

List all organizations the user is a member of.

POST /api/organizations Requires Auth

Create a new organization.

POST /api/organizations/{uuid}/members Requires Auth Admin Only

Invite a member to the organization.

Need Help? Check out our full documentation or GitHub repository.