curl --request GET \
--url https://api.duvo.ai/v2/automations/{automation_id}/dashboard-data \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.duvo.ai/v2/automations/{automation_id}/dashboard-data"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.duvo.ai/v2/automations/{automation_id}/dashboard-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.duvo.ai/v2/automations/{automation_id}/dashboard-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 => [
"Authorization: Bearer <token>"
],
]);
$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.duvo.ai/v2/automations/{automation_id}/dashboard-data"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.duvo.ai/v2/automations/{automation_id}/dashboard-data")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/automations/{automation_id}/dashboard-data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"dashboards": [
{
"status": "ok",
"dashboard": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"link": "<string>",
"url": "<string>"
},
"metrics": [
{
"key": "<string>",
"label": "<string>",
"value": 123,
"unit": "<string>",
"display": "<string>",
"description": "<string>",
"note": "<string>"
}
],
"range": {
"key": "<string>",
"label": "<string>",
"from": "<string>",
"to": "<string>",
"time_zone": "<string>"
},
"as_of": "<string>",
"note": "<string>"
}
],
"hint": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Read Automation Dashboard Data
The figures a Module automation’s Pulse dashboards show, computed server-side the same way the dashboard computes them: each tile’s label, value, unit and display (the value as the dashboard prints it), with a description where the label alone leaves the figure unclear and a note for what the tile shows besides it. Call this for any number on a Module dashboard instead of reading the dashboard’s HTML (getPulseDashboardHtml refuses Module dashboards for size) or paging through Cases: a recount can disagree with the tile the user sees. Pass dashboard_id for one dashboard, or leave it out for every dashboard of the automation the caller may open. range applies to dashboards with a time range control; the result names the range it read. Pass time_zone with the user’s IANA zone so a day starts at their midnight, as their dashboard’s do; without it days start at midnight UTC, and range.time_zone says which zone was used. Quote display, say the period it covers, and name and link the dashboard with its link. A dashboard whose figures are not declared, or that was changed since it was installed, comes back unsupported; one that could not be read comes back error; both carry a hint. Needs Queues on the team’s plan. Each link is a path in the Duvo web app; give the user the full URL beside it (url).
curl --request GET \
--url https://api.duvo.ai/v2/automations/{automation_id}/dashboard-data \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.duvo.ai/v2/automations/{automation_id}/dashboard-data"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.duvo.ai/v2/automations/{automation_id}/dashboard-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.duvo.ai/v2/automations/{automation_id}/dashboard-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 => [
"Authorization: Bearer <token>"
],
]);
$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.duvo.ai/v2/automations/{automation_id}/dashboard-data"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.duvo.ai/v2/automations/{automation_id}/dashboard-data")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/automations/{automation_id}/dashboard-data")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"dashboards": [
{
"status": "ok",
"dashboard": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"link": "<string>",
"url": "<string>"
},
"metrics": [
{
"key": "<string>",
"label": "<string>",
"value": 123,
"unit": "<string>",
"display": "<string>",
"description": "<string>",
"note": "<string>"
}
],
"range": {
"key": "<string>",
"label": "<string>",
"from": "<string>",
"to": "<string>",
"time_zone": "<string>"
},
"as_of": "<string>",
"note": "<string>"
}
],
"hint": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
API key authentication. Get your API key from the Duvo dashboard.
Path Parameters
Automation ID
Query Parameters
One of the automation's Module dashboards; leave out to read every one
today, yesterday, week, month, ytd or all, for dashboards with a time range control; leave out for the range the dashboard opens on
today, yesterday, week, month, ytd, all IANA zone the range's days start in, such as Europe/Prague. Pass the user's own zone so Today matches their dashboard; UTC when left out
Was this page helpful?