API Generation Guide
Transform your database schema into a fully functional REST API in seconds.
Learn how Endora automatically generates production-ready APIs with authentication, validation, documentation, and testing interfaces.
What You'll Learn
- Automatic API generation process
- Generated endpoint structure
- Authentication and security
- API testing and validation
- Documentation generation
- Performance optimization
API Generation Overview

See how Endora transforms your database schema into a complete REST API with all the features you need.
Understanding API Generation
What Gets Generated?
For each table in your schema, Endora automatically creates:
- Complete CRUD Operations: Create, Read, Update, Delete
- Authentication: API key-based security
- Validation: Input validation and data sanitization
- Documentation: Interactive Swagger UI
- Testing Interface: Built-in API testing tools
- Analytics: Usage monitoring and performance metrics
Generated Endpoint Structure
POST /table-name # Create new record
GET /table-name # List all records (paginated)
GET /table-name/{id} # Get specific record
PUT /table-name/{id} # Update entire record
PATCH /table-name/{id} # Partial update
DELETE /table-name/{id} # Delete record
Generated API Features
Automatic CRUD Operations
Create (POST)
POST /users
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"name": "John Doe",
"email": "john@example.com",
"age": 30
}
Read (GET)
# Get all users
GET /users?page=1&limit=10&sort=name&order=asc
# Get specific user
GET /users/123
Update (PUT/PATCH)
# Full update
PUT /users/123
{
"name": "John Smith",
"email": "john.smith@example.com",
"age": 31
}
# Partial update
PATCH /users/123
{
"age": 31
}
Delete (DELETE)
DELETE /users/123
Pagination
GET /users?page=2&limit=20
Sorting
GET /users?sort=created_at&order=desc
Filtering
GET /users?filter[status]=active&filter[age]=25
Search
GET /users?search=john
Include Relationships
GET /users?include=posts,comments
Testing Your API
Built-in Swagger UI
- Open Testing Interface: Go to "API Docs".
- Authenticate: Register and Login to get access token. Pass it in Authorize interface.
- Explore Endpoints: Browse all available operations
- Test Requests: Send real requests and see responses
Testing Workflow
1. Authentication
Authorization: Bearer YOUR_API_KEY
2. Test Create Operation
POST /users
{
"name": "Test User",
"email": "test@example.com",
"age": 25
}
3. Test Read Operations
GET /users
GET /users/1
4. Test Update Operations
PUT /users/1
{
"name": "Updated User",
"email": "updated@example.com",
"age": 26
}
5. Test Delete Operation
DELETE /users/1
Integration Examples
JavaScript/Node.js
// Fetch all users
const response = await fetch("https://api.endora.space/v1/your-project/users", {
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
});
const users = await response.json();
// Create a new user
const newUser = await fetch("https://api.endora.space/v1/your-project/users", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
name: "John Doe",
email: "john@example.com",
age: 30,
}),
});
Python
import requests
# Get all users
response = requests.get(
'https://api.endora.space/v1/your-project/users',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
users = response.json()
# Create a new user
new_user = requests.post(
'https://api.endora.space/v1/your-project/users',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={
'name': 'John Doe',
'email': 'john@example.com',
'age': 30
}
)
Best Practices
API Design
Follow REST principles for consistent, predictable APIs
Return meaningful error messages with appropriate HTTP status codes
Validate all inputs to ensure data quality and security
Provide comprehensive documentation for all endpoints
Performance Optimization
Implement pagination for large datasets to improve performance
Use caching strategies to reduce database load
Track API performance and optimize based on usage patterns
Design for horizontal scaling as your API grows
Next Steps
Your API is Ready!
After generating your API:
- Test All Endpoints: Verify functionality using Swagger UI
- Configure Security: Set up authentication
- Monitor Usage: Track performance and usage patterns
- Integrate: Start using your API in applications
Learn More
Advanced Features
Ready to deploy your API? Learn about deployment →