Depot dashboards
Registers the dashboard console routes (D18).
This page is generated from the Depot route table. Every operation carries the permission it needs and the anchor an agent can link to.
GET /api/v1/console/dashboards
Section titled “GET /api/v1/console/dashboards”GETshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
listDashboards lists the dashboards the caller may open on a face, with the one that opens by default and why.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientId | query | string | No | |
face | query | string | No | |
siteId | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, ListResponse | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | Authentication is required. |
404 | application/problem+json, ProblemDetails | There are no practice dashboards here. |
500 | application/problem+json, ProblemDetails | Could not evaluate permissions. |
503 | application/problem+json, ProblemDetails | Dashboards are not available on this server. |
200 response body
| Field | Type | Description |
|---|---|---|
canManagerequired | boolean | |
canTvrequired | boolean | |
dashboardsrequired | array of ListItem | |
dashboards[].builtinrequired | boolean | |
dashboards[].canEditrequired | boolean | |
dashboards[].facerequired | string | |
dashboards[].idrequired | string | |
dashboards[].minerequired | boolean | |
dashboards[].namerequired | string | |
dashboards[].ownerrequired | OwnerRef | OwnerRef names a dashboard's owner. |
dashboards[].owner.namerequired | string | |
dashboards[].rolesrequired | array of RoleRef | |
dashboards[].roles[].idrequired | string | |
dashboards[].roles[].namerequired | string | |
dashboards[].sharingrequired | string | |
facerequired | string | |
resolvedrequired | Resolved | Resolved says which dashboard opens by default and why (D6). |
resolved.idrequired | string | |
resolved.sourcerequired | string, one of builtin, client, practice, role, user |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/console/dashboards?clientId=<clientId>&face=<face>&siteId=<siteId>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/console/dashboards?clientId=<clientId>&face=<face>&siteId=<siteId>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/console/dashboards"params = { "clientId": "<clientId>", "face": "<face>", "siteId": "<siteId>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, params=params, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/console/dashboards?clientId=<clientId>&face=<face>&siteId=<siteId>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = new URL("https://depot.example.com/api/v1/console/dashboards");url.searchParams.set("clientId", "<clientId>");url.searchParams.set("face", "<face>");url.searchParams.set("siteId", "<siteId>");
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/console/dashboards?clientId=<clientId>&face=<face>&siteId=<siteId>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/console/dashboards
Section titled “POST /api/v1/console/dashboards”POSTshared facehosteditmspremoteNot fully resolved
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
createDashboard saves a new dashboard owned by the caller.
A shared one needs dashboard:manage.
Request body
Section titled “Request body”Required, sent as application/json.
| Field | Type | Description |
|---|---|---|
definitionrequired | Definition | Definition is the stored dashboard ("Dashboard"."DefinitionJson"). |
definition.rangerequired | Range | Range is a preset, or custom with RFC3339 From and To. |
definition.range.from | string | |
definition.range.presetrequired | string | |
definition.range.to | string | |
definition.versionrequired | integer | |
definition.widgetsrequired | array of Widget | |
definition.widgets[].chart | string | |
definition.widgets[].compare | string | |
definition.widgets[].drill | boolean or null | |
definition.widgets[].idrequired | string | |
definition.widgets[].kindrequired | string | |
definition.widgets[].layoutrequired | Layout | Layout is library-neutral, on 12 columns (D16). |
definition.widgets[].layout.hrequired | integer | |
definition.widgets[].layout.wrequired | integer | |
definition.widgets[].layout.xrequired | integer | |
definition.widgets[].layout.yrequired | integer | |
definition.widgets[].mine | boolean | |
definition.widgets[].range | Range | Range is a preset, or custom with RFC3339 From and To. |
definition.widgets[].range.from | string | |
definition.widgets[].range.presetrequired | string | |
definition.widgets[].range.to | string | |
definition.widgets[].sourcerequired | Source | Source is one struct with a Type discriminator (D2). |
definition.widgets[].source.as | string, one of count, list | |
definition.widgets[].source.bucket | Bucket | Bucket mirrors reporting.Bucket without the time zone, which comes from the request (D3). |
definition.widgets[].source.columns | array of string | |
definition.widgets[].source.dataset | string | |
definition.widgets[].source.filters | array of Filter | |
definition.widgets[].source.groupBy | string | |
definition.widgets[].source.key | string | |
definition.widgets[].source.limit | integer | |
definition.widgets[].source.metric | Metric | Metric mirrors reporting.Metric with JSON tags (D15). |
definition.widgets[].source.params | object | |
definition.widgets[].source.query | object | |
definition.widgets[].source.sort | array of SortKey | |
definition.widgets[].source.surface | string | |
definition.widgets[].source.typerequired | string | |
definition.widgets[].source.viewId | string | |
definition.widgets[].source.viewName | string | |
definition.widgets[].target | number or null | double. |
definition.widgets[].thresholds | Thresholds | Thresholds (D4). |
definition.widgets[].thresholds.badrequired | number | double. |
definition.widgets[].thresholds.basisrequired | string | |
definition.widgets[].thresholds.directionrequired | string | |
definition.widgets[].thresholds.warnrequired | number | double. |
definition.widgets[].titlerequired | string | |
facerequired | string | |
namerequired | string | |
roles | array of string | |
sharingrequired | string |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, Detail | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | Authentication is required. |
403 | application/problem+json, ProblemDetails | Sharing dashboards and changing shared ones needs the Dashboards permission. |
500 | application/problem+json, ProblemDetails | Could not evaluate permissions. |
503 | application/problem+json, ProblemDetails | Dashboards are not available on this server. |
200 response body
| Field | Type | Description |
|---|---|---|
builtinrequired | boolean | |
canEditrequired | boolean | |
definitionrequired | Definition | Definition is the stored dashboard ("Dashboard"."DefinitionJson"). |
definition.rangerequired | Range | Range is a preset, or custom with RFC3339 From and To. |
definition.range.from | string | |
definition.range.presetrequired | string | |
definition.range.to | string | |
definition.versionrequired | integer | |
definition.widgetsrequired | array of Widget | |
definition.widgets[].chart | string | |
definition.widgets[].compare | string | |
definition.widgets[].drill | boolean or null | |
definition.widgets[].idrequired | string | |
definition.widgets[].kindrequired | string | |
definition.widgets[].layoutrequired | Layout | Layout is library-neutral, on 12 columns (D16). |
definition.widgets[].layout.hrequired | integer | |
definition.widgets[].layout.wrequired | integer | |
definition.widgets[].layout.xrequired | integer | |
definition.widgets[].layout.yrequired | integer | |
definition.widgets[].mine | boolean | |
definition.widgets[].range | Range | Range is a preset, or custom with RFC3339 From and To. |
definition.widgets[].range.from | string | |
definition.widgets[].range.presetrequired | string | |
definition.widgets[].range.to | string | |
definition.widgets[].sourcerequired | Source | Source is one struct with a Type discriminator (D2). |
definition.widgets[].source.as | string, one of count, list | |
definition.widgets[].source.bucket | Bucket | Bucket mirrors reporting.Bucket without the time zone, which comes from the request (D3). |
definition.widgets[].source.columns | array of string | |
definition.widgets[].source.dataset | string | |
definition.widgets[].source.filters | array of Filter | |
definition.widgets[].source.groupBy | string | |
definition.widgets[].source.key | string | |
definition.widgets[].source.limit | integer | |
definition.widgets[].source.metric | Metric | Metric mirrors reporting.Metric with JSON tags (D15). |
definition.widgets[].source.params | object | |
definition.widgets[].source.query | object | |
definition.widgets[].source.sort | array of SortKey | |
definition.widgets[].source.surface | string | |
definition.widgets[].source.typerequired | string | |
definition.widgets[].source.viewId | string | |
definition.widgets[].source.viewName | string | |
definition.widgets[].target | number or null | double. |
definition.widgets[].thresholds | Thresholds | Thresholds (D4). |
definition.widgets[].thresholds.badrequired | number | double. |
definition.widgets[].thresholds.basisrequired | string | |
definition.widgets[].thresholds.directionrequired | string | |
definition.widgets[].thresholds.warnrequired | number | double. |
definition.widgets[].titlerequired | string | |
facerequired | string | |
idrequired | string | |
minerequired | boolean | |
namerequired | string | |
ownerrequired | OwnerRef | OwnerRef names a dashboard's owner. |
owner.namerequired | string | |
rolesrequired | array of RoleRef | |
roles[].idrequired | string | |
roles[].namerequired | string | |
rowVersionrequired | integer | int64. |
sharingrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.curl -X POST 'https://depot.example.com/api/v1/console/dashboards' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '{ "definition": { "range": { "from": "string", "preset": "string", "to": "string" }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": false, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0 }, "mine": false, "range": { "from": "string", "preset": "string", "to": "string" }, "source": { "as": "count", "bucket": { "column": null, "unit": null }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": null, "op": null }, "params": { "key": null }, "query": { "key": null }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string" }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0 }, "title": "string" } ] }, "face": "string", "name": "string", "roles": [ "string" ], "sharing": "string"}'# Sign in first. outpost_console is a session cookie, so send it with every request.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'{ "definition": { "range": { "from": "string", "preset": "string", "to": "string" }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": false, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0 }, "mine": false, "range": { "from": "string", "preset": "string", "to": "string" }, "source": { "as": "count", "bucket": { "column": null, "unit": null }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": null, "op": null }, "params": { "key": null }, "query": { "key": null }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string" }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0 }, "title": "string" } ] }, "face": "string", "name": "string", "roles": [ "string" ], "sharing": "string"}'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/console/dashboards' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.
import requests
url = "https://depot.example.com/api/v1/console/dashboards"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = { "definition": { "range": { "from": "string", "preset": "string", "to": "string", }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": False, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0, }, "mine": False, "range": { "from": "string", "preset": "string", "to": "string", }, "source": { "as": "count", "bucket": { "column": None, "unit": None, }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": None, "op": None, }, "params": { "key": None, }, "query": { "key": None, }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string", }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0, }, "title": "string", }, ], }, "face": "string", "name": "string", "roles": [ "string", ], "sharing": "string",}
response = requests.post(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`{ "definition": { "range": { "from": "string", "preset": "string", "to": "string" }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": false, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0 }, "mine": false, "range": { "from": "string", "preset": "string", "to": "string" }, "source": { "as": "count", "bucket": { "column": null, "unit": null }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": null, "op": null }, "params": { "key": null }, "query": { "key": null }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string" }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0 }, "title": "string" } ] }, "face": "string", "name": "string", "roles": [ "string" ], "sharing": "string"}`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/console/dashboards", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/console/dashboards";
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify({ "definition": { "range": { "from": "string", "preset": "string", "to": "string" }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": false, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0 }, "mine": false, "range": { "from": "string", "preset": "string", "to": "string" }, "source": { "as": "count", "bucket": { "column": null, "unit": null }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": null, "op": null }, "params": { "key": null }, "query": { "key": null }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string" }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0 }, "title": "string" } ] }, "face": "string", "name": "string", "roles": [ "string" ], "sharing": "string" }),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """{ "definition": { "range": { "from": "string", "preset": "string", "to": "string" }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": false, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0 }, "mine": false, "range": { "from": "string", "preset": "string", "to": "string" }, "source": { "as": "count", "bucket": { "column": null, "unit": null }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": null, "op": null }, "params": { "key": null }, "query": { "key": null }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string" }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0 }, "title": "string" } ] }, "face": "string", "name": "string", "roles": [ "string" ], "sharing": "string"}""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/console/dashboards");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/console/dashboards/{id}
Section titled “GET /api/v1/console/dashboards/{id}”GETshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
getDashboard reads one dashboard (or builtin) with its definition.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | |
clientId | query | string | No | |
face | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, Detail | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | Authentication is required. |
404 | application/problem+json, ProblemDetails | No dashboard matches that id. |
500 | application/problem+json, ProblemDetails | Could not evaluate permissions. |
503 | application/problem+json, ProblemDetails | Dashboards are not available on this server. |
200 response body
| Field | Type | Description |
|---|---|---|
builtinrequired | boolean | |
canEditrequired | boolean | |
definitionrequired | Definition | Definition is the stored dashboard ("Dashboard"."DefinitionJson"). |
definition.rangerequired | Range | Range is a preset, or custom with RFC3339 From and To. |
definition.range.from | string | |
definition.range.presetrequired | string | |
definition.range.to | string | |
definition.versionrequired | integer | |
definition.widgetsrequired | array of Widget | |
definition.widgets[].chart | string | |
definition.widgets[].compare | string | |
definition.widgets[].drill | boolean or null | |
definition.widgets[].idrequired | string | |
definition.widgets[].kindrequired | string | |
definition.widgets[].layoutrequired | Layout | Layout is library-neutral, on 12 columns (D16). |
definition.widgets[].layout.hrequired | integer | |
definition.widgets[].layout.wrequired | integer | |
definition.widgets[].layout.xrequired | integer | |
definition.widgets[].layout.yrequired | integer | |
definition.widgets[].mine | boolean | |
definition.widgets[].range | Range | Range is a preset, or custom with RFC3339 From and To. |
definition.widgets[].range.from | string | |
definition.widgets[].range.presetrequired | string | |
definition.widgets[].range.to | string | |
definition.widgets[].sourcerequired | Source | Source is one struct with a Type discriminator (D2). |
definition.widgets[].source.as | string, one of count, list | |
definition.widgets[].source.bucket | Bucket | Bucket mirrors reporting.Bucket without the time zone, which comes from the request (D3). |
definition.widgets[].source.columns | array of string | |
definition.widgets[].source.dataset | string | |
definition.widgets[].source.filters | array of Filter | |
definition.widgets[].source.groupBy | string | |
definition.widgets[].source.key | string | |
definition.widgets[].source.limit | integer | |
definition.widgets[].source.metric | Metric | Metric mirrors reporting.Metric with JSON tags (D15). |
definition.widgets[].source.params | object | |
definition.widgets[].source.query | object | |
definition.widgets[].source.sort | array of SortKey | |
definition.widgets[].source.surface | string | |
definition.widgets[].source.typerequired | string | |
definition.widgets[].source.viewId | string | |
definition.widgets[].source.viewName | string | |
definition.widgets[].target | number or null | double. |
definition.widgets[].thresholds | Thresholds | Thresholds (D4). |
definition.widgets[].thresholds.badrequired | number | double. |
definition.widgets[].thresholds.basisrequired | string | |
definition.widgets[].thresholds.directionrequired | string | |
definition.widgets[].thresholds.warnrequired | number | double. |
definition.widgets[].titlerequired | string | |
facerequired | string | |
idrequired | string | |
minerequired | boolean | |
namerequired | string | |
ownerrequired | OwnerRef | OwnerRef names a dashboard's owner. |
owner.namerequired | string | |
rolesrequired | array of RoleRef | |
roles[].idrequired | string | |
roles[].namerequired | string | |
rowVersionrequired | integer | int64. |
sharingrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/console/dashboards/<id>?clientId=<clientId>&face=<face>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/console/dashboards/<id>?clientId=<clientId>&face=<face>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/console/dashboards/<id>"params = { "clientId": "<clientId>", "face": "<face>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, params=params, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/console/dashboards/<id>?clientId=<clientId>&face=<face>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = new URL("https://depot.example.com/api/v1/console/dashboards/<id>");url.searchParams.set("clientId", "<clientId>");url.searchParams.set("face", "<face>");
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/console/dashboards/<id>?clientId=<clientId>&face=<face>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());PUT /api/v1/console/dashboards/{id}
Section titled “PUT /api/v1/console/dashboards/{id}”PUTshared facehosteditmspremoteIdempotentNot fully resolved
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
updateDashboard replaces a dashboard’s name, sharing, roles and definition.
If-Match carries the rowVersion it was read at; a stale one is 409.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Request body
Section titled “Request body”Required, sent as application/json.
| Field | Type | Description |
|---|---|---|
definitionrequired | Definition | Definition is the stored dashboard ("Dashboard"."DefinitionJson"). |
definition.rangerequired | Range | Range is a preset, or custom with RFC3339 From and To. |
definition.range.from | string | |
definition.range.presetrequired | string | |
definition.range.to | string | |
definition.versionrequired | integer | |
definition.widgetsrequired | array of Widget | |
definition.widgets[].chart | string | |
definition.widgets[].compare | string | |
definition.widgets[].drill | boolean or null | |
definition.widgets[].idrequired | string | |
definition.widgets[].kindrequired | string | |
definition.widgets[].layoutrequired | Layout | Layout is library-neutral, on 12 columns (D16). |
definition.widgets[].layout.hrequired | integer | |
definition.widgets[].layout.wrequired | integer | |
definition.widgets[].layout.xrequired | integer | |
definition.widgets[].layout.yrequired | integer | |
definition.widgets[].mine | boolean | |
definition.widgets[].range | Range | Range is a preset, or custom with RFC3339 From and To. |
definition.widgets[].range.from | string | |
definition.widgets[].range.presetrequired | string | |
definition.widgets[].range.to | string | |
definition.widgets[].sourcerequired | Source | Source is one struct with a Type discriminator (D2). |
definition.widgets[].source.as | string, one of count, list | |
definition.widgets[].source.bucket | Bucket | Bucket mirrors reporting.Bucket without the time zone, which comes from the request (D3). |
definition.widgets[].source.columns | array of string | |
definition.widgets[].source.dataset | string | |
definition.widgets[].source.filters | array of Filter | |
definition.widgets[].source.groupBy | string | |
definition.widgets[].source.key | string | |
definition.widgets[].source.limit | integer | |
definition.widgets[].source.metric | Metric | Metric mirrors reporting.Metric with JSON tags (D15). |
definition.widgets[].source.params | object | |
definition.widgets[].source.query | object | |
definition.widgets[].source.sort | array of SortKey | |
definition.widgets[].source.surface | string | |
definition.widgets[].source.typerequired | string | |
definition.widgets[].source.viewId | string | |
definition.widgets[].source.viewName | string | |
definition.widgets[].target | number or null | double. |
definition.widgets[].thresholds | Thresholds | Thresholds (D4). |
definition.widgets[].thresholds.badrequired | number | double. |
definition.widgets[].thresholds.basisrequired | string | |
definition.widgets[].thresholds.directionrequired | string | |
definition.widgets[].thresholds.warnrequired | number | double. |
definition.widgets[].titlerequired | string | |
facerequired | string | |
namerequired | string | |
roles | array of string | |
sharingrequired | string |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, Detail | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | Authentication is required. |
403 | application/problem+json, ProblemDetails | Sharing dashboards and changing shared ones needs the Dashboards permission. |
404 | application/problem+json, ProblemDetails | No dashboard matches that id. |
405 | application/problem+json, ProblemDetails | Built-in dashboards cannot be changed. Copy it to make your own. |
409 | application/problem+json, ProblemDetails | Someone else changed this dashboard. Reload it and try again. |
500 | application/problem+json, ProblemDetails | Could not evaluate permissions. |
503 | application/problem+json, ProblemDetails | Dashboards are not available on this server. |
200 response body
| Field | Type | Description |
|---|---|---|
builtinrequired | boolean | |
canEditrequired | boolean | |
definitionrequired | Definition | Definition is the stored dashboard ("Dashboard"."DefinitionJson"). |
definition.rangerequired | Range | Range is a preset, or custom with RFC3339 From and To. |
definition.range.from | string | |
definition.range.presetrequired | string | |
definition.range.to | string | |
definition.versionrequired | integer | |
definition.widgetsrequired | array of Widget | |
definition.widgets[].chart | string | |
definition.widgets[].compare | string | |
definition.widgets[].drill | boolean or null | |
definition.widgets[].idrequired | string | |
definition.widgets[].kindrequired | string | |
definition.widgets[].layoutrequired | Layout | Layout is library-neutral, on 12 columns (D16). |
definition.widgets[].layout.hrequired | integer | |
definition.widgets[].layout.wrequired | integer | |
definition.widgets[].layout.xrequired | integer | |
definition.widgets[].layout.yrequired | integer | |
definition.widgets[].mine | boolean | |
definition.widgets[].range | Range | Range is a preset, or custom with RFC3339 From and To. |
definition.widgets[].range.from | string | |
definition.widgets[].range.presetrequired | string | |
definition.widgets[].range.to | string | |
definition.widgets[].sourcerequired | Source | Source is one struct with a Type discriminator (D2). |
definition.widgets[].source.as | string, one of count, list | |
definition.widgets[].source.bucket | Bucket | Bucket mirrors reporting.Bucket without the time zone, which comes from the request (D3). |
definition.widgets[].source.columns | array of string | |
definition.widgets[].source.dataset | string | |
definition.widgets[].source.filters | array of Filter | |
definition.widgets[].source.groupBy | string | |
definition.widgets[].source.key | string | |
definition.widgets[].source.limit | integer | |
definition.widgets[].source.metric | Metric | Metric mirrors reporting.Metric with JSON tags (D15). |
definition.widgets[].source.params | object | |
definition.widgets[].source.query | object | |
definition.widgets[].source.sort | array of SortKey | |
definition.widgets[].source.surface | string | |
definition.widgets[].source.typerequired | string | |
definition.widgets[].source.viewId | string | |
definition.widgets[].source.viewName | string | |
definition.widgets[].target | number or null | double. |
definition.widgets[].thresholds | Thresholds | Thresholds (D4). |
definition.widgets[].thresholds.badrequired | number | double. |
definition.widgets[].thresholds.basisrequired | string | |
definition.widgets[].thresholds.directionrequired | string | |
definition.widgets[].thresholds.warnrequired | number | double. |
definition.widgets[].titlerequired | string | |
facerequired | string | |
idrequired | string | |
minerequired | boolean | |
namerequired | string | |
ownerrequired | OwnerRef | OwnerRef names a dashboard's owner. |
owner.namerequired | string | |
rolesrequired | array of RoleRef | |
roles[].idrequired | string | |
roles[].namerequired | string | |
rowVersionrequired | integer | int64. |
sharingrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X PUT 'https://depot.example.com/api/v1/console/dashboards/<id>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '{ "definition": { "range": { "from": "string", "preset": "string", "to": "string" }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": false, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0 }, "mine": false, "range": { "from": "string", "preset": "string", "to": "string" }, "source": { "as": "count", "bucket": { "column": null, "unit": null }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": null, "op": null }, "params": { "key": null }, "query": { "key": null }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string" }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0 }, "title": "string" } ] }, "face": "string", "name": "string", "roles": [ "string" ], "sharing": "string"}'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'{ "definition": { "range": { "from": "string", "preset": "string", "to": "string" }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": false, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0 }, "mine": false, "range": { "from": "string", "preset": "string", "to": "string" }, "source": { "as": "count", "bucket": { "column": null, "unit": null }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": null, "op": null }, "params": { "key": null }, "query": { "key": null }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string" }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0 }, "title": "string" } ] }, "face": "string", "name": "string", "roles": [ "string" ], "sharing": "string"}'@
$response = Invoke-RestMethod ` -Method Put ` -Uri 'https://depot.example.com/api/v1/console/dashboards/<id>' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/console/dashboards/<id>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = { "definition": { "range": { "from": "string", "preset": "string", "to": "string", }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": False, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0, }, "mine": False, "range": { "from": "string", "preset": "string", "to": "string", }, "source": { "as": "count", "bucket": { "column": None, "unit": None, }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": None, "op": None, }, "params": { "key": None, }, "query": { "key": None, }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string", }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0, }, "title": "string", }, ], }, "face": "string", "name": "string", "roles": [ "string", ], "sharing": "string",}
response = requests.put(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`{ "definition": { "range": { "from": "string", "preset": "string", "to": "string" }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": false, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0 }, "mine": false, "range": { "from": "string", "preset": "string", "to": "string" }, "source": { "as": "count", "bucket": { "column": null, "unit": null }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": null, "op": null }, "params": { "key": null }, "query": { "key": null }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string" }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0 }, "title": "string" } ] }, "face": "string", "name": "string", "roles": [ "string" ], "sharing": "string"}`)
req, err := http.NewRequest(http.MethodPut, "https://depot.example.com/api/v1/console/dashboards/<id>", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/console/dashboards/<id>";
const response = await fetch(url, { method: "PUT", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify({ "definition": { "range": { "from": "string", "preset": "string", "to": "string" }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": false, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0 }, "mine": false, "range": { "from": "string", "preset": "string", "to": "string" }, "source": { "as": "count", "bucket": { "column": null, "unit": null }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": null, "op": null }, "params": { "key": null }, "query": { "key": null }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string" }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0 }, "title": "string" } ] }, "face": "string", "name": "string", "roles": [ "string" ], "sharing": "string" }),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """{ "definition": { "range": { "from": "string", "preset": "string", "to": "string" }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": false, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0 }, "mine": false, "range": { "from": "string", "preset": "string", "to": "string" }, "source": { "as": "count", "bucket": { "column": null, "unit": null }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": null, "op": null }, "params": { "key": null }, "query": { "key": null }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string" }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0 }, "title": "string" } ] }, "face": "string", "name": "string", "roles": [ "string" ], "sharing": "string"}""";
var request = new HttpRequestMessage(HttpMethod.Put, "https://depot.example.com/api/v1/console/dashboards/<id>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());DELETE /api/v1/console/dashboards/{id}
Section titled “DELETE /api/v1/console/dashboards/{id}”DELETEshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
deleteDashboard removes a dashboard (soft delete).
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
204 | None | Success, with no body. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | Authentication is required. |
403 | application/problem+json, ProblemDetails | Sharing dashboards and changing shared ones needs the Dashboards permission. |
404 | application/problem+json, ProblemDetails | No dashboard matches that id. |
405 | application/problem+json, ProblemDetails | Built-in dashboards cannot be changed. Copy it to make your own. |
500 | application/problem+json, ProblemDetails | Could not evaluate permissions. |
503 | application/problem+json, ProblemDetails | Dashboards are not available on this server. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X DELETE 'https://depot.example.com/api/v1/console/dashboards/<id>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Delete ` -Uri 'https://depot.example.com/api/v1/console/dashboards/<id>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/console/dashboards/<id>"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.delete(url, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodDelete, "https://depot.example.com/api/v1/console/dashboards/<id>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/console/dashboards/<id>";
const response = await fetch(url, { method: "DELETE", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Delete, "https://depot.example.com/api/v1/console/dashboards/<id>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/console/dashboards/{id}/copy
Section titled “POST /api/v1/console/dashboards/{id}/copy”POSTshared facehosteditmspremoteNot fully resolved
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
What this page does not know
- response-status
These are parts of the route the extractor could not read from the source. Everything else on this page came straight from it.
Source: [object Object]
copyDashboard makes a private copy of a dashboard or builtin the caller can open, named “<name> (copy)” unless a name is sent.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | |
clientId | query | string | No | |
face | query | string | No |
Request body
Section titled “Request body”Required, sent as application/json.
| Field | Type | Description |
|---|---|---|
name | string |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, Detail | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | Authentication is required. |
404 | application/problem+json, ProblemDetails | No dashboard matches that id. |
500 | application/problem+json, ProblemDetails | Could not evaluate permissions. |
503 | application/problem+json, ProblemDetails | Dashboards are not available on this server. |
200 response body
| Field | Type | Description |
|---|---|---|
builtinrequired | boolean | |
canEditrequired | boolean | |
definitionrequired | Definition | Definition is the stored dashboard ("Dashboard"."DefinitionJson"). |
definition.rangerequired | Range | Range is a preset, or custom with RFC3339 From and To. |
definition.range.from | string | |
definition.range.presetrequired | string | |
definition.range.to | string | |
definition.versionrequired | integer | |
definition.widgetsrequired | array of Widget | |
definition.widgets[].chart | string | |
definition.widgets[].compare | string | |
definition.widgets[].drill | boolean or null | |
definition.widgets[].idrequired | string | |
definition.widgets[].kindrequired | string | |
definition.widgets[].layoutrequired | Layout | Layout is library-neutral, on 12 columns (D16). |
definition.widgets[].layout.hrequired | integer | |
definition.widgets[].layout.wrequired | integer | |
definition.widgets[].layout.xrequired | integer | |
definition.widgets[].layout.yrequired | integer | |
definition.widgets[].mine | boolean | |
definition.widgets[].range | Range | Range is a preset, or custom with RFC3339 From and To. |
definition.widgets[].range.from | string | |
definition.widgets[].range.presetrequired | string | |
definition.widgets[].range.to | string | |
definition.widgets[].sourcerequired | Source | Source is one struct with a Type discriminator (D2). |
definition.widgets[].source.as | string, one of count, list | |
definition.widgets[].source.bucket | Bucket | Bucket mirrors reporting.Bucket without the time zone, which comes from the request (D3). |
definition.widgets[].source.columns | array of string | |
definition.widgets[].source.dataset | string | |
definition.widgets[].source.filters | array of Filter | |
definition.widgets[].source.groupBy | string | |
definition.widgets[].source.key | string | |
definition.widgets[].source.limit | integer | |
definition.widgets[].source.metric | Metric | Metric mirrors reporting.Metric with JSON tags (D15). |
definition.widgets[].source.params | object | |
definition.widgets[].source.query | object | |
definition.widgets[].source.sort | array of SortKey | |
definition.widgets[].source.surface | string | |
definition.widgets[].source.typerequired | string | |
definition.widgets[].source.viewId | string | |
definition.widgets[].source.viewName | string | |
definition.widgets[].target | number or null | double. |
definition.widgets[].thresholds | Thresholds | Thresholds (D4). |
definition.widgets[].thresholds.badrequired | number | double. |
definition.widgets[].thresholds.basisrequired | string | |
definition.widgets[].thresholds.directionrequired | string | |
definition.widgets[].thresholds.warnrequired | number | double. |
definition.widgets[].titlerequired | string | |
facerequired | string | |
idrequired | string | |
minerequired | boolean | |
namerequired | string | |
ownerrequired | OwnerRef | OwnerRef names a dashboard's owner. |
owner.namerequired | string | |
rolesrequired | array of RoleRef | |
roles[].idrequired | string | |
roles[].namerequired | string | |
rowVersionrequired | integer | int64. |
sharingrequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.curl -X POST 'https://depot.example.com/api/v1/console/dashboards/<id>/copy?clientId=<clientId>&face=<face>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '{ "name": "string"}'# Sign in first. outpost_console is a session cookie, so send it with every request.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'{ "name": "string"}'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/console/dashboards/<id>/copy?clientId=<clientId>&face=<face>' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.
import requests
url = "https://depot.example.com/api/v1/console/dashboards/<id>/copy"params = { "clientId": "<clientId>", "face": "<face>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = { "name": "string",}
response = requests.post(url, params=params, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`{ "name": "string"}`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/console/dashboards/<id>/copy?clientId=<clientId>&face=<face>", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// The session cookie is set by signing in. A script cannot set it itself.
const url = new URL("https://depot.example.com/api/v1/console/dashboards/<id>/copy");url.searchParams.set("clientId", "<clientId>");url.searchParams.set("face", "<face>");
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify({ "name": "string" }),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """{ "name": "string"}""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/console/dashboards/<id>/copy?clientId=<clientId>&face=<face>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/console/dashboards/{id}/data
Section titled “GET /api/v1/console/dashboards/{id}/data”GETshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
dashboardData reads a dashboard’s widgets for the caller (D7).
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | |
clientId | query | string | No | |
face | query | string | No | |
from | query | string | No | |
range | query | string | No | |
siteId | query | string | No | |
to | query | string | No | |
tz | query | string | No | |
widgets | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, Data | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | Authentication is required. |
404 | application/problem+json, ProblemDetails | No dashboard matches that id. |
500 | application/problem+json, ProblemDetails | Could not evaluate permissions. |
503 | application/problem+json, ProblemDetails | Dashboards are not available on this server. |
200 response body
| Field | Type | Description |
|---|---|---|
fleetEmpty | boolean | |
generatedAtrequired | string (date-time) | |
rangerequired | DataRange | DataRange is the resolved dashboard range. |
range.fromrequired | string (date-time) | |
range.torequired | string (date-time) | |
scoperequired | DataScope | DataScope drives the "9 of 12 clients" banner. |
scope.clientName | string | |
scope.clientsrequired | integer | |
scope.kindrequired | string, one of client, practice | |
scope.unavailableClientsrequired | array of string | |
widgetsrequired | object |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/console/dashboards/<id>/data?clientId=<clientId>&face=<face>&from=<from>&range=<range>&siteId=<siteId>&to=<to>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/console/dashboards/<id>/data?clientId=<clientId>&face=<face>&from=<from>&range=<range>&siteId=<siteId>&to=<to>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/console/dashboards/<id>/data"params = { "clientId": "<clientId>", "face": "<face>", "from": "<from>", "range": "<range>", "siteId": "<siteId>", "to": "<to>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, params=params, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/console/dashboards/<id>/data?clientId=<clientId>&face=<face>&from=<from>&range=<range>&siteId=<siteId>&to=<to>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = new URL("https://depot.example.com/api/v1/console/dashboards/<id>/data");url.searchParams.set("clientId", "<clientId>");url.searchParams.set("face", "<face>");url.searchParams.set("from", "<from>");url.searchParams.set("range", "<range>");url.searchParams.set("siteId", "<siteId>");url.searchParams.set("to", "<to>");
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/console/dashboards/<id>/data?clientId=<clientId>&face=<face>&from=<from>&range=<range>&siteId=<siteId>&to=<to>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/console/dashboards/catalog
Section titled “GET /api/v1/console/dashboards/catalog”GETshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
dashboardCatalog lists what a widget can show on a face: the builtin widgets, the report datasets the caller may run, and the list surfaces a saved view can be pinned from.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientId | query | string | No | |
face | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, Catalog | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | Authentication is required. |
404 | application/problem+json, ProblemDetails | There are no practice dashboards here. |
500 | application/problem+json, ProblemDetails | Could not evaluate permissions. |
503 | application/problem+json, ProblemDetails | Dashboards are not available on this server. |
200 response body
| Field | Type | Description |
|---|---|---|
builtinsrequired | array of CatalogBuiltin | |
builtins[].defaultTitlerequired | string | |
builtins[].descriptionrequired | string | |
builtins[].keyrequired | string | |
builtins[].kindsrequired | array of string | |
builtins[].permissionArearequired | string | |
builtins[].rangeAppliesrequired | boolean | |
builtins[].supportsMinerequired | boolean | |
builtins[].titlerequired | string | |
datasetsrequired | array of CatalogDataset | |
datasets[].columnsrequired | array of CatalogColumn | |
datasets[].columns[].keyrequired | string | |
datasets[].columns[].titlerequired | string | |
datasets[].columns[].typerequired | string | |
datasets[].namerequired | string | |
datasets[].timeColumnsrequired | array of string | |
datasets[].titlerequired | string | |
viewsrequired | array of CatalogView | |
views[].surfacerequired | string | |
views[].titlerequired | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/console/dashboards/catalog?clientId=<clientId>&face=<face>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/console/dashboards/catalog?clientId=<clientId>&face=<face>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/console/dashboards/catalog"params = { "clientId": "<clientId>", "face": "<face>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, params=params, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/console/dashboards/catalog?clientId=<clientId>&face=<face>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = new URL("https://depot.example.com/api/v1/console/dashboards/catalog");url.searchParams.set("clientId", "<clientId>");url.searchParams.set("face", "<face>");
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/console/dashboards/catalog?clientId=<clientId>&face=<face>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());GET /api/v1/console/dashboards/defaults
Section titled “GET /api/v1/console/dashboards/defaults”GETdashboard:manageshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
getDefaults reads the practice, role, client and portal defaults for a face.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientId | query | string | No | |
face | query | string | No |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, Defaults | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | Authentication is required. |
403 | application/problem+json, ProblemDetails | The identity does not hold dashboard:manage. |
404 | application/problem+json, ProblemDetails | There are no practice dashboards here. |
500 | application/problem+json, ProblemDetails | Could not evaluate permissions. |
503 | application/problem+json, ProblemDetails | Dashboards are not available on this server. |
200 response body
| Field | Type | Description |
|---|---|---|
clientsrequired | array of ClientDefault | |
clients[].clientIdrequired | string | |
clients[].target | Target | Target is a pick target: a saved dashboard or a builtin key, exactly one. |
clients[].target.builtinKey | string | |
clients[].target.dashboardId | string | |
facerequired | string | |
portalrequired | array of ClientDefault | |
portal[].clientIdrequired | string | |
portal[].target | Target | Target is a pick target: a saved dashboard or a builtin key, exactly one. |
portal[].target.builtinKey | string | |
portal[].target.dashboardId | string | |
practice | Target | Target is a pick target: a saved dashboard or a builtin key, exactly one. |
practice.builtinKey | string | |
practice.dashboardId | string | |
rolesrequired | array of RoleDefault | |
roles[].roleIdrequired | string | |
roles[].target | Target | Target is a pick target: a saved dashboard or a builtin key, exactly one. |
roles[].target.builtinKey | string | |
roles[].target.dashboardId | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X GET 'https://depot.example.com/api/v1/console/dashboards/defaults?clientId=<clientId>&face=<face>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -b 'outpost_console=<console-session>'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$response = Invoke-RestMethod ` -Method Get ` -Uri 'https://depot.example.com/api/v1/console/dashboards/defaults?clientId=<clientId>&face=<face>' ` -Headers $headers
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/console/dashboards/defaults"params = { "clientId": "<clientId>", "face": "<face>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json",}cookies = { "outpost_console": "<console-session>",}
response = requests.get(url, params=params, headers=headers, cookies=cookies, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "fmt" "io" "log" "net/http")
func main() { req, err := http.NewRequest(http.MethodGet, "https://depot.example.com/api/v1/console/dashboards/defaults?clientId=<clientId>&face=<face>", nil) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = new URL("https://depot.example.com/api/v1/console/dashboards/defaults");url.searchParams.set("clientId", "<clientId>");url.searchParams.set("face", "<face>");
const response = await fetch(url, { method: "GET", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", }, credentials: "include",});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;
using var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://depot.example.com/api/v1/console/dashboards/defaults?clientId=<clientId>&face=<face>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());PUT /api/v1/console/dashboards/defaults
Section titled “PUT /api/v1/console/dashboards/defaults”PUTdashboard:manageshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
setDefaults changes the practice, role, client and portal defaults on a face (L26): practice and roles are replaced only when their key is sent; each clients and portal entry is an upsert for that client, and a null target clears it; clients not named are untouched.
Request body
Section titled “Request body”Required, sent as application/json.
The body is object.
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, Defaults | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | Authentication is required. |
403 | application/problem+json, ProblemDetails | The identity does not hold dashboard:manage. |
500 | application/problem+json, ProblemDetails | Could not evaluate permissions. |
503 | application/problem+json, ProblemDetails | Dashboards are not available on this server. |
200 response body
| Field | Type | Description |
|---|---|---|
clientsrequired | array of ClientDefault | |
clients[].clientIdrequired | string | |
clients[].target | Target | Target is a pick target: a saved dashboard or a builtin key, exactly one. |
clients[].target.builtinKey | string | |
clients[].target.dashboardId | string | |
facerequired | string | |
portalrequired | array of ClientDefault | |
portal[].clientIdrequired | string | |
portal[].target | Target | Target is a pick target: a saved dashboard or a builtin key, exactly one. |
portal[].target.builtinKey | string | |
portal[].target.dashboardId | string | |
practice | Target | Target is a pick target: a saved dashboard or a builtin key, exactly one. |
practice.builtinKey | string | |
practice.dashboardId | string | |
rolesrequired | array of RoleDefault | |
roles[].roleIdrequired | string | |
roles[].target | Target | Target is a pick target: a saved dashboard or a builtin key, exactly one. |
roles[].target.builtinKey | string | |
roles[].target.dashboardId | string |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X PUT 'https://depot.example.com/api/v1/console/dashboards/defaults' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '{ "key": "string"}'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'{ "key": "string"}'@
$response = Invoke-RestMethod ` -Method Put ` -Uri 'https://depot.example.com/api/v1/console/dashboards/defaults' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/console/dashboards/defaults"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = { "key": "string",}
response = requests.put(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`{ "key": "string"}`)
req, err := http.NewRequest(http.MethodPut, "https://depot.example.com/api/v1/console/dashboards/defaults", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/console/dashboards/defaults";
const response = await fetch(url, { method: "PUT", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify({ "key": "string" }),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """{ "key": "string"}""";
var request = new HttpRequestMessage(HttpMethod.Put, "https://depot.example.com/api/v1/console/dashboards/defaults");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());PUT /api/v1/console/dashboards/my-default
Section titled “PUT /api/v1/console/dashboards/my-default”PUTshared facehosteditmspremoteIdempotent
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
setMyDefault sets or clears the caller’s own default for a face.
Request body
Section titled “Request body”Required, sent as application/json.
| Field | Type | Description |
|---|---|---|
facerequired | string | |
target | Target | Target is a pick target: a saved dashboard or a builtin key, exactly one. |
target.builtinKey | string | |
target.dashboardId | string |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
204 | None | Success, with no body. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | Authentication is required. |
500 | application/problem+json, ProblemDetails | Could not evaluate permissions. |
503 | application/problem+json, ProblemDetails | Dashboards are not available on this server. |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.curl -X PUT 'https://depot.example.com/api/v1/console/dashboards/my-default' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '{ "face": "string", "target": { "builtinKey": "string", "dashboardId": "string" }}'# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'{ "face": "string", "target": { "builtinKey": "string", "dashboardId": "string" }}'@
$response = Invoke-RestMethod ` -Method Put ` -Uri 'https://depot.example.com/api/v1/console/dashboards/my-default' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.# This operation is idempotent. Repeating it does not repeat its effect.
import requests
url = "https://depot.example.com/api/v1/console/dashboards/my-default"headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = { "face": "string", "target": { "builtinKey": "string", "dashboardId": "string", },}
response = requests.put(url, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`{ "face": "string", "target": { "builtinKey": "string", "dashboardId": "string" }}`)
req, err := http.NewRequest(http.MethodPut, "https://depot.example.com/api/v1/console/dashboards/my-default", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.// The session cookie is set by signing in. A script cannot set it itself.
const url = "https://depot.example.com/api/v1/console/dashboards/my-default";
const response = await fetch(url, { method: "PUT", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify({ "face": "string", "target": { "builtinKey": "string", "dashboardId": "string" } }),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.// This operation is idempotent. Repeating it does not repeat its effect.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """{ "face": "string", "target": { "builtinKey": "string", "dashboardId": "string" }}""";
var request = new HttpRequestMessage(HttpMethod.Put, "https://depot.example.com/api/v1/console/dashboards/my-default");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());POST /api/v1/console/dashboards/preview
Section titled “POST /api/v1/console/dashboards/preview”POSTshared facehosteditmspremote
From an MSP console, prefix the path with /api/v1/clients/{clientID} to reach one client.
Source: [object Object]
previewDashboard reads an unsaved definition, for the editor.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
clientId | query | string | No | |
from | query | string | No | |
range | query | string | No | |
siteId | query | string | No | |
to | query | string | No | |
tz | query | string | No | |
widgets | query | string | No |
Request body
Section titled “Request body”Required, sent as application/json.
| Field | Type | Description |
|---|---|---|
definitionrequired | Definition | Definition is the stored dashboard ("Dashboard"."DefinitionJson"). |
definition.rangerequired | Range | Range is a preset, or custom with RFC3339 From and To. |
definition.range.from | string | |
definition.range.presetrequired | string | |
definition.range.to | string | |
definition.versionrequired | integer | |
definition.widgetsrequired | array of Widget | |
definition.widgets[].chart | string | |
definition.widgets[].compare | string | |
definition.widgets[].drill | boolean or null | |
definition.widgets[].idrequired | string | |
definition.widgets[].kindrequired | string | |
definition.widgets[].layoutrequired | Layout | Layout is library-neutral, on 12 columns (D16). |
definition.widgets[].layout.hrequired | integer | |
definition.widgets[].layout.wrequired | integer | |
definition.widgets[].layout.xrequired | integer | |
definition.widgets[].layout.yrequired | integer | |
definition.widgets[].mine | boolean | |
definition.widgets[].range | Range | Range is a preset, or custom with RFC3339 From and To. |
definition.widgets[].range.from | string | |
definition.widgets[].range.presetrequired | string | |
definition.widgets[].range.to | string | |
definition.widgets[].sourcerequired | Source | Source is one struct with a Type discriminator (D2). |
definition.widgets[].source.as | string, one of count, list | |
definition.widgets[].source.bucket | Bucket | Bucket mirrors reporting.Bucket without the time zone, which comes from the request (D3). |
definition.widgets[].source.columns | array of string | |
definition.widgets[].source.dataset | string | |
definition.widgets[].source.filters | array of Filter | |
definition.widgets[].source.groupBy | string | |
definition.widgets[].source.key | string | |
definition.widgets[].source.limit | integer | |
definition.widgets[].source.metric | Metric | Metric mirrors reporting.Metric with JSON tags (D15). |
definition.widgets[].source.params | object | |
definition.widgets[].source.query | object | |
definition.widgets[].source.sort | array of SortKey | |
definition.widgets[].source.surface | string | |
definition.widgets[].source.typerequired | string | |
definition.widgets[].source.viewId | string | |
definition.widgets[].source.viewName | string | |
definition.widgets[].target | number or null | double. |
definition.widgets[].thresholds | Thresholds | Thresholds (D4). |
definition.widgets[].thresholds.badrequired | number | double. |
definition.widgets[].thresholds.basisrequired | string | |
definition.widgets[].thresholds.directionrequired | string | |
definition.widgets[].thresholds.warnrequired | number | double. |
definition.widgets[].titlerequired | string | |
facerequired | string |
Responses
Section titled “Responses”| Status | Body | Description |
|---|---|---|
200 | application/json, Data | Success. |
400 | application/problem+json, ProblemDetails | One or more validation errors occurred. |
401 | application/problem+json, ProblemDetails | Authentication is required. |
404 | application/problem+json, ProblemDetails | There are no practice dashboards here. |
500 | application/problem+json, ProblemDetails | Could not evaluate permissions. |
503 | application/problem+json, ProblemDetails | Dashboards are not available on this server. |
200 response body
| Field | Type | Description |
|---|---|---|
fleetEmpty | boolean | |
generatedAtrequired | string (date-time) | |
rangerequired | DataRange | DataRange is the resolved dashboard range. |
range.fromrequired | string (date-time) | |
range.torequired | string (date-time) | |
scoperequired | DataScope | DataScope drives the "9 of 12 clients" banner. |
scope.clientName | string | |
scope.clientsrequired | integer | |
scope.kindrequired | string, one of client, practice | |
scope.unavailableClientsrequired | array of string | |
widgetsrequired | object |
Request samples
Section titled “Request samples”# Sign in first. outpost_console is a session cookie, so send it with every request.curl -X POST 'https://depot.example.com/api/v1/console/dashboards/preview?clientId=<clientId>&from=<from>&range=<range>&siteId=<siteId>&to=<to>&tz=<tz>' \ -H 'X-CSRF-Token: <csrf-token>' \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -b 'outpost_console=<console-session>' \ --data '{ "definition": { "range": { "from": "string", "preset": "string", "to": "string" }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": false, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0 }, "mine": false, "range": { "from": "string", "preset": "string", "to": "string" }, "source": { "as": "count", "bucket": { "column": null, "unit": null }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": null, "op": null }, "params": { "key": null }, "query": { "key": null }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string" }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0 }, "title": "string" } ] }, "face": "string"}'# Sign in first. outpost_console is a session cookie, so send it with every request.
$headers = @{ 'X-CSRF-Token' = '<csrf-token>' 'Accept' = 'application/json' 'Content-Type' = 'application/json' 'Cookie' = 'outpost_console=<console-session>'}
$body = @'{ "definition": { "range": { "from": "string", "preset": "string", "to": "string" }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": false, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0 }, "mine": false, "range": { "from": "string", "preset": "string", "to": "string" }, "source": { "as": "count", "bucket": { "column": null, "unit": null }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": null, "op": null }, "params": { "key": null }, "query": { "key": null }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string" }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0 }, "title": "string" } ] }, "face": "string"}'@
$response = Invoke-RestMethod ` -Method Post ` -Uri 'https://depot.example.com/api/v1/console/dashboards/preview?clientId=<clientId>&from=<from>&range=<range>&siteId=<siteId>&to=<to>&tz=<tz>' ` -Headers $headers ` -ContentType 'application/json' ` -Body $body
$response | ConvertTo-Json -Depth 10# Sign in first. outpost_console is a session cookie, so send it with every request.
import requests
url = "https://depot.example.com/api/v1/console/dashboards/preview"params = { "clientId": "<clientId>", "from": "<from>", "range": "<range>", "siteId": "<siteId>", "to": "<to>", "tz": "<tz>",}headers = { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json",}cookies = { "outpost_console": "<console-session>",}payload = { "definition": { "range": { "from": "string", "preset": "string", "to": "string", }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": False, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0, }, "mine": False, "range": { "from": "string", "preset": "string", "to": "string", }, "source": { "as": "count", "bucket": { "column": None, "unit": None, }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": None, "op": None, }, "params": { "key": None, }, "query": { "key": None, }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string", }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0, }, "title": "string", }, ], }, "face": "string",}
response = requests.post(url, params=params, headers=headers, cookies=cookies, json=payload, timeout=30)response.raise_for_status()print(response.json())// Sign in first. outpost_console is a session cookie, so send it with every request.package main
import ( "bytes" "fmt" "io" "log" "net/http")
func main() { body := []byte(`{ "definition": { "range": { "from": "string", "preset": "string", "to": "string" }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": false, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0 }, "mine": false, "range": { "from": "string", "preset": "string", "to": "string" }, "source": { "as": "count", "bucket": { "column": null, "unit": null }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": null, "op": null }, "params": { "key": null }, "query": { "key": null }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string" }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0 }, "title": "string" } ] }, "face": "string"}`)
req, err := http.NewRequest(http.MethodPost, "https://depot.example.com/api/v1/console/dashboards/preview?clientId=<clientId>&from=<from>&range=<range>&siteId=<siteId>&to=<to>&tz=<tz>", bytes.NewReader(body)) if err != nil { log.Fatal(err) }
req.Header.Set("X-CSRF-Token", "<csrf-token>") req.Header.Set("Accept", "application/json") req.Header.Set("Content-Type", "application/json") req.AddCookie(&http.Cookie{Name: "outpost_console", Value: "<console-session>"})
resp, err := http.DefaultClient.Do(req) if err != nil { log.Fatal(err) } defer resp.Body.Close()
out, err := io.ReadAll(resp.Body) if err != nil { log.Fatal(err) } fmt.Println(resp.Status, string(out))}// Sign in first. outpost_console is a session cookie, so send it with every request.// The session cookie is set by signing in. A script cannot set it itself.
const url = new URL("https://depot.example.com/api/v1/console/dashboards/preview");url.searchParams.set("clientId", "<clientId>");url.searchParams.set("from", "<from>");url.searchParams.set("range", "<range>");url.searchParams.set("siteId", "<siteId>");url.searchParams.set("to", "<to>");url.searchParams.set("tz", "<tz>");
const response = await fetch(url, { method: "POST", headers: { "X-CSRF-Token": "<csrf-token>", "Accept": "application/json", "Content-Type": "application/json", }, credentials: "include", body: JSON.stringify({ "definition": { "range": { "from": "string", "preset": "string", "to": "string" }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": false, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0 }, "mine": false, "range": { "from": "string", "preset": "string", "to": "string" }, "source": { "as": "count", "bucket": { "column": null, "unit": null }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": null, "op": null }, "params": { "key": null }, "query": { "key": null }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string" }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0 }, "title": "string" } ] }, "face": "string" }),});
if (!response.ok) { throw new Error(`Request failed with status ${response.status}`);}
const data = await response.json();console.log(data);// Sign in first. outpost_console is a session cookie, so send it with every request.
using System;using System.Net.Http;using System.Text;
using var client = new HttpClient();
const string body = """{ "definition": { "range": { "from": "string", "preset": "string", "to": "string" }, "version": 0, "widgets": [ { "chart": "string", "compare": "string", "drill": false, "id": "string", "kind": "string", "layout": { "h": 0, "w": 0, "x": 0, "y": 0 }, "mine": false, "range": { "from": "string", "preset": "string", "to": "string" }, "source": { "as": "count", "bucket": { "column": null, "unit": null }, "columns": [], "dataset": "string", "filters": [], "groupBy": "string", "key": "string", "limit": 0, "metric": { "column": null, "op": null }, "params": { "key": null }, "query": { "key": null }, "sort": [], "surface": "string", "type": "string", "viewId": "string", "viewName": "string" }, "target": 0, "thresholds": { "bad": 0, "basis": "string", "direction": "string", "warn": 0 }, "title": "string" } ] }, "face": "string"}""";
var request = new HttpRequestMessage(HttpMethod.Post, "https://depot.example.com/api/v1/console/dashboards/preview?clientId=<clientId>&from=<from>&range=<range>&siteId=<siteId>&to=<to>&tz=<tz>");request.Headers.TryAddWithoutValidation("X-CSRF-Token", "<csrf-token>");request.Headers.TryAddWithoutValidation("Accept", "application/json");request.Headers.TryAddWithoutValidation("Cookie", "outpost_console=<console-session>");request.Content = new StringContent(body, Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);response.EnsureSuccessStatusCode();Console.WriteLine(await response.Content.ReadAsStringAsync());Content is licensed CC BY 4.0. Code samples are MIT. Outpost and the Outpost mark are trademarks of Outpost Business Solutions, PBC and are not covered by either license.