List the records behind a dashboard element
curl --request POST \
--url https://api.sazabi.com/v1/dashboards/{id}/records \
--header 'Content-Type: application/json' \
--data '
{
"componentId": "<string>",
"selection": {
"category": "<string>",
"series": "<string>",
"rowId": "<string>",
"time": 4503599627370495
},
"revision": 0,
"timeRange": {
"kind": "absolute",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"componentTimeRanges": {},
"variables": {},
"limit": 100,
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.sazabi.com/v1/dashboards/{id}/records"
payload = {
"componentId": "<string>",
"selection": {
"category": "<string>",
"series": "<string>",
"rowId": "<string>",
"time": 4503599627370495
},
"revision": 0,
"timeRange": {
"kind": "absolute",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"componentTimeRanges": {},
"variables": {},
"limit": 100,
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
componentId: '<string>',
selection: {
category: '<string>',
series: '<string>',
rowId: '<string>',
time: 4503599627370495
},
revision: 0,
timeRange: {kind: 'absolute', from: '2023-11-07T05:31:56Z', to: '2023-11-07T05:31:56Z'},
componentTimeRanges: {},
variables: {},
limit: 100,
projectId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.sazabi.com/v1/dashboards/{id}/records', 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.sazabi.com/v1/dashboards/{id}/records",
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([
'componentId' => '<string>',
'selection' => [
'category' => '<string>',
'series' => '<string>',
'rowId' => '<string>',
'time' => 4503599627370495
],
'revision' => 0,
'timeRange' => [
'kind' => 'absolute',
'from' => '2023-11-07T05:31:56Z',
'to' => '2023-11-07T05:31:56Z'
],
'componentTimeRanges' => [
],
'variables' => [
],
'limit' => 100,
'projectId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.sazabi.com/v1/dashboards/{id}/records"
payload := strings.NewReader("{\n \"componentId\": \"<string>\",\n \"selection\": {\n \"category\": \"<string>\",\n \"series\": \"<string>\",\n \"rowId\": \"<string>\",\n \"time\": 4503599627370495\n },\n \"revision\": 0,\n \"timeRange\": {\n \"kind\": \"absolute\",\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n },\n \"componentTimeRanges\": {},\n \"variables\": {},\n \"limit\": 100,\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.sazabi.com/v1/dashboards/{id}/records")
.header("Content-Type", "application/json")
.body("{\n \"componentId\": \"<string>\",\n \"selection\": {\n \"category\": \"<string>\",\n \"series\": \"<string>\",\n \"rowId\": \"<string>\",\n \"time\": 4503599627370495\n },\n \"revision\": 0,\n \"timeRange\": {\n \"kind\": \"absolute\",\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n },\n \"componentTimeRanges\": {},\n \"variables\": {},\n \"limit\": 100,\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sazabi.com/v1/dashboards/{id}/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"componentId\": \"<string>\",\n \"selection\": {\n \"category\": \"<string>\",\n \"series\": \"<string>\",\n \"rowId\": \"<string>\",\n \"time\": 4503599627370495\n },\n \"revision\": 0,\n \"timeRange\": {\n \"kind\": \"absolute\",\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n },\n \"componentTimeRanges\": {},\n \"variables\": {},\n \"limit\": 100,\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"componentId": "<string>",
"matched": [
{
"field": "<string>",
"value": "<string>"
}
],
"records": [
{
"entity": {
"kind": "organization",
"id": "<string>"
},
"displayName": "<string>",
"timestamp": "<string>",
"fields": {}
}
],
"truncated": true
}Dashboards
List the records behind a dashboard element
Run the clicked component’s own query with a filter for the clicked value and return the matching records, bounded to 200 rows. The click names its dimension values as a chart selection (category, series) or a table row’s rowId; a selection that matches none of the component’s dimensions returns status “unmatched”.
POST
https://api.sazabi.com/v1
/
dashboards
/
{id}
/
records
List the records behind a dashboard element
curl --request POST \
--url https://api.sazabi.com/v1/dashboards/{id}/records \
--header 'Content-Type: application/json' \
--data '
{
"componentId": "<string>",
"selection": {
"category": "<string>",
"series": "<string>",
"rowId": "<string>",
"time": 4503599627370495
},
"revision": 0,
"timeRange": {
"kind": "absolute",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"componentTimeRanges": {},
"variables": {},
"limit": 100,
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.sazabi.com/v1/dashboards/{id}/records"
payload = {
"componentId": "<string>",
"selection": {
"category": "<string>",
"series": "<string>",
"rowId": "<string>",
"time": 4503599627370495
},
"revision": 0,
"timeRange": {
"kind": "absolute",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"componentTimeRanges": {},
"variables": {},
"limit": 100,
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
componentId: '<string>',
selection: {
category: '<string>',
series: '<string>',
rowId: '<string>',
time: 4503599627370495
},
revision: 0,
timeRange: {kind: 'absolute', from: '2023-11-07T05:31:56Z', to: '2023-11-07T05:31:56Z'},
componentTimeRanges: {},
variables: {},
limit: 100,
projectId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.sazabi.com/v1/dashboards/{id}/records', 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.sazabi.com/v1/dashboards/{id}/records",
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([
'componentId' => '<string>',
'selection' => [
'category' => '<string>',
'series' => '<string>',
'rowId' => '<string>',
'time' => 4503599627370495
],
'revision' => 0,
'timeRange' => [
'kind' => 'absolute',
'from' => '2023-11-07T05:31:56Z',
'to' => '2023-11-07T05:31:56Z'
],
'componentTimeRanges' => [
],
'variables' => [
],
'limit' => 100,
'projectId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.sazabi.com/v1/dashboards/{id}/records"
payload := strings.NewReader("{\n \"componentId\": \"<string>\",\n \"selection\": {\n \"category\": \"<string>\",\n \"series\": \"<string>\",\n \"rowId\": \"<string>\",\n \"time\": 4503599627370495\n },\n \"revision\": 0,\n \"timeRange\": {\n \"kind\": \"absolute\",\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n },\n \"componentTimeRanges\": {},\n \"variables\": {},\n \"limit\": 100,\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.sazabi.com/v1/dashboards/{id}/records")
.header("Content-Type", "application/json")
.body("{\n \"componentId\": \"<string>\",\n \"selection\": {\n \"category\": \"<string>\",\n \"series\": \"<string>\",\n \"rowId\": \"<string>\",\n \"time\": 4503599627370495\n },\n \"revision\": 0,\n \"timeRange\": {\n \"kind\": \"absolute\",\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n },\n \"componentTimeRanges\": {},\n \"variables\": {},\n \"limit\": 100,\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sazabi.com/v1/dashboards/{id}/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"componentId\": \"<string>\",\n \"selection\": {\n \"category\": \"<string>\",\n \"series\": \"<string>\",\n \"rowId\": \"<string>\",\n \"time\": 4503599627370495\n },\n \"revision\": 0,\n \"timeRange\": {\n \"kind\": \"absolute\",\n \"from\": \"2023-11-07T05:31:56Z\",\n \"to\": \"2023-11-07T05:31:56Z\"\n },\n \"componentTimeRanges\": {},\n \"variables\": {},\n \"limit\": 100,\n \"projectId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"status": "ok",
"componentId": "<string>",
"matched": [
{
"field": "<string>",
"value": "<string>"
}
],
"records": [
{
"entity": {
"kind": "organization",
"id": "<string>"
},
"displayName": "<string>",
"timestamp": "<string>",
"fields": {}
}
],
"truncated": true
}Body
application/json