curl --request GET \
--url https://api.cekura.ai/dashboards/widgets/{id}/ \
--header 'X-CEKURA-API-KEY: <api-key>'import requests
url = "https://api.cekura.ai/dashboards/widgets/{id}/"
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}/', 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}/",
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}/"
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}/")
.header("X-CEKURA-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/dashboards/widgets/{id}/")
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{
"chart_type": "line",
"id": 123,
"dashboard": 123,
"name": "<string>",
"filters": {
"field": "success",
"op": "eq",
"value": true
},
"effective_filters": {
"field": "success",
"op": "eq",
"value": true
},
"data_type": "numeric",
"field": "duration",
"metric": 123,
"metric_name": "<string>",
"time_period": "hour",
"aggregation_function": "count",
"group_by": "<unknown>",
"metadata": "<unknown>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Get Widget
Retrieve a dashboard widget by ID
curl --request GET \
--url https://api.cekura.ai/dashboards/widgets/{id}/ \
--header 'X-CEKURA-API-KEY: <api-key>'import requests
url = "https://api.cekura.ai/dashboards/widgets/{id}/"
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}/', 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}/",
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}/"
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}/")
.header("X-CEKURA-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/dashboards/widgets/{id}/")
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{
"chart_type": "line",
"id": 123,
"dashboard": 123,
"name": "<string>",
"filters": {
"field": "success",
"op": "eq",
"value": true
},
"effective_filters": {
"field": "success",
"op": "eq",
"value": true
},
"data_type": "numeric",
"field": "duration",
"metric": 123,
"metric_name": "<string>",
"time_period": "hour",
"aggregation_function": "count",
"group_by": "<unknown>",
"metadata": "<unknown>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Authorizations
API Key Authentication. It should be included in the header of each request.
Path Parameters
Response
Widget configuration. Key rules:
line/pie: setfieldonly (e.g."duration","call_ended_reason"). No aggregation needed.bar: setfield+aggregation_function(e.g."count") +time_period(e.g."day").stat: leavefieldempty — returns total_calls, success_rate, avg_duration, p95_latency.field = "metric_evaluations.value":metric(integer metric ID) is required. Get valid IDs fromGET /test_framework/v1/metrics?agent_id=<id>.effective_filters(read-only): merged dashboard + widget filters — useful for debugging.
Type of chart to display
line- Linebar- Barpie- Piestat- Stat
line, bar, pie, stat Dashboard this widget belongs to
Optional name/title for the widget
255Filter conditions to scope the data. See the Dashboards guide for supported fields, operators, and syntax.
Show child attributes
Show child attributes
{
"field": "success",
"op": "eq",
"value": true
}
{
"operator": "and",
"conditions": [
{
"field": "timestamp",
"op": "gte",
"value": "today-7d"
},
{
"field": "duration",
"op": "gte",
"value": 60
}
]
}
Merged filters from dashboard and widget (read-only). Can be used with the call logs API filters_v2 parameter.
Show child attributes
Show child attributes
{
"field": "success",
"op": "eq",
"value": true
}
{
"operator": "and",
"conditions": [
{
"field": "timestamp",
"op": "gte",
"value": "today-7d"
},
{
"field": "duration",
"op": "gte",
"value": 60
}
]
}
Data type of the field being plotted (optional, can be inferred)
numeric- Numericboolean- Booleanstring- Stringdatetime- DateTimedynamic- Dynamic
numeric, boolean, string, datetime, dynamic, , null Field name to plot. See the Dashboards guide for available fields, valid chart types, and aggregation combinations.
255"duration"
"success"
"call_ended_reason"
"metric_evaluations.value"
"metadata.region"
Metric to use when field is 'metric_evaluations.value'
Name of the metric (if metric is set)
Time period for aggregation (for bar charts)
hour- Hourday- Dayweek- Weekmonth- Month
hour, day, week, month, , null Aggregation function to apply (for bar charts)
count- Countsum- Sumavg- Averagemin- Minimummax- Maximump50- 50th Percentile (Median)p95- 95th Percentilep99- 99th Percentile
count, sum, avg, min, max, p50, p95, p99, , null Optional group-by configuration. Field group: {"type": "field", "field": "agent.id"}. Time bucket: {"type": "bucket", "interval": 3600000} (interval in milliseconds). Leave null or empty for no grouping.
Frontend metadata (e.g., position, size, styling)
When the widget was created
When the widget was last updated