Get dashboard widget data
curl --request GET \
--url https://app.azalt.co/api/v1/widgets/{id}/data \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.azalt.co/api/v1/widgets/{id}/data"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.azalt.co/api/v1/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://app.azalt.co/api/v1/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 => [
"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://app.azalt.co/api/v1/widgets/{id}/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://app.azalt.co/api/v1/widgets/{id}/data")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.azalt.co/api/v1/widgets/{id}/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{
"indicatorUnit": "<string>",
"values": [
"<unknown>"
],
"usedIndicators": [
{
"id": "<string>",
"name": "<string>",
"label": "<string>",
"unit": "<string>",
"preferredDatasetItemName": "<string>",
"preferredDatasetItemDatasetId": "<string>",
"expression": "<string>",
"expressionParts": [
"<unknown>"
],
"linkedItems": [
{
"id": "<string>",
"datasetId": "<string>",
"name": "<string>",
"year": 123,
"datasetName": "<string>",
"data": "<unknown>"
}
]
}
],
"mappingIssues": [
{
"indicatorChain": [
"<string>"
],
"year": 123,
"status": "<string>",
"count": 123,
"datasetId": "<string>",
"name": "<string>",
"field": "<string>",
"indicatorUnitSymbol": "<string>",
"inputUnitSymbol": "<string>",
"sourceYear": 123
}
],
"metadata": "<unknown>",
"componentSeries": {
"kind": "additive_kpi",
"components": [
{
"key": "<string>",
"indicatorId": "<string>",
"label": "<string>",
"unit": "<string>"
}
],
"values": [
{
"componentKey": "<string>",
"year": 123,
"periodUnit": 123,
"value": 123
}
]
},
"contributions": {
"site": [
{
"scopeId": "<string>",
"scopeName": "<string>",
"year": 123,
"periodUnit": 123,
"value": 123,
"basis": 123,
"shareOfOrganization": 123,
"shareOfVisible": 123,
"shareOfGroup": 123,
"coverageOfVisible": 123,
"numerator": 123,
"denominator": 123
}
],
"group": [
{
"scopeId": "<string>",
"scopeName": "<string>",
"year": 123,
"periodUnit": 123,
"value": 123,
"basis": 123,
"shareOfOrganization": 123,
"shareOfVisible": 123,
"shareOfGroup": 123,
"coverageOfVisible": 123,
"numerator": 123,
"denominator": 123
}
],
"global": [
{
"scopeId": "<string>",
"scopeName": "<string>",
"year": 123,
"periodUnit": 123,
"value": 123,
"basis": 123,
"shareOfOrganization": 123,
"shareOfVisible": 123,
"shareOfGroup": 123,
"coverageOfVisible": 123,
"numerator": 123,
"denominator": 123
}
]
},
"formElementValues": [
{
"formElementId": "<string>",
"year": 123,
"value": 123,
"periodUnit": 123
}
]
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Widget
Get dashboard widget data
Get calculated data for a dashboard widget:
Parameters:
id: Widget ID to get data for
Returns:
- Calculated values based on the widget’s environmental indicator
- Calculation metadata (time period, sites, aggregation method)
- Data quality information and any issues found
- Units and formatting details
Data structure varies by widget type (table, chart, gauge) but always includes the calculated environmental values with full context for analysis and display.
GET
/
widgets
/
{id}
/
data
Get dashboard widget data
curl --request GET \
--url https://app.azalt.co/api/v1/widgets/{id}/data \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.azalt.co/api/v1/widgets/{id}/data"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.azalt.co/api/v1/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://app.azalt.co/api/v1/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 => [
"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://app.azalt.co/api/v1/widgets/{id}/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://app.azalt.co/api/v1/widgets/{id}/data")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.azalt.co/api/v1/widgets/{id}/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{
"indicatorUnit": "<string>",
"values": [
"<unknown>"
],
"usedIndicators": [
{
"id": "<string>",
"name": "<string>",
"label": "<string>",
"unit": "<string>",
"preferredDatasetItemName": "<string>",
"preferredDatasetItemDatasetId": "<string>",
"expression": "<string>",
"expressionParts": [
"<unknown>"
],
"linkedItems": [
{
"id": "<string>",
"datasetId": "<string>",
"name": "<string>",
"year": 123,
"datasetName": "<string>",
"data": "<unknown>"
}
]
}
],
"mappingIssues": [
{
"indicatorChain": [
"<string>"
],
"year": 123,
"status": "<string>",
"count": 123,
"datasetId": "<string>",
"name": "<string>",
"field": "<string>",
"indicatorUnitSymbol": "<string>",
"inputUnitSymbol": "<string>",
"sourceYear": 123
}
],
"metadata": "<unknown>",
"componentSeries": {
"kind": "additive_kpi",
"components": [
{
"key": "<string>",
"indicatorId": "<string>",
"label": "<string>",
"unit": "<string>"
}
],
"values": [
{
"componentKey": "<string>",
"year": 123,
"periodUnit": 123,
"value": 123
}
]
},
"contributions": {
"site": [
{
"scopeId": "<string>",
"scopeName": "<string>",
"year": 123,
"periodUnit": 123,
"value": 123,
"basis": 123,
"shareOfOrganization": 123,
"shareOfVisible": 123,
"shareOfGroup": 123,
"coverageOfVisible": 123,
"numerator": 123,
"denominator": 123
}
],
"group": [
{
"scopeId": "<string>",
"scopeName": "<string>",
"year": 123,
"periodUnit": 123,
"value": 123,
"basis": 123,
"shareOfOrganization": 123,
"shareOfVisible": 123,
"shareOfGroup": 123,
"coverageOfVisible": 123,
"numerator": 123,
"denominator": 123
}
],
"global": [
{
"scopeId": "<string>",
"scopeName": "<string>",
"year": 123,
"periodUnit": 123,
"value": 123,
"basis": 123,
"shareOfOrganization": 123,
"shareOfVisible": 123,
"shareOfGroup": 123,
"coverageOfVisible": 123,
"numerator": 123,
"denominator": 123
}
]
},
"formElementValues": [
{
"formElementId": "<string>",
"year": 123,
"value": 123,
"periodUnit": 123
}
]
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful response
⌘I

