- Development:
http://localhost:3000/api - Production:
https://your-domain.com/api
Check the health status of the application and its services.
Response:
{
"success": true,
"data": {
"status": "healthy",
"timestamp": "2024-01-15T10:00:00Z",
"services": {
"database": true,
"minio": true
}
}
}Authenticate a user and create a session.
Request Body:
{
"email": "user@example.com",
"password": "password123"
}Response:
{
"success": true,
"data": {
"id": "1",
"email": "user@example.com",
"name": "John Doe",
"role": "user"
},
"message": "Login successful"
}End the current user session.
Response:
{
"success": true,
"message": "Logged out successfully"
}Get the current authenticated user's information.
Response:
{
"success": true,
"data": {
"id": "1",
"email": "user@example.com",
"name": "John Doe",
"role": "user"
}
}Get a list of all supported blockchain networks.
Response:
{
"success": true,
"data": [
{
"id": "cosmos-hub",
"name": "Cosmos Hub",
"network": "cosmoshub-4",
"description": "The Cosmos Hub is the first of thousands of interconnected blockchains.",
"logoUrl": "/chains/cosmos.png"
}
]
}Get details for a specific chain.
Response:
{
"success": true,
"data": {
"id": "cosmos-hub",
"name": "Cosmos Hub",
"network": "cosmoshub-4",
"description": "The Cosmos Hub is the first of thousands of interconnected blockchains.",
"logoUrl": "/chains/cosmos.png"
}
}Get available snapshots for a specific chain.
Response:
{
"success": true,
"data": [
{
"id": "cosmos-snapshot-1",
"chainId": "cosmos-hub",
"height": 19234567,
"size": 483183820800,
"fileName": "cosmoshub-4-19234567.tar.lz4",
"createdAt": "2024-01-15T00:00:00Z",
"updatedAt": "2024-01-15T00:00:00Z",
"type": "pruned",
"compressionType": "lz4"
}
]
}Generate a presigned download URL for a snapshot.
Request Body:
{
"snapshotId": "cosmos-snapshot-1",
"email": "user@example.com" // optional
}Response:
{
"success": true,
"data": {
"downloadUrl": "https://minio.example.com/snapshots/cosmoshub-4-19234567.tar.lz4?..."
},
"message": "Download URL generated successfully"
}All error responses follow this format:
{
"success": false,
"error": "Error type",
"message": "Detailed error message"
}Common HTTP status codes:
- 200: Success
- 400: Bad Request
- 401: Unauthorized
- 403: Forbidden
- 404: Not Found
- 500: Internal Server Error