Skip to content

HTTP API / Serving

Serving API ​

11 operations. Paths are relative to the API host (http://localhost:5080 in local development). Every operation accepts an OIDC bearer token (Authorization: Bearer …) or a workspace API key (X-Api-Key: keel_live_…); errors are RFC 9457 Problem Details with a code (error codes). Permissions: matrix.

MethodPathSummary
GET/api/v1/serving/{endpoint}/catalogMetrics (with trust), dimensions and segments the endpoint exposes to the caller.
POST/api/v1/serving/{endpoint}/compileCompile a semantic query to SQL without running it (the endpoint must expose SQL, or the caller edits models).
POST/api/v1/serving/{endpoint}/queryRun a semantic query on the endpoint's release: access policies applied, cached, with trust scores (docs/04 §5).
GET/api/v1/workspaces/{workspaceId}/serving/endpointsThe workspace's serving endpoints with their usage in the last 7 days.
POST/api/v1/workspaces/{workspaceId}/serving/endpointsPublish a model (a pinned release or the latest) as a serving endpoint (Govern; audited).
GET/api/v1/workspaces/{workspaceId}/serving/endpoints/{endpointId}One serving endpoint.
PUT/api/v1/workspaces/{workspaceId}/serving/endpoints/{endpointId}Replace an endpoint's settings (the slug never changes; Govern; audited).
DELETE/api/v1/workspaces/{workspaceId}/serving/endpoints/{endpointId}Delete an endpoint (soft, audited); its slug becomes free.
POST/api/v1/workspaces/{workspaceId}/serving/endpoints/{endpointId}:disableTurn an endpoint off: queries get 403 Serving.EndpointDisabled (audited).
POST/api/v1/workspaces/{workspaceId}/serving/endpoints/{endpointId}:enableTurn an endpoint on (audited).
GET/api/v1/workspaces/{workspaceId}/serving/endpoints/statsCalls per day, p95 duration and error rate of each endpoint over the last 30 days (query-log metadata only).

ServingCatalog ​

http
GET /api/v1/serving/{endpoint}/catalog

Metrics (with trust), dimensions and segments the endpoint exposes to the caller.

ParameterInTypeRequiredNotes
endpointpathstringyes
StatusDescriptionBody
200OKServingCatalogResponse

Response 200: ServingCatalogResponse

FieldTypeNotes
descriptionstring?
dimensionsServingCatalogDimensionDto[]
metricsServingCatalogMetricDto[]
namestring
releaseServingReleaseDto
segmentsServingCatalogSegmentDto[]
slugstring

ServingCompile ​

http
POST /api/v1/serving/{endpoint}/compile

Compile a semantic query to SQL without running it (the endpoint must expose SQL, or the caller edits models).

ParameterInTypeRequiredNotes
endpointpathstringyes

Request body (application/json): ServingQueryBody

FieldTypeNotes
dimensionsstring[]?
filtersServingFilterBody[]?
limitint32?
metricsstring[]
optionsServingOptionsBody?
orderByServingOrder[]?
segmentsstring[]?
StatusDescriptionBody
200OKServingCompileResponse
422Unprocessable EntityProblemDetails
429Too Many RequestsProblemDetails

Response 200: ServingCompileResponse

FieldTypeNotes
columnsServingColumnDto[]
dialectstring
limitint32
parametersServingParameterDto[]
releaseServingReleaseDto
sqlstring
warningsstring[]

ServingQuery ​

http
POST /api/v1/serving/{endpoint}/query

Run a semantic query on the endpoint's release: access policies applied, cached, with trust scores (docs/04 §5).

ParameterInTypeRequiredNotes
endpointpathstringyes

Request body (application/json): ServingQueryBody

FieldTypeNotes
dimensionsstring[]?
filtersServingFilterBody[]?
limitint32?
metricsstring[]
optionsServingOptionsBody?
orderByServingOrder[]?
segmentsstring[]?
StatusDescriptionBody
200OKServingQueryResponse
422Unprocessable EntityProblemDetails
429Too Many RequestsProblemDetails

Response 200: ServingQueryResponse

FieldTypeNotes
cacheServingCacheDto
columnsServingColumnDto[]
durationMsint64
releaseServingReleaseDto
rowsnone[][]
sqlstring?
truncatedboolean
trustServingTrustDto
warningsstring[]

ListServingEndpoints ​

http
GET /api/v1/workspaces/{workspaceId}/serving/endpoints

The workspace's serving endpoints with their usage in the last 7 days.

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes
StatusDescriptionBody
200OKServingEndpointDto[]

CreateServingEndpoint ​

http
POST /api/v1/workspaces/{workspaceId}/serving/endpoints

Publish a model (a pinned release or the latest) as a serving endpoint (Govern; audited).

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes

Request body (application/json): CreateServingEndpointRequest

FieldTypeNotes
settingsEndpointSettingsRequest
slugstring
StatusDescriptionBody
201CreatedCreatedResponse

Response 201: CreatedResponse

FieldTypeNotes
iduuid

GetServingEndpoint ​

http
GET /api/v1/workspaces/{workspaceId}/serving/endpoints/{endpointId}

One serving endpoint.

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes
endpointIdpathuuidyes
StatusDescriptionBody
200OKServingEndpointDto

Response 200: ServingEndpointDto

FieldTypeNotes
allowedApiKeyIdsuuid[]
allowedDimensionsstring[]
allowedMetricsstring[]
cacheTtlSecondsint32
createdAtdate-time
descriptionstring?
enabledboolean
exposeSqlboolean
iduuid
lastQueriedAtdate-time?
modelIduuid
namestring
ownerstring?
pathstring
queries7dint64
rateLimitPerMinuteint32
releaseIduuid?
slugstring
updatedAtdate-time?

UpdateServingEndpoint ​

http
PUT /api/v1/workspaces/{workspaceId}/serving/endpoints/{endpointId}

Replace an endpoint's settings (the slug never changes; Govern; audited).

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes
endpointIdpathuuidyes

Request body (application/json): EndpointSettingsRequest

FieldTypeNotes
allowedApiKeyIdsuuid[]?
allowedDimensionsstring[]?
allowedMetricsstring[]?
cacheTtlSecondsint32?
descriptionstring?
exposeSqlboolean?
modelIduuid
namestring
ownerstring?
rateLimitPerMinuteint32?
releaseIduuid?
StatusDescriptionBody
204No Content—

DeleteServingEndpoint ​

http
DELETE /api/v1/workspaces/{workspaceId}/serving/endpoints/{endpointId}

Delete an endpoint (soft, audited); its slug becomes free.

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes
endpointIdpathuuidyes
StatusDescriptionBody
204No Content—

DisableServingEndpoint ​

http
POST /api/v1/workspaces/{workspaceId}/serving/endpoints/{endpointId}:disable

Turn an endpoint off: queries get 403 Serving.EndpointDisabled (audited).

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes
endpointIdpathuuidyes
StatusDescriptionBody
204No Content—

EnableServingEndpoint ​

http
POST /api/v1/workspaces/{workspaceId}/serving/endpoints/{endpointId}:enable

Turn an endpoint on (audited).

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes
endpointIdpathuuidyes
StatusDescriptionBody
204No Content—

GetServingEndpointStats ​

http
GET /api/v1/workspaces/{workspaceId}/serving/endpoints/stats

Calls per day, p95 duration and error rate of each endpoint over the last 30 days (query-log metadata only).

ParameterInTypeRequiredNotes
workspaceIdpathuuidyes
StatusDescriptionBody
200OKServingEndpointStatsDto[]

Anchor Keel is a working product name: one platform, a shared core and licensed modules (Keel Semantic, Keel Migrate). Documentation built from the repository — facts are derived from code, ADRs and the decisions log.