Query scalar data across multiple products
POST {{baseUrl}}/api/v2/query/scalar
Query scalar values (as seen on Query Value, Table, and Toplist widgets). Multiple data sources are supported with the ability to process the data using formulas and functions.
Request Body
{"data"=>{"type"=>"scalar_request", "attributes"=>{"to"=>"<long>", "from"=>"<long>", "queries"=>[{"data_source"=>"metrics", "query"=>"<string>", "aggregator"=>"avg", "name"=>"<string>"}, {"data_source"=>"metrics", "query"=>"<string>", "aggregator"=>"avg", "name"=>"<string>"}], "formulas"=>[{"formula"=>"<string>", "limit"=>{"count"=>"<integer>", "order"=>"desc"}}, {"formula"=>"<string>", "limit"=>{"count"=>"<integer>", "order"=>"desc"}}]}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"data":{"attributes":{"columns":[{"name":"\u003cstring\u003e","type":"\u003cstring\u003e","values":[["\u003cstring\u003e","\u003cstring\u003e"],["\u003cstring\u003e","\u003cstring\u003e"]]},{"name":"\u003cstring\u003e","type":"\u003cstring\u003e","values":[["\u003cstring\u003e","\u003cstring\u003e"],["\u003cstring\u003e","\u003cstring\u003e"]]}]},"type":"scalar_response"},"errors":"\u003cstring\u003e"}