curl --request PUT \
--url https://api.neoagent.io/public-api/dashboards/{dashboard_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"module": "<string>",
"name": "<string>",
"period_rule": {
"timezone": "<string>",
"days": 183
},
"permission_groups": {},
"restore_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"widgets": [
{
"id": "<string>",
"layout": {
"h": 6,
"w": 6,
"x": 1,
"y": 1
},
"title": "<string>",
"data_schema": {},
"inputs": [
"<string>"
]
}
]
}
'import requests
url = "https://api.neoagent.io/public-api/dashboards/{dashboard_id}"
payload = {
"expected_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"module": "<string>",
"name": "<string>",
"period_rule": {
"timezone": "<string>",
"days": 183
},
"permission_groups": {},
"restore_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"widgets": [
{
"id": "<string>",
"layout": {
"h": 6,
"w": 6,
"x": 1,
"y": 1
},
"title": "<string>",
"data_schema": {},
"inputs": ["<string>"]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_definition_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
module: '<string>',
name: '<string>',
period_rule: {timezone: '<string>', days: 183},
permission_groups: {},
restore_definition_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
widgets: [
{
id: '<string>',
layout: {h: 6, w: 6, x: 1, y: 1},
title: '<string>',
data_schema: {},
inputs: ['<string>']
}
]
})
};
fetch('https://api.neoagent.io/public-api/dashboards/{dashboard_id}', 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.neoagent.io/public-api/dashboards/{dashboard_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'expected_definition_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'module' => '<string>',
'name' => '<string>',
'period_rule' => [
'timezone' => '<string>',
'days' => 183
],
'permission_groups' => [
],
'restore_definition_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'widgets' => [
[
'id' => '<string>',
'layout' => [
'h' => 6,
'w' => 6,
'x' => 1,
'y' => 1
],
'title' => '<string>',
'data_schema' => [
],
'inputs' => [
'<string>'
]
]
]
]),
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.neoagent.io/public-api/dashboards/{dashboard_id}"
payload := strings.NewReader("{\n \"expected_definition_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"module\": \"<string>\",\n \"name\": \"<string>\",\n \"period_rule\": {\n \"timezone\": \"<string>\",\n \"days\": 183\n },\n \"permission_groups\": {},\n \"restore_definition_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"layout\": {\n \"h\": 6,\n \"w\": 6,\n \"x\": 1,\n \"y\": 1\n },\n \"title\": \"<string>\",\n \"data_schema\": {},\n \"inputs\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.neoagent.io/public-api/dashboards/{dashboard_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_definition_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"module\": \"<string>\",\n \"name\": \"<string>\",\n \"period_rule\": {\n \"timezone\": \"<string>\",\n \"days\": 183\n },\n \"permission_groups\": {},\n \"restore_definition_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"layout\": {\n \"h\": 6,\n \"w\": 6,\n \"x\": 1,\n \"y\": 1\n },\n \"title\": \"<string>\",\n \"data_schema\": {},\n \"inputs\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neoagent.io/public-api/dashboards/{dashboard_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_definition_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"module\": \"<string>\",\n \"name\": \"<string>\",\n \"period_rule\": {\n \"timezone\": \"<string>\",\n \"days\": 183\n },\n \"permission_groups\": {},\n \"restore_definition_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"layout\": {\n \"h\": 6,\n \"w\": 6,\n \"x\": 1,\n \"y\": 1\n },\n \"title\": \"<string>\",\n \"data_schema\": {},\n \"inputs\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"dashboard_id": "<string>",
"definition_id": "<string>",
"name": "<string>",
"refresh_started": true,
"widget_count": 123,
"widget_ids": [
"<string>"
]
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timings_ms": {},
"pagination": {
"has_more": true,
"next_cursor": "<string>"
},
"warnings": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Update a dashboard
Every field is optional, and a field left out keeps the stored value: send only what you change, so a rename someone made since you read the dashboard is not undone. name and period_rule replace theirs; permission_groups replaces the groups ({} clears them); module and widgets together replace the definition. Then asks for a refresh of every widget, a rename included, and returns at once; every widget is pending until it lands. refresh_started is false when the change was stored but the refresh could not start. restore_definition_id (an id from GET /dashboards/<id>/definitions) instead makes that earlier definition the one in use, stores no new one, and refreshes every widget; sent with module or widgets it is a 422, and so is an id that is not this dashboard’s. Sending module or widgets, restore_definition_id, or other permission groups, is building: admins only. A rename or a period change: the creator or an admin. Otherwise 403. The old definition’s data shows as stale until the refresh replaces it. expected_definition_id: the definition_id your GET returned (a UUID). Send it on every PUT: when the dashboard uses another definition now, the PUT is a 409 dashboard_update_conflict and nothing is stored. Without it, only a change made while this PUT was saving is a 409; a change made between your GET and the PUT is overwritten, and a module or widgets sent alone is paired with the other half as it is when the PUT arrives. After a 409, GET the dashboard and apply your change to what it has now.
curl --request PUT \
--url https://api.neoagent.io/public-api/dashboards/{dashboard_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expected_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"module": "<string>",
"name": "<string>",
"period_rule": {
"timezone": "<string>",
"days": 183
},
"permission_groups": {},
"restore_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"widgets": [
{
"id": "<string>",
"layout": {
"h": 6,
"w": 6,
"x": 1,
"y": 1
},
"title": "<string>",
"data_schema": {},
"inputs": [
"<string>"
]
}
]
}
'import requests
url = "https://api.neoagent.io/public-api/dashboards/{dashboard_id}"
payload = {
"expected_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"module": "<string>",
"name": "<string>",
"period_rule": {
"timezone": "<string>",
"days": 183
},
"permission_groups": {},
"restore_definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"widgets": [
{
"id": "<string>",
"layout": {
"h": 6,
"w": 6,
"x": 1,
"y": 1
},
"title": "<string>",
"data_schema": {},
"inputs": ["<string>"]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expected_definition_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
module: '<string>',
name: '<string>',
period_rule: {timezone: '<string>', days: 183},
permission_groups: {},
restore_definition_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
widgets: [
{
id: '<string>',
layout: {h: 6, w: 6, x: 1, y: 1},
title: '<string>',
data_schema: {},
inputs: ['<string>']
}
]
})
};
fetch('https://api.neoagent.io/public-api/dashboards/{dashboard_id}', 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.neoagent.io/public-api/dashboards/{dashboard_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'expected_definition_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'module' => '<string>',
'name' => '<string>',
'period_rule' => [
'timezone' => '<string>',
'days' => 183
],
'permission_groups' => [
],
'restore_definition_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'widgets' => [
[
'id' => '<string>',
'layout' => [
'h' => 6,
'w' => 6,
'x' => 1,
'y' => 1
],
'title' => '<string>',
'data_schema' => [
],
'inputs' => [
'<string>'
]
]
]
]),
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.neoagent.io/public-api/dashboards/{dashboard_id}"
payload := strings.NewReader("{\n \"expected_definition_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"module\": \"<string>\",\n \"name\": \"<string>\",\n \"period_rule\": {\n \"timezone\": \"<string>\",\n \"days\": 183\n },\n \"permission_groups\": {},\n \"restore_definition_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"layout\": {\n \"h\": 6,\n \"w\": 6,\n \"x\": 1,\n \"y\": 1\n },\n \"title\": \"<string>\",\n \"data_schema\": {},\n \"inputs\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.neoagent.io/public-api/dashboards/{dashboard_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expected_definition_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"module\": \"<string>\",\n \"name\": \"<string>\",\n \"period_rule\": {\n \"timezone\": \"<string>\",\n \"days\": 183\n },\n \"permission_groups\": {},\n \"restore_definition_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"layout\": {\n \"h\": 6,\n \"w\": 6,\n \"x\": 1,\n \"y\": 1\n },\n \"title\": \"<string>\",\n \"data_schema\": {},\n \"inputs\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neoagent.io/public-api/dashboards/{dashboard_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expected_definition_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"module\": \"<string>\",\n \"name\": \"<string>\",\n \"period_rule\": {\n \"timezone\": \"<string>\",\n \"days\": 183\n },\n \"permission_groups\": {},\n \"restore_definition_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"widgets\": [\n {\n \"id\": \"<string>\",\n \"layout\": {\n \"h\": 6,\n \"w\": 6,\n \"x\": 1,\n \"y\": 1\n },\n \"title\": \"<string>\",\n \"data_schema\": {},\n \"inputs\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"dashboard_id": "<string>",
"definition_id": "<string>",
"name": "<string>",
"refresh_started": true,
"widget_count": 123,
"widget_ids": [
"<string>"
]
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timings_ms": {},
"pagination": {
"has_more": true,
"next_cursor": "<string>"
},
"warnings": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Authorizations
Authorization: Bearer <token> where <token> is either a neo_sk_<env>_<secret> API key (service account) or a Microsoft Entra ID access token (dashboard user).
Path Parameters
Body
Every field left out keeps the stored value. module and widgets together replace the
definition. restore_definition_id instead makes an earlier definition the one in use.
permission_groups {} clears the groups.
The definition_id you read with GET. When the dashboard uses another definition now, the update is a 409 and nothing is stored.
1 - 120Show child attributes
Show child attributes
Show child attributes
Show child attributes
An id from GET /dashboards/<id>/definitions: its module and widgets become the dashboard's again. Not with module or widgets.
Show child attributes
Show child attributes
