Refresh dashboard
curl --request POST \
--url https://api.sidenet.ai/v1/dashboards/{id}/refresh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filters": {
"range": {
"preset": "last_7_days"
},
"property": "BER"
},
"wait": true
}
'import requests
url = "https://api.sidenet.ai/v1/dashboards/{id}/refresh"
payload = {
"filters": {
"range": { "preset": "last_7_days" },
"property": "BER"
},
"wait": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({filters: {range: {preset: 'last_7_days'}, property: 'BER'}, wait: true})
};
fetch('https://api.sidenet.ai/v1/dashboards/{id}/refresh', 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.sidenet.ai/v1/dashboards/{id}/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'range' => [
'preset' => 'last_7_days'
],
'property' => 'BER'
],
'wait' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sidenet.ai/v1/dashboards/{id}/refresh"
payload := strings.NewReader("{\n \"filters\": {\n \"range\": {\n \"preset\": \"last_7_days\"\n },\n \"property\": \"BER\"\n },\n \"wait\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sidenet.ai/v1/dashboards/{id}/refresh")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"range\": {\n \"preset\": \"last_7_days\"\n },\n \"property\": \"BER\"\n },\n \"wait\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sidenet.ai/v1/dashboards/{id}/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"range\": {\n \"preset\": \"last_7_days\"\n },\n \"property\": \"BER\"\n },\n \"wait\": true\n}"
response = http.request(request)
puts response.read_body{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "succeeded",
"error": "<string>",
"data": {
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "running",
"started_at": "2023-11-07T05:31:56Z",
"refreshed_at": "2023-11-07T05:31:56Z",
"filters": {},
"panels": [
{
"id": "<string>",
"kind": "stats",
"title": "<string>",
"span": 123,
"height": "sm",
"component": {},
"markdown": "<string>"
}
],
"error": "<string>"
}
}{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "running",
"reused": true
}Dashboards
Refresh dashboard
Re-runs every data source of the dashboard (no model involved) with the given filter values — the last refresh’s when omitted — and stores the result. By default the call returns at once with 202 and the run id; poll GET /v1/dashboards/{id}/runs/{runId} (or listen for workflow.run.finished on GET /v1/events) and then read the dashboard again. wait: true answers once the refresh is over with the dashboard’s data. A refresh with the same filters started within the last seconds is reused rather than started again. A session token refreshes with its user’s credentials; an API key names the user with X-User-Id and may send runtimeAuth.
POST
/
v1
/
dashboards
/
{id}
/
refresh
Refresh dashboard
curl --request POST \
--url https://api.sidenet.ai/v1/dashboards/{id}/refresh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"filters": {
"range": {
"preset": "last_7_days"
},
"property": "BER"
},
"wait": true
}
'import requests
url = "https://api.sidenet.ai/v1/dashboards/{id}/refresh"
payload = {
"filters": {
"range": { "preset": "last_7_days" },
"property": "BER"
},
"wait": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({filters: {range: {preset: 'last_7_days'}, property: 'BER'}, wait: true})
};
fetch('https://api.sidenet.ai/v1/dashboards/{id}/refresh', 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.sidenet.ai/v1/dashboards/{id}/refresh",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'range' => [
'preset' => 'last_7_days'
],
'property' => 'BER'
],
'wait' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sidenet.ai/v1/dashboards/{id}/refresh"
payload := strings.NewReader("{\n \"filters\": {\n \"range\": {\n \"preset\": \"last_7_days\"\n },\n \"property\": \"BER\"\n },\n \"wait\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sidenet.ai/v1/dashboards/{id}/refresh")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"range\": {\n \"preset\": \"last_7_days\"\n },\n \"property\": \"BER\"\n },\n \"wait\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sidenet.ai/v1/dashboards/{id}/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"range\": {\n \"preset\": \"last_7_days\"\n },\n \"property\": \"BER\"\n },\n \"wait\": true\n}"
response = http.request(request)
puts response.read_body{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "succeeded",
"error": "<string>",
"data": {
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "running",
"started_at": "2023-11-07T05:31:56Z",
"refreshed_at": "2023-11-07T05:31:56Z",
"filters": {},
"panels": [
{
"id": "<string>",
"kind": "stats",
"title": "<string>",
"span": 123,
"height": "sm",
"component": {},
"markdown": "<string>"
}
],
"error": "<string>"
}
}{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "running",
"reused": true
}Authorizations
bearerAuthsessionToken
Organization API key, generated in studio.sidenet.ai. Backend only — never in a browser.
Path Parameters
Body
application/json