API Reference
Welcome to the SCIENTRY API Reference! This documentation provides comprehensive information about the REST API endpoints, authentication, and data structures.
Overview
The SCIENTRY API is a RESTful API that allows you to programmatically interact with the Scientific Entry System. It provides endpoints for managing projects, models, records, users, and files.
Base URL
http://localhost:5000/api
For production deployments, replace localhost:5000
with your server's domain.
Authentication
Most API endpoints require authentication. SCIENTRY uses token-based authentication. Refer to the developer guide for more details
API Endpoints
Projects
GET /api/projects
- List all projectsPOST /api/projects
- Create a new projectGET /api/projects/{id}
- Get project detailsPUT /api/projects/{id}
- Update projectDELETE /api/projects/{id}
- Delete project
Models
GET /api/models
- List all modelsPOST /api/projects/{id}/models
- Create a new modelGET /api/projects/{id}/models/{model_name}
- Get model detailsPUT /api/projects/{id}/models/{model_name}
- Update modelDELETE /api/projects/{id}/models/{model_name}
- Delete model
Records
GET /api/records
- List all recordsPOST /api/projects/{id}/models/<model_name>/records
- Create a new recordGET /api/projects/{id}/models/<model_name>/records/{record_id}
- Get record detailsPUT /api/projects/{id}/models/<model_name>records/{record_id}
- Update recordDELETE /api/projects/{id}/models/<model_name>/records/{record_id}
- Delete record
Users
GET /api/users
- List all usersPOST /api/users
- Create a new userGET /api/users/{id}
- Get user detailsPUT /api/users/{id}
- Update userDELETE /api/users/{id}
- Delete user
Upload
POST /api/projects/{id}/models/{model_name}/records
-Upload TSV file containing records
Files
GET /api/files
- List filesPOST /api/files
- Upload a fileGET /api/files/{id}
- Download a fileDELETE /api/files/{id}
- Delete a file
Data Models
Project
{
"name": "string",
"description": "string",
"version": "string",
"archived": "boolean",
"created_by": "string"
}
Model
{
"name": "string",
"description": "string",
"reference_model": "string",
"project_id": "string",
"inherit_reference_id": "boolean",
"fields": [
{
"name": "string",
"description": "string",
"type": "string",
"required": "boolean",
"choices": ["string"]
}
]
}
Record
{
"item_id": "string",
"model_name": "string",
"project_id": "string",
"reference_id": "string",
"created_by": "string",
"additional_properties": "object"
}
Pagination
List endpoints support pagination with the following parameters:
offset
- Number of records to skip (default: 0)limit
- Number of records to return (default: 20)
Response format:
{
"data": [...],
"total": 100
}
API Reference Sections
Schema Reference
Full OpenAPI schema documentation.
Developer Guide
Guide on how to programmatically interact with the API
Support
For API support and questions:
- Email: emilio.righi@crg.eu
- Check the User Guide for general usage
- Review the Schema Reference for detailed data structures