curl --request POST \
--url https://api.select.dev/v2/dashboards/{dashboard_id}/blocks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"config": {
"query_class": "<string>",
"title": "<string>",
"block_type": "big_number",
"display": {
"metric": "<string>",
"previous_period_comparison": "none"
},
"description": "",
"tooltip": "",
"query_scope": {
"filters": []
}
},
"position": {
"kind": "append_row",
"height_px": 123,
"col_span": 6
}
}
'import requests
url = "https://api.select.dev/v2/dashboards/{dashboard_id}/blocks"
payload = {
"config": {
"query_class": "<string>",
"title": "<string>",
"block_type": "big_number",
"display": {
"metric": "<string>",
"previous_period_comparison": "none"
},
"description": "",
"tooltip": "",
"query_scope": { "filters": [] }
},
"position": {
"kind": "append_row",
"height_px": 123,
"col_span": 6
}
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
config: {
query_class: '<string>',
title: '<string>',
block_type: 'big_number',
display: {metric: '<string>', previous_period_comparison: 'none'},
description: '',
tooltip: '',
query_scope: {filters: []}
},
position: {kind: 'append_row', height_px: 123, col_span: 6}
})
};
fetch('https://api.select.dev/v2/dashboards/{dashboard_id}/blocks', 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.select.dev/v2/dashboards/{dashboard_id}/blocks",
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([
'config' => [
'query_class' => '<string>',
'title' => '<string>',
'block_type' => 'big_number',
'display' => [
'metric' => '<string>',
'previous_period_comparison' => 'none'
],
'description' => '',
'tooltip' => '',
'query_scope' => [
'filters' => [
]
]
],
'position' => [
'kind' => 'append_row',
'height_px' => 123,
'col_span' => 6
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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.select.dev/v2/dashboards/{dashboard_id}/blocks"
payload := strings.NewReader("{\n \"config\": {\n \"query_class\": \"<string>\",\n \"title\": \"<string>\",\n \"block_type\": \"big_number\",\n \"display\": {\n \"metric\": \"<string>\",\n \"previous_period_comparison\": \"none\"\n },\n \"description\": \"\",\n \"tooltip\": \"\",\n \"query_scope\": {\n \"filters\": []\n }\n },\n \"position\": {\n \"kind\": \"append_row\",\n \"height_px\": 123,\n \"col_span\": 6\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
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.select.dev/v2/dashboards/{dashboard_id}/blocks")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"query_class\": \"<string>\",\n \"title\": \"<string>\",\n \"block_type\": \"big_number\",\n \"display\": {\n \"metric\": \"<string>\",\n \"previous_period_comparison\": \"none\"\n },\n \"description\": \"\",\n \"tooltip\": \"\",\n \"query_scope\": {\n \"filters\": []\n }\n },\n \"position\": {\n \"kind\": \"append_row\",\n \"height_px\": 123,\n \"col_span\": 6\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/dashboards/{dashboard_id}/blocks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"query_class\": \"<string>\",\n \"title\": \"<string>\",\n \"block_type\": \"big_number\",\n \"display\": {\n \"metric\": \"<string>\",\n \"previous_period_comparison\": \"none\"\n },\n \"description\": \"\",\n \"tooltip\": \"\",\n \"query_scope\": {\n \"filters\": []\n }\n },\n \"position\": {\n \"kind\": \"append_row\",\n \"height_px\": 123,\n \"col_span\": 6\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"config": {
"query_class": "<string>",
"title": "<string>",
"block_type": "big_number",
"display": {
"metric": "<string>",
"previous_period_comparison": "none"
},
"description": "",
"tooltip": "",
"query_scope": {
"filters": []
}
},
"create_time": "<string>",
"update_time": "<string>",
"etag": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Add a block to a dashboard
Adds a block to a dashboard. Supply a position to place the block on the dashboard grid in the same request; omit it to add the block unplaced and set the dashboard’s layout separately.
curl --request POST \
--url https://api.select.dev/v2/dashboards/{dashboard_id}/blocks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: <x-tenant-id>' \
--data '
{
"config": {
"query_class": "<string>",
"title": "<string>",
"block_type": "big_number",
"display": {
"metric": "<string>",
"previous_period_comparison": "none"
},
"description": "",
"tooltip": "",
"query_scope": {
"filters": []
}
},
"position": {
"kind": "append_row",
"height_px": 123,
"col_span": 6
}
}
'import requests
url = "https://api.select.dev/v2/dashboards/{dashboard_id}/blocks"
payload = {
"config": {
"query_class": "<string>",
"title": "<string>",
"block_type": "big_number",
"display": {
"metric": "<string>",
"previous_period_comparison": "none"
},
"description": "",
"tooltip": "",
"query_scope": { "filters": [] }
},
"position": {
"kind": "append_row",
"height_px": 123,
"col_span": 6
}
}
headers = {
"x-tenant-id": "<x-tenant-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-tenant-id': '<x-tenant-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
config: {
query_class: '<string>',
title: '<string>',
block_type: 'big_number',
display: {metric: '<string>', previous_period_comparison: 'none'},
description: '',
tooltip: '',
query_scope: {filters: []}
},
position: {kind: 'append_row', height_px: 123, col_span: 6}
})
};
fetch('https://api.select.dev/v2/dashboards/{dashboard_id}/blocks', 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.select.dev/v2/dashboards/{dashboard_id}/blocks",
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([
'config' => [
'query_class' => '<string>',
'title' => '<string>',
'block_type' => 'big_number',
'display' => [
'metric' => '<string>',
'previous_period_comparison' => 'none'
],
'description' => '',
'tooltip' => '',
'query_scope' => [
'filters' => [
]
]
],
'position' => [
'kind' => 'append_row',
'height_px' => 123,
'col_span' => 6
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-tenant-id: <x-tenant-id>"
],
]);
$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.select.dev/v2/dashboards/{dashboard_id}/blocks"
payload := strings.NewReader("{\n \"config\": {\n \"query_class\": \"<string>\",\n \"title\": \"<string>\",\n \"block_type\": \"big_number\",\n \"display\": {\n \"metric\": \"<string>\",\n \"previous_period_comparison\": \"none\"\n },\n \"description\": \"\",\n \"tooltip\": \"\",\n \"query_scope\": {\n \"filters\": []\n }\n },\n \"position\": {\n \"kind\": \"append_row\",\n \"height_px\": 123,\n \"col_span\": 6\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-tenant-id", "<x-tenant-id>")
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.select.dev/v2/dashboards/{dashboard_id}/blocks")
.header("x-tenant-id", "<x-tenant-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"config\": {\n \"query_class\": \"<string>\",\n \"title\": \"<string>\",\n \"block_type\": \"big_number\",\n \"display\": {\n \"metric\": \"<string>\",\n \"previous_period_comparison\": \"none\"\n },\n \"description\": \"\",\n \"tooltip\": \"\",\n \"query_scope\": {\n \"filters\": []\n }\n },\n \"position\": {\n \"kind\": \"append_row\",\n \"height_px\": 123,\n \"col_span\": 6\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.select.dev/v2/dashboards/{dashboard_id}/blocks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-tenant-id"] = '<x-tenant-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"config\": {\n \"query_class\": \"<string>\",\n \"title\": \"<string>\",\n \"block_type\": \"big_number\",\n \"display\": {\n \"metric\": \"<string>\",\n \"previous_period_comparison\": \"none\"\n },\n \"description\": \"\",\n \"tooltip\": \"\",\n \"query_scope\": {\n \"filters\": []\n }\n },\n \"position\": {\n \"kind\": \"append_row\",\n \"height_px\": 123,\n \"col_span\": 6\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"config": {
"query_class": "<string>",
"title": "<string>",
"block_type": "big_number",
"display": {
"metric": "<string>",
"previous_period_comparison": "none"
},
"description": "",
"tooltip": "",
"query_scope": {
"filters": []
}
},
"create_time": "<string>",
"update_time": "<string>",
"etag": "<string>"
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}{
"title": "<string>",
"status": 123,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"type": "about:blank",
"details": [
{}
]
}Authorizations
Organization API key (sl_…).
Headers
The organization ID the request is scoped to.
Path Parameters
Body
A block to add to a dashboard.
What the block shows and how it is displayed.
- BigNumberBlockConfig
- ChartBlockConfig
- BarListBlockConfig
- TableBlockConfig
- FeedBlockConfig
- TextBlockConfig
- EntityCardBlockConfig
Show child attributes
Show child attributes
Where to place the block on the dashboard grid. Omit to add the block without placing it and set freeform_layout on the dashboard instead.
- AppendRowPosition
- FreeformBlockPosition
Show child attributes
Show child attributes
Response
Successful Response
A single unit of content on a dashboard, such as a chart, table, or note.
The unique identifier of the block.
What the block shows and how it is displayed.
- BigNumberBlockConfig
- ChartBlockConfig
- BarListBlockConfig
- TableBlockConfig
- FeedBlockConfig
- TextBlockConfig
- EntityCardBlockConfig
Show child attributes
Show child attributes
When the block was created, as an RFC 3339 UTC timestamp.
When the block was last changed, as an RFC 3339 UTC timestamp.
Opaque strong ETag. Supply it in an If-Match header when changing or deleting the block.

