Endpoints
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
PATCH | |
DELETE | |
GET | |
POST | |
GET | |
POST | |
GET | |
GET | |
POST | |
GET | |
POST | |
GET |
Update endpoints
Update an existing endpoint.
Required API key scopes
endpoint:writePath parameters
- namestring
Request parameters
- namestringnull
- query
- descriptionstringnull
- data_freshness_secondsintegernull
- is_activebooleannull
- is_materializedbooleannull
- derived_from_insightstringnull
- versionintegernull
- bucket_overridesobjectnull
- deletedbooleannull
- tagsarraynull
- optional_breakdown_propertiesarraynull
Response
Example request
PATCH /api /projects /:project_id /endpoints /:nameExample response
Status 200
Delete endpoints
Delete an endpoint and clean up materialized query.
Required API key scopes
endpoint:writePath parameters
- namestring
Example request
DELETE /api /projects /:project_id /endpoints /:nameExample response
Status 204 No response body
Retrieve endpoints logs
Required API key scopes
endpoint:readPath parameters
- namestring
Query parameters
- afterstring
- beforestring
- instance_idstring
- levelstring
- limitintegerDefault:
50 - searchstring
Example request
GET /api /projects /:project_id /endpoints /:name /logsExample response
Status 200 No response body
Create endpoints materialization preview
Preview the materialization transform for an endpoint. Shows what the query will look like after materialization, including range pair detection and bucket functions.
Required API key scopes
endpoint:readPath parameters
- namestring
Request parameters
- versioninteger
- bucket_overridesobjectnull
Example request
POST /api /projects /:project_id /endpoints /:name /materialization_previewExample response
Status 200 No response body
Retrieve endpoints materialization status
Get materialization status for an endpoint. Supports ?version=N query param.
Required API key scopes
endpoint:readPath parameters
- namestring
Response
Example request
GET /api /projects /:project_id /endpoints /:name /materialization_statusExample response
Status 200
Create endpoints materialization suggestion
Ask AI to rewrite the endpoint's query into a semantically equivalent form that can be materialized. Only applicable to SQL (HogQL) endpoints that currently fail the materialization checks. The suggestion is validated against the live checks before being returned; nothing is saved. Requires the organization's AI data processing approval.
Required API key scopes
endpoint:readPath parameters
- namestring
Request parameters
- versionintegernull
Response
Example request
POST /api /projects /:project_id /endpoints /:name /materialization_suggestionExample response
Status 200
Retrieve endpoints openapi spec
Get OpenAPI 3.0 specification for this endpoint. Use this to generate typed SDK clients.
Required API key scopes
endpoint:readPath parameters
- namestring
Query parameters
- versioninteger
Example request
GET /api /projects /:project_id /endpoints /:name /openapi.jsonExample response
Status 200 No response body
Retrieve endpoints run
Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.
Required API key scopes
endpoint:readPath parameters
- namestring
Response
Example request
GET /api /projects /:project_id /endpoints /:name /runExample response
Status 200
Create endpoints run
Execute endpoint with optional materialization. Supports version parameter, runs latest version if not set.
Required API key scopes
endpoint:readPath parameters
- namestring
Request parameters
- client_query_id
- debugDefault:
false - filters_override
- limit
- offset
- refreshDefault:
cache - variables
- version
Response
Example request
POST /api /projects /:project_id /endpoints /:name /runExample response
Status 200
List all endpoints versions
List all versions for an endpoint.
Required API key scopes
endpoint:readPath parameters
- namestring
Query parameters
- created_byinteger
- is_activeboolean
- limitinteger
- offsetinteger
Response
Example request
GET /api /projects /:project_id /endpoints /:name /versionsExample response
Status 200
Create endpoints last execution times
Get the most recent execution time per endpoint (endpoint-level). Timestamps are recorded by the run path for personal-API-key calls. For per-version usage, query the query_log table directly.
Required API key scopes
endpoint:readRequest parameters
- namesarray
Response
Example request
POST /api /projects /:project_id /endpoints /last_execution_timesExample response
Status 200
Retrieve endpoints materialization conditions
Get the source code of the live materialization checks, plus the rewrite contract. Lets an agent rewrite a rejected endpoint query itself: fetch these conditions, produce a semantically equivalent query that passes every check, update the endpoint with it, then confirm via materialization_status. The source is read from the running system, so it always matches the checks this instance enforces.
Required API key scopes
endpoint:readResponse
Example request
GET /api /projects /:project_id /endpoints /materialization_conditions