Overview
Understanding the RestBI API
The RestBI API allows developers to interact with the RestBI server to validate models, access database metadata, and execute SQL queries. It is built using Express and TypeScript, and it is designed to be flexible and easy to integrate into your existing applications.
Key Features:
Query Execution: Execute queries to retrieve result sets.
Model Validation: Ensure your data models align with your database schema.
Metadata Retrieval: Access tables and columns from your database dynamically.
The RestBI SDK contains typed wrappers for these API calls.
Endpoints
The RestBI API provides a few key endpoints:
1. GET /
/
Basic health check endpoint to verify that the RestBI server is running.
2. POST /validate
/validate
Validate a data model against the current database schema. Useful for ensuring that your models are correctly aligned with the underlying database structure.
3. POST /metadata
/metadata
Retrieve metadata such as tables and columns from the database based on provided connection details. This is helpful for dynamically generating models or understanding the database schema.
4. POST /query
/query
Generate and execute SQL queries based on provided models and query objects. This endpoint allows for dynamic querying of your database using RestBI's model-driven approach.
CORS Configuration
Typically the RestBI server will live behind a load balancer on an internal network, and CORS will not be needed. However, the RestBI server does includes CORS (Cross-Origin Resource Sharing) configuration to allow requests from specified domains. By default, it is configured to accept requests from http://localhost:3001
. See the installation guide for configuration options.
Last updated