POST /v1/query
Real SQL. One API. No database infrastructure.
Send SQL, JSON, XML, CSV or framework queries over HTTPS. SQLRail handles the relational backend, connections, execution and response formatting.
api.sqlrail.com/v1/query
gateway ready
One endpoint. Real relational queries.
Change the input format below. The request travels through the same gateway and the response stays usable by the application that asked for it.
Use SQL where document queries stop being enough.
Keep the joins, transactions and constraints your application actually needs. SQLRail removes the operating burden—not the relational model.
- 01Multi-table joinsQuery related data in one operation.
- 02TransactionsKeep multi-step writes consistent.
- 03AggregationGroup, filter and calculate at the data layer.
- 04ConstraintsProtect the integrity of every relationship.
- 05Window functionsRank, compare and analyze without extra round trips.
SELECT c.id, c.company_name, COUNT(o.id) AS order_count, SUM(o.total) AS lifetime_value FROM customers c JOIN orders o ON o.customer_id = c.id WHERE o.created_at >= $1 GROUP BY c.id, c.company_name HAVING SUM(o.total) > $2 ORDER BY lifetime_value DESC;
Keep the SQL. Lose the database plumbing.
The old path makes every application team become a database infrastructure team. SQLRail compresses that route into one secure API boundary.
- Application backend
- Database driver
- Credentials + TLS
- Network + firewall
- Connection pool
- Primary + replicas
- Backups
- Monitoring
- Scaling
Connections, routing, execution, scaling and response formatting stay behind the gateway.
- Swift
- Kotlin
- Flutter
- React Native
- Go
- PHP
- Python
- Ruby
Raw SQL where it belongs. Scoped access everywhere else.
Mobile and browser credentials should never become database master keys. SQLRail separates trusted server workloads from client-facing application access.
- Saved and parameterized queries
- Table, column and operation permissions
- Row and data access policies
- Rate and request controls
- Parameterized raw SQL
- Scoped database roles
- Statement policy enforcement
- Project-isolated credentials
- role
- customer_app
- query
- orders.by_customer
- operations
- SELECT
- row_scope
- customer_id = token.sub
- raw_sql
- DENIED
Run your first relational query over HTTPS.
Start with the API reference, choose a request format and connect the stack you already use.
curl -X POST https://api.sqlrail.com/v1/query