We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b07d561 commit 91c79ceCopy full SHA for 91c79ce
services/core/api/query.go
@@ -20,6 +20,7 @@ type RunQueryRequest struct {
20
AccountId *string `json:"account_id"`
21
SourceId *string `json:"source_id"`
22
ResultType *string `json:"result_type"`
23
+ Params map[string]string `json:"params"`
24
Engine *QueryEngine `json:"engine"`
25
Sorts []NamedQuerySortItem `json:"sorts"`
26
}
services/core/inventory-http_routes.go
@@ -421,6 +421,10 @@ func (h *HttpHandler) RunQuery(ctx echo.Context) error {
421
422
h.queryParamsMu.RUnlock()
423
424
+ for k, v := range req.Params {
425
+ queryParamMap[k] = v
426
+ }
427
+
428
queryTemplate, err := template.New("query").Parse(*req.Query)
429
if err != nil {
430
return err
0 commit comments