curl --request POST \
--url https://api.neoagent.io/public-api/dashboards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"module": "<string>",
"name": "<string>",
"period_rule": {
"timezone": "<string>",
"days": 183
},
"widgets": [
{
"id": "<string>",
"layout": {
"h": 6,
"w": 6,
"x": 1,
"y": 1
},
"title": "<string>",
"data_schema": {},
"inputs": [
"<string>"
]
}
],
"permission_groups": {}
}
'import requests
url = "https://api.neoagent.io/public-api/dashboards"
payload = {
"module": "<string>",
"name": "<string>",
"period_rule": {
"timezone": "<string>",
"days": 183
},
"widgets": [
{
"id": "<string>",
"layout": {
"h": 6,
"w": 6,
"x": 1,
"y": 1
},
"title": "<string>",
"data_schema": {},
"inputs": ["<string>"]
}
],
"permission_groups": {}
}
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({
module: '<string>',
name: '<string>',
period_rule: {timezone: '<string>', days: 183},
widgets: [
{
id: '<string>',
layout: {h: 6, w: 6, x: 1, y: 1},
title: '<string>',
data_schema: {},
inputs: ['<string>']
}
],
permission_groups: {}
})
};
fetch('https://api.neoagent.io/public-api/dashboards', 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",
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([
'module' => '<string>',
'name' => '<string>',
'period_rule' => [
'timezone' => '<string>',
'days' => 183
],
'widgets' => [
[
'id' => '<string>',
'layout' => [
'h' => 6,
'w' => 6,
'x' => 1,
'y' => 1
],
'title' => '<string>',
'data_schema' => [
],
'inputs' => [
'<string>'
]
]
],
'permission_groups' => [
]
]),
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"
payload := strings.NewReader("{\n \"module\": \"<string>\",\n \"name\": \"<string>\",\n \"period_rule\": {\n \"timezone\": \"<string>\",\n \"days\": 183\n },\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 \"permission_groups\": {}\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.neoagent.io/public-api/dashboards")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"module\": \"<string>\",\n \"name\": \"<string>\",\n \"period_rule\": {\n \"timezone\": \"<string>\",\n \"days\": 183\n },\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 \"permission_groups\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neoagent.io/public-api/dashboards")
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 \"module\": \"<string>\",\n \"name\": \"<string>\",\n \"period_rule\": {\n \"timezone\": \"<string>\",\n \"days\": 183\n },\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 \"permission_groups\": {}\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"
}
}Create a dashboard
Stores the dashboard (name, the Python module with one widget_<id>(ctx) per widget, the widget manifest, the read-only permission groups its vendor calls run under, the period rule), starts a refresh of every widget and returns at once with the dashboard id. A problem found without running it (manifest, module, groups, period rule) is a 422 listing every problem, and stores nothing. Read the results with GET /dashboards/<id>; through NEO_API_REQUEST the tool waits up to 60 s and returns the previews itself. An acting user must be an admin (403 insufficient_scope otherwise): a dashboard’s code reads the whole workspace’s data. A key with no acting user is a service account and is already tenant-wide, so it builds without one. The creator is the acting user. If the refresh cannot start, the call is a 5xx and the dashboard is taken back out (soft-deleted: it no longer lists or opens), so send the create again. Dashboards bill nothing.
curl --request POST \
--url https://api.neoagent.io/public-api/dashboards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"module": "<string>",
"name": "<string>",
"period_rule": {
"timezone": "<string>",
"days": 183
},
"widgets": [
{
"id": "<string>",
"layout": {
"h": 6,
"w": 6,
"x": 1,
"y": 1
},
"title": "<string>",
"data_schema": {},
"inputs": [
"<string>"
]
}
],
"permission_groups": {}
}
'import requests
url = "https://api.neoagent.io/public-api/dashboards"
payload = {
"module": "<string>",
"name": "<string>",
"period_rule": {
"timezone": "<string>",
"days": 183
},
"widgets": [
{
"id": "<string>",
"layout": {
"h": 6,
"w": 6,
"x": 1,
"y": 1
},
"title": "<string>",
"data_schema": {},
"inputs": ["<string>"]
}
],
"permission_groups": {}
}
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({
module: '<string>',
name: '<string>',
period_rule: {timezone: '<string>', days: 183},
widgets: [
{
id: '<string>',
layout: {h: 6, w: 6, x: 1, y: 1},
title: '<string>',
data_schema: {},
inputs: ['<string>']
}
],
permission_groups: {}
})
};
fetch('https://api.neoagent.io/public-api/dashboards', 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",
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([
'module' => '<string>',
'name' => '<string>',
'period_rule' => [
'timezone' => '<string>',
'days' => 183
],
'widgets' => [
[
'id' => '<string>',
'layout' => [
'h' => 6,
'w' => 6,
'x' => 1,
'y' => 1
],
'title' => '<string>',
'data_schema' => [
],
'inputs' => [
'<string>'
]
]
],
'permission_groups' => [
]
]),
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"
payload := strings.NewReader("{\n \"module\": \"<string>\",\n \"name\": \"<string>\",\n \"period_rule\": {\n \"timezone\": \"<string>\",\n \"days\": 183\n },\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 \"permission_groups\": {}\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.neoagent.io/public-api/dashboards")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"module\": \"<string>\",\n \"name\": \"<string>\",\n \"period_rule\": {\n \"timezone\": \"<string>\",\n \"days\": 183\n },\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 \"permission_groups\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.neoagent.io/public-api/dashboards")
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 \"module\": \"<string>\",\n \"name\": \"<string>\",\n \"period_rule\": {\n \"timezone\": \"<string>\",\n \"days\": 183\n },\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 \"permission_groups\": {}\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).
Body
Python source: one widget_<id>(ctx) function per widget, plus shared helpers. ctx.period (start, end) is the data window; ctx.inputs holds the data of the widgets this one lists as inputs. Vendor reads go through the injected clients, e.g. from psa.client import http_request, under the dashboard's read-only permission groups. See docs.neoagent.io/product/dashboards.
1 - 120Show child attributes
Show child attributes
The widgets, in run order: a widget's inputs are listed before it.
Show child attributes
Show child attributes
Read-only integration permission groups the module's vendor calls run under, keyed by integration field name, with group display names.
Show child attributes
Show child attributes
