Force-refresh a widget’s data
/dashboard/{id}/widget/{key}/refresh
At most once every 15s per (widget, viewer) -- throttled otherwise.
Path Parameters
Resource id
Resource id
Query Parameters
Pass 1 to read the DRAFT (a manager previewing their edits). Requires edit access: 403 for anyone else. A dashboard with no draft answers the published one. Never cached.
1true
IANA time zone for date presets. An invalid zone falls back to UTC.
A dashboard filter value, once per value. A YYYY-MM-DD..YYYY-MM-DD range, a preset name or me for the caller. 400 filter_invalid on a bad value.
Response Body
metriccharttablemarkdown
okemptyno_accesssource_error
curl -X POST 'https://api.elaichi.ai/dashboard/<id>/widget/<key>/refresh' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json'const response = await fetch('https://api.elaichi.ai/dashboard/<id>/widget/<key>/refresh', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/dashboard/<id>/widget/<key>/refresh"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
response = requests.post(url, headers=headers)
print(response.json())