curl --request POST \
--url https://api.select.dev/v2/metrics/action-realized-savings/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"measures": [
{
"aggregate_function": "array_unique_agg",
"dimension": {
"path": [
"<string>"
]
}
}
],
"dimensions": [
{
"path": [
"<string>"
]
}
],
"filter_expression": {
"filters": [
{
"field": {
"path": [
"<string>"
]
},
"value": 123,
"not": false
}
],
"component_type": "Resource Filter"
},
"measure_filters": [
{
"values": [
123
],
"not": false
}
],
"sort": [
{
"field": {
"path": [
"<string>"
]
},
"column_key": "<string>"
}
],
"limit": 1000,
"return_sql": false
}
'import requests
url = "https://api.select.dev/v2/metrics/action-realized-savings/query"
payload = {
"measures": [
{
"aggregate_function": "array_unique_agg",
"dimension": { "path": ["<string>"] }
}
],
"dimensions": [{ "path": ["<string>"] }],
"filter_expression": {
"filters": [
{
"field": { "path": ["<string>"] },
"value": 123,
"not": False
}
],
"component_type": "Resource Filter"
},
"measure_filters": [
{
"values": [123],
"not": False
}
],
"sort": [
{
"field": { "path": ["<string>"] },
"column_key": "<string>"
}
],
"limit": 1000,
"return_sql": False
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
measures: [{aggregate_function: 'array_unique_agg', dimension: {path: ['<string>']}}],
dimensions: [{path: ['<string>']}],
filter_expression: {
filters: [{field: {path: ['<string>']}, value: 123, not: false}],
component_type: 'Resource Filter'
},
measure_filters: [{values: [123], not: false}],
sort: [{field: {path: ['<string>']}, column_key: '<string>'}],
limit: 1000,
return_sql: false
})
};
fetch('https://api.select.dev/v2/metrics/action-realized-savings/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.select.dev/v2/metrics/action-realized-savings/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'measures' => [
[
'aggregate_function' => 'array_unique_agg',
'dimension' => [
'path' => [
'<string>'
]
]
]
],
'dimensions' => [
[
'path' => [
'<string>'
]
]
],
'filter_expression' => [
'filters' => [
[
'field' => [
'path' => [
'<string>'
]
],
'value' => 123,
'not' => false
]
],
'component_type' => 'Resource Filter'
],
'measure_filters' => [
[
'values' => [
123
],
'not' => false
]
],
'sort' => [
[
'field' => [
'path' => [
'<string>'
]
],
'column_key' => '<string>'
]
],
'limit' => 1000,
'return_sql' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.select.dev/v2/metrics/action-realized-savings/query"
payload := strings.NewReader("{\n \"measures\": [\n {\n \"aggregate_function\": \"array_unique_agg\",\n \"dimension\": {\n \"path\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"dimensions\": [\n {\n \"path\": [\n \"<string>\"\n ]\n }\n ],\n \"filter_expression\": {\n \"filters\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"value\": 123,\n \"not\": false\n }\n ],\n \"component_type\": \"Resource Filter\"\n },\n \"measure_filters\": [\n {\n \"values\": [\n 123\n ],\n \"not\": false\n }\n ],\n \"sort\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"column_key\": \"<string>\"\n }\n ],\n \"limit\": 1000,\n \"return_sql\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.select.dev/v2/metrics/action-realized-savings/query")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"measures\": [\n {\n \"aggregate_function\": \"array_unique_agg\",\n \"dimension\": {\n \"path\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"dimensions\": [\n {\n \"path\": [\n \"<string>\"\n ]\n }\n ],\n \"filter_expression\": {\n \"filters\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"value\": 123,\n \"not\": false\n }\n ],\n \"component_type\": \"Resource Filter\"\n },\n \"measure_filters\": [\n {\n \"values\": [\n 123\n ],\n \"not\": false\n }\n ],\n \"sort\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"column_key\": \"<string>\"\n }\n ],\n \"limit\": 1000,\n \"return_sql\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/metrics/action-realized-savings/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"measures\": [\n {\n \"aggregate_function\": \"array_unique_agg\",\n \"dimension\": {\n \"path\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"dimensions\": [\n {\n \"path\": [\n \"<string>\"\n ]\n }\n ],\n \"filter_expression\": {\n \"filters\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"value\": 123,\n \"not\": false\n }\n ],\n \"component_type\": \"Resource Filter\"\n },\n \"measure_filters\": [\n {\n \"values\": [\n 123\n ],\n \"not\": false\n }\n ],\n \"sort\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"column_key\": \"<string>\"\n }\n ],\n \"limit\": 1000,\n \"return_sql\": false\n}"
response = http.request(request)
puts response.read_body{
"items": [
{}
],
"page_token": "<string>",
"row_count": 123,
"sql": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Query realized action savings
Returns one row per combination of the requested dimensions, carrying the requested measures. Each row is keyed by dimension and measure name. row_count is the number of rows in items: results are not paginated, so an aggregation with more rows than limit is cut short at limit rather than continued under a page_token. Set return_sql to see the SQL the rows came from.
curl --request POST \
--url https://api.select.dev/v2/metrics/action-realized-savings/query \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"measures": [
{
"aggregate_function": "array_unique_agg",
"dimension": {
"path": [
"<string>"
]
}
}
],
"dimensions": [
{
"path": [
"<string>"
]
}
],
"filter_expression": {
"filters": [
{
"field": {
"path": [
"<string>"
]
},
"value": 123,
"not": false
}
],
"component_type": "Resource Filter"
},
"measure_filters": [
{
"values": [
123
],
"not": false
}
],
"sort": [
{
"field": {
"path": [
"<string>"
]
},
"column_key": "<string>"
}
],
"limit": 1000,
"return_sql": false
}
'import requests
url = "https://api.select.dev/v2/metrics/action-realized-savings/query"
payload = {
"measures": [
{
"aggregate_function": "array_unique_agg",
"dimension": { "path": ["<string>"] }
}
],
"dimensions": [{ "path": ["<string>"] }],
"filter_expression": {
"filters": [
{
"field": { "path": ["<string>"] },
"value": 123,
"not": False
}
],
"component_type": "Resource Filter"
},
"measure_filters": [
{
"values": [123],
"not": False
}
],
"sort": [
{
"field": { "path": ["<string>"] },
"column_key": "<string>"
}
],
"limit": 1000,
"return_sql": False
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
measures: [{aggregate_function: 'array_unique_agg', dimension: {path: ['<string>']}}],
dimensions: [{path: ['<string>']}],
filter_expression: {
filters: [{field: {path: ['<string>']}, value: 123, not: false}],
component_type: 'Resource Filter'
},
measure_filters: [{values: [123], not: false}],
sort: [{field: {path: ['<string>']}, column_key: '<string>'}],
limit: 1000,
return_sql: false
})
};
fetch('https://api.select.dev/v2/metrics/action-realized-savings/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.select.dev/v2/metrics/action-realized-savings/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'measures' => [
[
'aggregate_function' => 'array_unique_agg',
'dimension' => [
'path' => [
'<string>'
]
]
]
],
'dimensions' => [
[
'path' => [
'<string>'
]
]
],
'filter_expression' => [
'filters' => [
[
'field' => [
'path' => [
'<string>'
]
],
'value' => 123,
'not' => false
]
],
'component_type' => 'Resource Filter'
],
'measure_filters' => [
[
'values' => [
123
],
'not' => false
]
],
'sort' => [
[
'field' => [
'path' => [
'<string>'
]
],
'column_key' => '<string>'
]
],
'limit' => 1000,
'return_sql' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.select.dev/v2/metrics/action-realized-savings/query"
payload := strings.NewReader("{\n \"measures\": [\n {\n \"aggregate_function\": \"array_unique_agg\",\n \"dimension\": {\n \"path\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"dimensions\": [\n {\n \"path\": [\n \"<string>\"\n ]\n }\n ],\n \"filter_expression\": {\n \"filters\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"value\": 123,\n \"not\": false\n }\n ],\n \"component_type\": \"Resource Filter\"\n },\n \"measure_filters\": [\n {\n \"values\": [\n 123\n ],\n \"not\": false\n }\n ],\n \"sort\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"column_key\": \"<string>\"\n }\n ],\n \"limit\": 1000,\n \"return_sql\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.select.dev/v2/metrics/action-realized-savings/query")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"measures\": [\n {\n \"aggregate_function\": \"array_unique_agg\",\n \"dimension\": {\n \"path\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"dimensions\": [\n {\n \"path\": [\n \"<string>\"\n ]\n }\n ],\n \"filter_expression\": {\n \"filters\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"value\": 123,\n \"not\": false\n }\n ],\n \"component_type\": \"Resource Filter\"\n },\n \"measure_filters\": [\n {\n \"values\": [\n 123\n ],\n \"not\": false\n }\n ],\n \"sort\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"column_key\": \"<string>\"\n }\n ],\n \"limit\": 1000,\n \"return_sql\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/metrics/action-realized-savings/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"measures\": [\n {\n \"aggregate_function\": \"array_unique_agg\",\n \"dimension\": {\n \"path\": [\n \"<string>\"\n ]\n }\n }\n ],\n \"dimensions\": [\n {\n \"path\": [\n \"<string>\"\n ]\n }\n ],\n \"filter_expression\": {\n \"filters\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"value\": 123,\n \"not\": false\n }\n ],\n \"component_type\": \"Resource Filter\"\n },\n \"measure_filters\": [\n {\n \"values\": [\n 123\n ],\n \"not\": false\n }\n ],\n \"sort\": [\n {\n \"field\": {\n \"path\": [\n \"<string>\"\n ]\n },\n \"column_key\": \"<string>\"\n }\n ],\n \"limit\": 1000,\n \"return_sql\": false\n}"
response = http.request(request)
puts response.read_body{
"items": [
{}
],
"page_token": "<string>",
"row_count": 123,
"sql": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Authorizations
Organization API key (sl_…).
Headers
The organization ID the request is scoped to.
Body
Aggregate the savings actions have realized, day by day.
Rows are already scoped to the teams the caller may see. To narrow further to
specific teams, filter on the team_id dimension.
Aggregates to compute over the matching rows.
Show child attributes
Show child attributes
Columns to group the aggregates by. Each is returned on every row.
Show child attributes
Show child attributes
An and/or tree of predicates over dimensions, applied before aggregation. Omit to match every row the caller can see.
Show child attributes
Show child attributes
Predicates over measures, applied after aggregation.
- InFilter[DailyActionSavingsMeasures]
- ArrayContainsFilter[DailyActionSavingsMeasures]
- IsFilter[DailyActionSavingsMeasures]
- LikeFilter[DailyActionSavingsMeasures]
- MultiLikeFilter[DailyActionSavingsMeasures]
- EqFilter[DailyActionSavingsMeasures]
- FilterExpression[DailyActionSavingsMeasures]
- InRelativeDateRangeFilter[DailyActionSavingsMeasures]
Show child attributes
Show child attributes
Ordering applied to the aggregated rows.
Show child attributes
Show child attributes
Maximum rows to return, at most 10000. An aggregation that produces more rows than this is silently cut short at the limit, so narrow the filters or group by fewer dimensions rather than raising it to see everything.
1 <= x <= 10000Return the SQL that produced the rows alongside them, for inspecting how a result was computed. Not every query endpoint publishes its SQL; where it does not, the field stays null.
Response
Successful Response
Opaque cursor for the next page; empty/absent on the last page.
Best-effort total for the filtered result set; may be null when expensive.
The SQL that produced these rows, returned only when the request asks for it. Database and schema names are left as placeholders. Null when the request did not ask for it, or when this endpoint does not publish its SQL.

