Get widget chart data
curl --request GET \
--url https://api.cekura.ai/dashboards/widgets/{id}/data/ \
--header 'X-CEKURA-API-KEY: <api-key>'import requests
url = "https://api.cekura.ai/dashboards/widgets/{id}/data/"
headers = {"X-CEKURA-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-CEKURA-API-KEY': '<api-key>'}};
fetch('https://api.cekura.ai/dashboards/widgets/{id}/data/', 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.cekura.ai/dashboards/widgets/{id}/data/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-CEKURA-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cekura.ai/dashboards/widgets/{id}/data/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-CEKURA-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cekura.ai/dashboards/widgets/{id}/data/")
.header("X-CEKURA-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/dashboards/widgets/{id}/data/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"widget_id": 123,
"field_name": "<string>",
"chart_type": "<string>",
"data": [
{
"id": 1,
"timestamp": "2025-11-03T10:30:00Z",
"value": 45
},
{
"id": 2,
"timestamp": "2025-11-03T11:15:00Z",
"value": 62
}
],
"aggregation_function": "<string>",
"time_period": "<string>",
"group_by": null,
"metadata": {
"display_name": "<string>",
"data_type": "numeric",
"filter_value": "<unknown>"
},
"can_group_by": false
}Widgets
Get Widget Data
Get plot data for a widget.
GET
/
dashboards
/
widgets
/
{id}
/
data
/
Get widget chart data
curl --request GET \
--url https://api.cekura.ai/dashboards/widgets/{id}/data/ \
--header 'X-CEKURA-API-KEY: <api-key>'import requests
url = "https://api.cekura.ai/dashboards/widgets/{id}/data/"
headers = {"X-CEKURA-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-CEKURA-API-KEY': '<api-key>'}};
fetch('https://api.cekura.ai/dashboards/widgets/{id}/data/', 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.cekura.ai/dashboards/widgets/{id}/data/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-CEKURA-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cekura.ai/dashboards/widgets/{id}/data/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-CEKURA-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cekura.ai/dashboards/widgets/{id}/data/")
.header("X-CEKURA-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/dashboards/widgets/{id}/data/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"widget_id": 123,
"field_name": "<string>",
"chart_type": "<string>",
"data": [
{
"id": 1,
"timestamp": "2025-11-03T10:30:00Z",
"value": 45
},
{
"id": 2,
"timestamp": "2025-11-03T11:15:00Z",
"value": 62
}
],
"aggregation_function": "<string>",
"time_period": "<string>",
"group_by": null,
"metadata": {
"display_name": "<string>",
"data_type": "numeric",
"filter_value": "<unknown>"
},
"can_group_by": false
}Authorizations
api_keyoauth2embedded_sessionshareable_linksupabase_session
API Key Authentication. It should be included in the header of each request.
Path Parameters
Query Parameters
filter JSON object to override widget filters for this request. Must include a timestamp constraint. Example: {"operator": "and", "conditions": [{"field": "timestamp", "op": "gte", "value": "now-7d"}]}
Response
200 - application/json
Chart data. Format depends on chart_type:
Line chart: [{id, timestamp, value}, ...]
Bar chart: [{time_interval, value, sample_count}, ...]
Pie chart: [{label, value, percentage}, ...]
See the Dashboards guide for full examples.
Examples:
[ { "id": 1, "timestamp": "2025-11-03T10:30:00Z", "value": 45 }, { "id": 2, "timestamp": "2025-11-03T11:15:00Z", "value": 62 } ]
[ { "time_interval": "2025-11-03T00:00:00Z", "value": 4.5, "sample_count": 10 }, { "time_interval": "2025-11-04T00:00:00Z", "value": 3.2, "sample_count": 8 } ]
[ { "label": "customer_ended_call", "value": 320, "percentage": 45.7 }, { "label": "agent_ended_call", "value": 210, "percentage": 30 } ]
Additional metadata about the plotted data. See the Dashboards guide for details.
Show child attributes
Show child attributes