curl --request POST \
--url https://api.sidenet.ai/v1/dashboards/{id}/activate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"version_number": 2
}
'import requests
url = "https://api.sidenet.ai/v1/dashboards/{id}/activate"
payload = { "version_number": 2 }
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({version_number: 2})
};
fetch('https://api.sidenet.ai/v1/dashboards/{id}/activate', 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}/activate",
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([
'version_number' => 2
]),
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}/activate"
payload := strings.NewReader("{\n \"version_number\": 2\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}/activate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"version_number\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sidenet.ai/v1/dashboards/{id}/activate")
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 \"version_number\": 2\n}"
response = http.request(request)
puts response.read_body{
"dashboard": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"timezone": "<string>",
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"active_version": {
"id": "<string>",
"number": 123,
"created_at": "<string>"
},
"last_run_id": "<string>",
"last_refreshed_at": "<string>",
"last_refresh_status": "<string>",
"data_changed_at": "<string>",
"icon": "📊",
"pin_position": 0,
"refresh_schedule_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"version": {
"id": "<string>",
"number": 123,
"created_at": "<string>"
},
"spec": {},
"filters": {
"schema": [
{}
],
"values": {}
},
"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>"
}
],
"insights": [
{}
],
"error": "<string>"
}
}Activate dashboard version
Makes an earlier published version the one the dashboard shows (undo a change the chat made), then starts a refresh of it in the background. Returns the dashboard.
curl --request POST \
--url https://api.sidenet.ai/v1/dashboards/{id}/activate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"version_number": 2
}
'import requests
url = "https://api.sidenet.ai/v1/dashboards/{id}/activate"
payload = { "version_number": 2 }
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({version_number: 2})
};
fetch('https://api.sidenet.ai/v1/dashboards/{id}/activate', 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}/activate",
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([
'version_number' => 2
]),
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}/activate"
payload := strings.NewReader("{\n \"version_number\": 2\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}/activate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"version_number\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sidenet.ai/v1/dashboards/{id}/activate")
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 \"version_number\": 2\n}"
response = http.request(request)
puts response.read_body{
"dashboard": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"timezone": "<string>",
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"active_version": {
"id": "<string>",
"number": 123,
"created_at": "<string>"
},
"last_run_id": "<string>",
"last_refreshed_at": "<string>",
"last_refresh_status": "<string>",
"data_changed_at": "<string>",
"icon": "📊",
"pin_position": 0,
"refresh_schedule_id": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
},
"version": {
"id": "<string>",
"number": 123,
"created_at": "<string>"
},
"spec": {},
"filters": {
"schema": [
{}
],
"values": {}
},
"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>"
}
],
"insights": [
{}
],
"error": "<string>"
}
}Authorizations
Response
The dashboard
The version's spec: filters, sources, panels (layout: span, height, order; triggers: a stats panel's on_click, a table's row_key, cell_triggers (by column key: the cell value is a link), on_row_click, row_actions), views (what a trigger opens: kind table | stats | chart | … | form | thread | composite, title, presentation drawer | modal, context keys; a form view carries tool, fields, initial, submit_label, on_success, confirm and schema — the JSON Schema of its fields; a composite view carries blocks — data blocks of any component kind, text blocks, at most one form block with its schema — and optional tabs / default_tab), actions (toolbar buttons), tab_groups (layout only: { id, tabs: [{ id, label }], default?, strip?: card | page | none }; a panel with tab: { group, id } shows only while that tab is open) and insights ({ id, scope: { page: true } | { tab: { group, id } } | { panel }, sources, prompt }: the assistant's readings of the data, one model call each per refresh, answered under the data's insights). A trigger is { view, context } or { tab: { group, id } } (select a tab instead of opening a view); context values that are templates ("{{row.id}}", "{{row}}", "{{stat.key}}", "{{stat.value}}", "{{filters.}}") are resolved by the page before it calls the view.