REST API
This page lists the various REST APIs available all for components of the kdb Insights Database. For more specific examples, refer to the query documentation for each of the APIs.
How to call the Service Gateway REST API
The REST API can be invoked using tools such as curl
.
In kdb Insights Enterprise, before calling an API, you must obtain an access token. To do this, refer to the instructions in the KXI CLI. The token then must be passed in using the Authorization
header:
curl -H "Authorization: Bearer $INSIGHTS_TOKEN"
REST API URL conventions
- kdb Insights Enterprise - the URL pattern consists of the Insights hostname followed by
/servicegateway/api/v1/
then the name of the REST API in the Service Gateway such as/data
or/database/...
. For example, to query the status of a database:
curl -L "https://${INSIGHTS_HOSTNAME}/servicegateway/api/v1/database/myDatabase/status" \
-H "Authorization: Bearer $INSIGHTS_TOKEN"
- kdb Insights SDK - the name of the REST API comes directly after the host/port on which the Service Gateway container is listening. For example:
curl -L "https://localhost:8080/database/myDatabase/status"
OpenAPI schema
- Service Gateway API - View the REST interface for querying a kdb Insights database.
APIs
getData
- Retrieve data from a table in kdb Insights.getMeta
- Retrieve query and aggregation metadata for all data in the system.ping
- Check the status of a Data Access Process.qsql
- Execute a qSQL query on a specific tier of a database.sql
- Execute an SQL query across a database.sql2
- Enhanced functionality on SQL, offering improved memory and performance.
Reference
- Service Gateway - Primary query interface for interacting with kdb Insights.
- Resource Coordinator - kdb Insights query routing and aggregation coordinator.
- Aggregator - kdb Insights Database query aggregator.
- Data Access - kdb Insights Database tiered data access (RDB, IDB, HDB).
- Storage Manager - kdb Insights Database storage controller.