-
Notifications
You must be signed in to change notification settings - Fork 0
Quick Start
Shashank Patil edited this page Jul 26, 2026
·
1 revision
This guide demonstrates how to create and execute your first SQL API using the Generic SQL API Framework.
Create a new SQL file inside the queries directory.
Example:
queries/customers.sql
SELECT
CustomerID,
CustomerName,
City,
MobileNumber
FROM CustomerTable;Create a JSON request that references the SQL file.
{
"query": "customers"
}The framework automatically locates and executes:
queries/customers.sql
Example HTTP request:
POST /api/query
Content-Type: application/jsonRequest Body:
{
"query": "customers"
}{
"success": true,
"rows": [
{
"CustomerID": 1,
"CustomerName": "John",
"City": "Bangalore",
"MobileNumber": "9876543210"
}
]
}The framework also supports parameterized queries.
SQL:
SELECT *
FROM CustomerTable
WHERE CustomerID = :CustomerID;JSON Request:
{
"query": "customer_by_id",
"parameters": {
"CustomerID": 101
}
}Now that you've executed your first query, continue with:
- Database Configuration
- JSON Request Format
- SQL Query Files
- Validation Engine
- Advanced Query Examples