Additional features
Contents
Versioning
It's possible to update the version of an endpoint - this happens when the underlying query changes. Default /run API calls will use the latest version of a query, but if you want to run an older version you can specify that in the body of the request. You can find example usage in the Playground tab of an endpoint that has more than one version.
Configuration
Endpoints have a couple of configuration options that enable better performance for your end users.
Materialization
For better performance, you can materialize your HogQL based endpoint. Materialized queries are precomputed on a desired frequency, significantly improving the response time of the API since we don't need to re-run the query on every request.
We currently only support materializing a SQL based endpoint, and are actively working on supporting insight based endpoints too.
Caching
Although our other API endpoints have cache by default, endpoints provide a bit more control over how long you want the cache to exist, ideally eliminating the need for you to implement your own caching layer. Once the cache expires, the subsequent request to execute the endpoint will run the underlying query again.
Security
- Authentication: All endpoint requests require authentication with a personal API key
- Permissions: Ensure your API keys have the appropriate permissions for the data you're accessing (
endpoint:readscope) - Team isolation: Endpoints are scoped to your team, so you can only access endpoints in your own team