The GibsonAI Data API provides a way to access and manage your database schemas via RESTful endpoints. It automatically generates API routes for each table in your schema, keeping them in sync whenever your schema changes. Additionally, a universal SQL Query endpoint allows you to run raw SQL queries across your multiple databases.
Key Highlights
- Auto-Generated REST APIs: For every table you create in your schema, GibsonAI automatically generates CRUD (Create, Read, Update, and Delete) endpoints for
GET
,POST
,PATCH
, andDELETE
. - Automatic Updates: When your schema changes, the API endpoints are instantly updated—no code changes needed.
- Shared SQL Query Endpoint: The
/query
endpoint is universal and works across all database schemas. - Different APIs per Environment: You can have separate Dev, Staging, Production, Feat, etc. database environments, each with its own endpoints and data.
- OpenAPI Documentation: Each project comes with an OpenAPI (Swagger) specification for easy integration and API exploration.
- Serverless and Secure: No backend hosting required; all endpoints are secured via project-specific API keys.
Use Cases
The GibsonAI Data API is designed for modern applications and tools:
- AI Agents: Agents like CrewAI, LangChain, or Agno can directly perform CRUD operations or run SQL queries against your database.
- Low-Code Tools: Tools like Appsmith, Retool, or ToolJet can instantly connect to the Data API without custom backend code.
- Front-End Applications: React, Vue, or Next.js apps can fetch and modify data directly using the auto-generated REST APIs.
- Rapid Prototyping: Developers can go from schema to fully functional APIs in minutes, enabling faster MVP development.
- Multiple Environments: Your development, staging, and production data can be kept separate while using the same schema definitions.
Base URL
https://api.gibsonai.com
Authentication
All requests require an API key in the Header:
X-Gibson-API-Key: your_project_api_key
You can find your GibsonAI API key in the Data API tab on the GibsonAI dashboard.
OpenAPI Documentation
Each GibsonAI project provides a live OpenAPI spec that documents:
- All auto-generated endpoints for your schema.
- Request and response formats.
- Supported query parameters and filters.
You can import this OpenAPI spec directly into Postman, Swagger UI, or API clients for rapid testing and integration.
OpenAPI URL Format
https://api.gibsonai.com/v1/-/openapi/{project_openapi_id}?database={database_environment}
Parameters:
project_openapi_id
– A unique ID for your project’s OpenAPI documentation.database_environment
– The target environment, such asProduction
orStaging
.
Example
https://api.gibsonai.com/v1/-/openapi/rRZ4wD9HDCdHZ?database=Production
- Here,
rRZ4wD9HDCdHZ
is the project OpenAPI ID. Production
refers to the database environment.
SQL Query Endpoint
You can run custom SQL queries on your database using the /query
endpoint.
Example:
curl https://api.gibsonai.com/v1/-/query \
--request POST \
--header 'Content-Type: application/json' \
--header 'X-Gibson-API-Key: your_project_api_key' \
--data '{
"array_mode": false,
"params": [],
"query": "SELECT * FROM products WHERE price > 500"
}'
Best Practices
- Use GET endpoints for simple filters to avoid unnecessary SQL queries.
- Keep your API keys secure and avoid embedding them in front-end code.
- Use OpenAPI docs to generate SDKs or client libraries automatically.