Skip to content

Commit

Permalink
use hidden tag on query endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
david-crespo committed Nov 13, 2024
1 parent 636151e commit f3e8e0c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nexus/external-api/output/nexus_tags.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ probe_create POST /experimental/v1/probes
probe_delete DELETE /experimental/v1/probes/{probe}
probe_list GET /experimental/v1/probes
probe_view GET /experimental/v1/probes/{probe}
timeseries_query POST /v1/timeseries/query

API operations found with tag "images"
OPERATION ID METHOD URL PATH
Expand Down Expand Up @@ -73,7 +74,6 @@ login_saml POST /login/{silo_name}/saml/{provi
API operations found with tag "metrics"
OPERATION ID METHOD URL PATH
silo_metric GET /v1/metrics/{metric_name}
timeseries_query POST /v1/timeseries/query

API operations found with tag "policy"
OPERATION ID METHOD URL PATH
Expand Down
6 changes: 5 additions & 1 deletion nexus/external-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2567,6 +2567,10 @@ pub trait NexusExternalApi {
body: TypedBody<params::TimeseriesQuery>,
) -> Result<HttpResponseOk<views::OxqlQueryResult>, HttpError>;

// TODO: list endpoint for project-scoped schemas is blocked on
// https://github.com/oxidecomputer/omicron/issues/5942: the authz scope for
// each schema is not stored in Clickhouse yet.

/// Run project-scoped timeseries query
///
/// Queries are written in OxQL. Project must be specified by name or ID in
Expand All @@ -2575,7 +2579,7 @@ pub trait NexusExternalApi {
#[endpoint {
method = POST,
path = "/v1/timeseries/query",
tags = ["metrics"],
tags = ["hidden"],
}]
async fn timeseries_query(
rqctx: RequestContext<Self::Context>,
Expand Down
2 changes: 1 addition & 1 deletion openapi/nexus.json
Original file line number Diff line number Diff line change
Expand Up @@ -8893,7 +8893,7 @@
"/v1/timeseries/query": {
"post": {
"tags": [
"metrics"
"hidden"
],
"summary": "Run project-scoped timeseries query",
"description": "Queries are written in OxQL. Project must be specified by name or ID in URL query parameter. The OxQL query will only return timeseries data from the specified project.",
Expand Down

0 comments on commit f3e8e0c

Please sign in to comment.