Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix: add missing query params for gateway apis (#10190)

Karan Balanic7b9c0d36c2a
diff --git a/docs/api/openapi.yml b/docs/api/openapi.yml
index 78c9c8b829..099c56ab23 100644
--- a/docs/api/openapi.yml
+++ b/docs/api/openapi.yml
@@ -2285,6 +2285,15 @@ paths:
deprecated: false
description: This endpoint returns the ingestion keys for a workspace
operationId: GetIngestionKeys
+ parameters:
+ - in: query
+ name: page
+ schema:
+ type: integer
+ - in: query
+ name: per_page
+ schema:
+ type: integer
responses:
"200":
content:
@@ -2597,6 +2606,19 @@ paths:
deprecated: false
description: This endpoint returns the ingestion keys for a workspace
operationId: SearchIngestionKeys
+ parameters:
+ - in: query
+ name: name
+ schema:
+ type: string
+ - in: query
+ name: page
+ schema:
+ type: integer
+ - in: query
+ name: per_page
+ schema:
+ type: integer
responses:
"200":
content:
diff --git a/pkg/apiserver/signozapiserver/gateway.go b/pkg/apiserver/signozapiserver/gateway.go
index 197bbe635d..2f746beb96 100644
--- a/pkg/apiserver/signozapiserver/gateway.go
+++ b/pkg/apiserver/signozapiserver/gateway.go
@@ -16,6 +16,7 @@ func (provider *provider) addGatewayRoutes(router *mux.Router) error {
Summary: "Get ingestion keys for workspace",
Description: "This endpoint returns the ingestion keys for a workspace",
Request: nil,
+ RequestQuery: new(gatewaytypes.IngestionKeysParams),
RequestContentType: "",
Response: new(gatewaytypes.GettableIngestionKeys),
ResponseContentType: "application/json",
@@ -33,6 +34,7 @@ func (provider *provider) addGatewayRoutes(router *mux.Router) error {
Summary: "Search ingestion keys for workspace",
Description: "This endpoint returns the ingestion keys for a workspace",
Request: nil,
+ RequestQuery: new(gatewaytypes.SearchIngestionKeysParams),
RequestContentType: "",
Response: new(gatewaytypes.GettableIngestionKeys),
ResponseContentType: "application/json",
diff --git a/pkg/types/gatewaytypes/ingestionkey.go b/pkg/types/gatewaytypes/ingestionkey.go
index 170414e81b..2c6e0bbd2d 100644
--- a/pkg/types/gatewaytypes/ingestionkey.go
+++ b/pkg/types/gatewaytypes/ingestionkey.go
@@ -54,6 +54,17 @@ type Pagination struct {
Total int `json:"total"`
}
+type IngestionKeysParams struct {
+ Page int `query:"page"`
+ PerPage int `query:"per_page"`
+}
+
+type SearchIngestionKeysParams struct {
+ Name string `query:"name"`
+ Page int `query:"page"`
+ PerPage int `query:"per_page"`
+}
+
type GettableIngestionKeys struct {
Keys []IngestionKey `json:"keys"`
Pagination Pagination `json:"_pagination"`