dashboards
Get a dashboard by slug
GET
/
api
/
v1
/
dashboards
/
by-slug
/
{slug}
Get a dashboard by slug
curl --request GET \
--url https://api.example.com/api/v1/dashboards/by-slug/{slug} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/dashboards/by-slug/{slug}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/dashboards/by-slug/{slug}', 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.example.com/api/v1/dashboards/by-slug/{slug}",
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.example.com/api/v1/dashboards/by-slug/{slug}"
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.example.com/api/v1/dashboards/by-slug/{slug}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/dashboards/by-slug/{slug}")
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{
"id": "<string>",
"title": "<string>",
"description": "<string>",
"slug": "<string>",
"columns": 123,
"version": 123,
"components": [
{
"id": "<string>",
"position": {
"row": 0,
"col": 0,
"width": 6,
"height": 4
},
"chart": {
"chart_id": "<string>",
"title_override": "<string>",
"refresh_interval_override": 123
},
"key_value": {
"id": "<string>",
"label": "<string>",
"value": 123,
"unit": "<string>",
"description": "<string>",
"trend": {
"value": 123,
"is_percentage": true,
"label": "<string>"
},
"source_query": "<string>",
"refresh_interval": 123
},
"table": {
"id": "<string>",
"title": "<string>",
"description": "<string>",
"source_query": "<string>",
"columns": [
{
"key": "<string>",
"label": "<string>",
"sortable": true,
"filterable": true,
"width": 123,
"format": "<string>"
}
],
"default_page_size": 123,
"default_sort_field": "<string>",
"searchable": true,
"refresh_interval": 123
}
}
],
"permissions": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"agent_id": 123
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
Full dashboard returned by the API.
Available options:
draft, published, archived Available options:
private, organization, public Show child attributes
Show child attributes
Related topics
Get published dashboard by slug (public access)Get a dashboard by IDGet agent linked to dashboardList dashboardsCreate a dashboard⌘I
Get a dashboard by slug
curl --request GET \
--url https://api.example.com/api/v1/dashboards/by-slug/{slug} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/dashboards/by-slug/{slug}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/dashboards/by-slug/{slug}', 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.example.com/api/v1/dashboards/by-slug/{slug}",
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.example.com/api/v1/dashboards/by-slug/{slug}"
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.example.com/api/v1/dashboards/by-slug/{slug}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/dashboards/by-slug/{slug}")
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{
"id": "<string>",
"title": "<string>",
"description": "<string>",
"slug": "<string>",
"columns": 123,
"version": 123,
"components": [
{
"id": "<string>",
"position": {
"row": 0,
"col": 0,
"width": 6,
"height": 4
},
"chart": {
"chart_id": "<string>",
"title_override": "<string>",
"refresh_interval_override": 123
},
"key_value": {
"id": "<string>",
"label": "<string>",
"value": 123,
"unit": "<string>",
"description": "<string>",
"trend": {
"value": 123,
"is_percentage": true,
"label": "<string>"
},
"source_query": "<string>",
"refresh_interval": 123
},
"table": {
"id": "<string>",
"title": "<string>",
"description": "<string>",
"source_query": "<string>",
"columns": [
{
"key": "<string>",
"label": "<string>",
"sortable": true,
"filterable": true,
"width": 123,
"format": "<string>"
}
],
"default_page_size": 123,
"default_sort_field": "<string>",
"searchable": true,
"refresh_interval": 123
}
}
],
"permissions": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"agent_id": 123
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}