Get a dashboard view
curl --request GET \
--url https://api.upstackdata.com/accounts/api/dashboard/views/{dashboardViewId} \
--header 'x-api-key: <api-key>' \
--header 'x-pixel-id: <api-key>'import requests
url = "https://api.upstackdata.com/accounts/api/dashboard/views/{dashboardViewId}"
headers = {
"x-api-key": "<api-key>",
"x-pixel-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>', 'x-pixel-id': '<api-key>'}};
fetch('https://api.upstackdata.com/accounts/api/dashboard/views/{dashboardViewId}', 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.upstackdata.com/accounts/api/dashboard/views/{dashboardViewId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-pixel-id: <api-key>"
],
]);
$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.upstackdata.com/accounts/api/dashboard/views/{dashboardViewId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-pixel-id", "<api-key>")
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.upstackdata.com/accounts/api/dashboard/views/{dashboardViewId}")
.header("x-api-key", "<api-key>")
.header("x-pixel-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upstackdata.com/accounts/api/dashboard/views/{dashboardViewId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-pixel-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"dashboardView": {
"pk": "VIEW#01K7A2Q9X3M4N5P6R7S8T9V0WZ",
"sk": "view",
"id": "01K7A2Q9X3M4N5P6R7S8T9V0WZ",
"pixelId": "5f1e6a4f-2b7c-4d1e-9a3f-8c6b2e0d4a71",
"type": "view",
"name": "Summary",
"order": 0,
"configuration": {
"attributionModel": "first_click",
"attributionWindow": 30,
"granularity": "day",
"dateRange": {
"start": "2026-09-12",
"end": "2026-10-12"
},
"filters": {
"preset": "last30",
"isCompare": false
},
"grid": {
"maxWidth": 1200
},
"widgets": [
{
"id": "0c4e2a7b-91d3-4f5a-8b6c-2d7e9f1a3b5c",
"title": "NC ROAS",
"chartType": "sparkline",
"layout": {
"x": 0,
"y": 0,
"rows": 1,
"columns": 3,
"minColumns": 3,
"maxColumns": 3,
"minRows": 1,
"maxRows": 1,
"static": false
},
"dataConfig": {
"measures": [
"core.new_customer_roas"
],
"dimensions": [],
"filters": []
}
},
{
"id": "5f8a1c3e-7b2d-4e9f-a0b1-c2d3e4f5a6b7",
"title": "MER",
"chartType": "sparkline",
"layout": {
"x": 3,
"y": 0,
"rows": 1,
"columns": 3,
"minColumns": 3,
"maxColumns": 3,
"minRows": 1,
"maxRows": 1,
"static": false
},
"dataConfig": {
"measures": [
"core.mer"
],
"dimensions": [],
"filters": []
}
}
],
"sections": [
{
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"title": "Efficiency",
"ordinal": 0,
"collapsed": false,
"hidden": false,
"layoutMode": "auto",
"widgets": [
{
"id": "0c4e2a7b-91d3-4f5a-8b6c-2d7e9f1a3b5c",
"title": "NC ROAS",
"chartType": "sparkline",
"layout": {
"x": 0,
"y": 0,
"rows": 1,
"columns": 3,
"minColumns": 3,
"maxColumns": 3,
"minRows": 1,
"maxRows": 1,
"static": false
},
"dataConfig": {
"measures": [
"core.new_customer_roas"
],
"dimensions": [],
"filters": []
}
},
{
"id": "5f8a1c3e-7b2d-4e9f-a0b1-c2d3e4f5a6b7",
"title": "MER",
"chartType": "sparkline",
"layout": {
"x": 3,
"y": 0,
"rows": 1,
"columns": 3,
"minColumns": 3,
"maxColumns": 3,
"minRows": 1,
"maxRows": 1,
"static": false
},
"dataConfig": {
"measures": [
"core.mer"
],
"dimensions": [],
"filters": []
}
}
]
}
]
},
"createdAt": "2026-05-04T09:12:44.020Z",
"createdBy": "7d2c9a10-5b3e-4f61-8a27-c4e9b1d0f3a6",
"updatedAt": "2026-10-01T18:30:02.917Z",
"updatedBy": "7d2c9a10-5b3e-4f61-8a27-c4e9b1d0f3a6"
}
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}DASHBOARDS
Get a dashboard view and its widget configuration
Fetch one dashboard view with its full configuration, including sections, widget layout, measures, and the saved date range and attribution settings.
GET
/
accounts
/
api
/
dashboard
/
views
/
{dashboardViewId}
Get a dashboard view
curl --request GET \
--url https://api.upstackdata.com/accounts/api/dashboard/views/{dashboardViewId} \
--header 'x-api-key: <api-key>' \
--header 'x-pixel-id: <api-key>'import requests
url = "https://api.upstackdata.com/accounts/api/dashboard/views/{dashboardViewId}"
headers = {
"x-api-key": "<api-key>",
"x-pixel-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>', 'x-pixel-id': '<api-key>'}};
fetch('https://api.upstackdata.com/accounts/api/dashboard/views/{dashboardViewId}', 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.upstackdata.com/accounts/api/dashboard/views/{dashboardViewId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-pixel-id: <api-key>"
],
]);
$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.upstackdata.com/accounts/api/dashboard/views/{dashboardViewId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-pixel-id", "<api-key>")
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.upstackdata.com/accounts/api/dashboard/views/{dashboardViewId}")
.header("x-api-key", "<api-key>")
.header("x-pixel-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.upstackdata.com/accounts/api/dashboard/views/{dashboardViewId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-pixel-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"dashboardView": {
"pk": "VIEW#01K7A2Q9X3M4N5P6R7S8T9V0WZ",
"sk": "view",
"id": "01K7A2Q9X3M4N5P6R7S8T9V0WZ",
"pixelId": "5f1e6a4f-2b7c-4d1e-9a3f-8c6b2e0d4a71",
"type": "view",
"name": "Summary",
"order": 0,
"configuration": {
"attributionModel": "first_click",
"attributionWindow": 30,
"granularity": "day",
"dateRange": {
"start": "2026-09-12",
"end": "2026-10-12"
},
"filters": {
"preset": "last30",
"isCompare": false
},
"grid": {
"maxWidth": 1200
},
"widgets": [
{
"id": "0c4e2a7b-91d3-4f5a-8b6c-2d7e9f1a3b5c",
"title": "NC ROAS",
"chartType": "sparkline",
"layout": {
"x": 0,
"y": 0,
"rows": 1,
"columns": 3,
"minColumns": 3,
"maxColumns": 3,
"minRows": 1,
"maxRows": 1,
"static": false
},
"dataConfig": {
"measures": [
"core.new_customer_roas"
],
"dimensions": [],
"filters": []
}
},
{
"id": "5f8a1c3e-7b2d-4e9f-a0b1-c2d3e4f5a6b7",
"title": "MER",
"chartType": "sparkline",
"layout": {
"x": 3,
"y": 0,
"rows": 1,
"columns": 3,
"minColumns": 3,
"maxColumns": 3,
"minRows": 1,
"maxRows": 1,
"static": false
},
"dataConfig": {
"measures": [
"core.mer"
],
"dimensions": [],
"filters": []
}
}
],
"sections": [
{
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"title": "Efficiency",
"ordinal": 0,
"collapsed": false,
"hidden": false,
"layoutMode": "auto",
"widgets": [
{
"id": "0c4e2a7b-91d3-4f5a-8b6c-2d7e9f1a3b5c",
"title": "NC ROAS",
"chartType": "sparkline",
"layout": {
"x": 0,
"y": 0,
"rows": 1,
"columns": 3,
"minColumns": 3,
"maxColumns": 3,
"minRows": 1,
"maxRows": 1,
"static": false
},
"dataConfig": {
"measures": [
"core.new_customer_roas"
],
"dimensions": [],
"filters": []
}
},
{
"id": "5f8a1c3e-7b2d-4e9f-a0b1-c2d3e4f5a6b7",
"title": "MER",
"chartType": "sparkline",
"layout": {
"x": 3,
"y": 0,
"rows": 1,
"columns": 3,
"minColumns": 3,
"maxColumns": 3,
"minRows": 1,
"maxRows": 1,
"static": false
},
"dataConfig": {
"measures": [
"core.mer"
],
"dimensions": [],
"filters": []
}
}
]
}
]
},
"createdAt": "2026-05-04T09:12:44.020Z",
"createdBy": "7d2c9a10-5b3e-4f61-8a27-c4e9b1d0f3a6",
"updatedAt": "2026-10-01T18:30:02.917Z",
"updatedBy": "7d2c9a10-5b3e-4f61-8a27-c4e9b1d0f3a6"
}
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}{
"message": "<string>",
"errors": [
{
"message": "<string>",
"key": "<string>",
"path": [
"<string>"
]
}
]
}Required scope:
dashboards:read
Read a view before you change it. Update a dashboard view
replaces configuration as a whole, so fetch the view here, edit the parts you need,
and send the complete configuration back. The same read is the first step in
copying a view to another pixel with Create a dashboard view.
- Get the
dashboardViewIdfrom List dashboard views. - A view that doesn’t exist and a view on another pixel both return
404with{"message": "Dashboard view not found"}. typeis alwaysview. The dashboard type (view,attribution_view, orpnl_view) is insk.- Views with sections carry each widget twice: inside its section, and in the flat
configuration.widgetslist. Older views have only the flat list.
Related
- Duplicate a dashboard view to copy it on the same pixel.
- Delete a dashboard view to remove it.
Was this page helpful?