Dashboards
APIs for managing Dashboards
Get dashboard details by filtering based on the dashboard name, dashboard ID, time the dashboard was generated, or dashboard source.
You must have Instance Administrator permissions to run this endpoint.
Header parameters
AuthorizationstringRequired
{api_key}
x-xdr-auth-idstringRequired
{api_key_id}
Body
Responses
200
OK
application/json
objects_countintegerOptional
objects_typestringOptional
599
Invalid field or operator.
application/json
post/public_api/v1/dashboards/get
POST /public_api/v1/dashboards/get HTTP/1.1
Host: api-yourfqdn
Authorization: text
x-xdr-auth-id: text
Content-Type: application/json
Accept: */*
Content-Length: 148
{
"request_data": {
"filters": [
{
"field": "name",
"value": "Incident by Severity",
"operator": "EQ"
},
{
"field": "source",
"value": "John Doe",
"operator": "EQ"
}
]
}
}{
"objects_count": 2,
"objects": [
{
"dashboards_data": [
{
"name": "John Doe",
"description": null,
"status": "ENABLED",
"layout": [
{
"id": "row-9847",
"data": [
{
"key": "FAKE_KEY",
"data": {
"type": "Pie",
"width": 5435435,
"height": 451
}
},
{
"key": "incidentsByAssignment",
"data": {
"type": "Bar",
"width": 33.333333333333336,
"height": 451
}
},
{
"key": "incidentsHistory",
"data": {
"type": "Timeline",
"width": 33.333333333333336,
"height": 451,
"time_frame": {
"relativeTime": 86400000
},
"alerts_or_incidents": "incident"
}
}
]
},
{
"id": "row-2618",
"data": [
{
"key": "xql_1683289526210",
"data": {
"type": "Custom XQL",
"width": 33.333333333333336,
"height": 11111,
"params": [
{
"name": "name",
"value": "orik"
}
],
"phrase": "dataset = drilldown | filter name = $name\n| view graph type = gauge subtype = radial header = \"User Score\" yaxis = score maxscalerange = 100 headerfontsize = 25 ",
"time_frame": {
"relativeTime": 86400000
},
"viewOptions": {
"type": "gauge",
"commands": [
{
"command": {
"op": "=",
"name": "subtype",
"value": "radial"
}
},
{
"command": {
"op": "=",
"name": "header",
"value": "\"User Score\""
}
},
{
"command": {
"op": "=",
"name": "yaxis",
"value": "score"
}
},
{
"command": {
"op": "=",
"name": "maxscalerange",
"value": "100"
}
},
{
"command": {
"op": "=",
"name": "headerfontsize",
"value": "25"
}
}
]
}
}
},
{
"key": "topIncidentsByAlertSeverity",
"data": {
"type": "Table",
"width": 33.333333333333336,
"height": 408
}
},
{
"key": "hostsBySeverity",
"data": {
"type": "Table",
"width": 33.333333333333336,
"height": 408
}
}
]
}
],
"default_dashboard_id": 132131,
"global_id": "47052a2b17db4d799c4c5da38d203600",
"metadata": {
"params": []
}
}
],
"widgets_data": [
{
"widget_key": "xql_1683289526210",
"title": "Drilldown | User Score",
"creation_time": 1687877496472,
"description": "",
"data": {
"params": [
{
"name": "name",
"value": "orik"
}
],
"phrase": "dataset = drilldown | filter name = $name\n| view graph type = gauge subtype = radial header = \"User Score\" yaxis = score maxscalerange = 100 headerfontsize = 25 ",
"time_frame": {
"relativeTime": 86400000
},
"viewOptions": {
"type": "gauge",
"commands": [
{
"command": {
"op": "=",
"name": "subtype",
"value": "radial"
}
},
{
"command": {
"op": "=",
"name": "header",
"value": "\"User Score\""
}
},
{
"command": {
"op": "=",
"name": "yaxis",
"value": "score"
}
},
{
"command": {
"op": "=",
"name": "maxscalerange",
"value": "100"
}
},
{
"command": {
"op": "=",
"name": "headerfontsize",
"value": "25"
}
}
]
}
},
"support_time_range": true,
"additional_info": {
"query_tables": [
"drilldown"
],
"query_uses_library": false
},
"creator_mail": "user@company.com"
}
]
},
{
"dashboards_data": [
{
"name": "John Doe",
"description": null,
"status": "ENABLED",
"layout": [
{
"id": "row-9847",
"data": [
{
"key": "FAKE_KEY",
"data": {
"type": "Pie",
"width": 5435435,
"height": 451
}
},
{
"key": "incidentsByAssignment",
"data": {
"type": "Bar",
"width": 33.333333333333336,
"height": 451
}
},
{
"key": "incidentsHistory",
"data": {
"type": "Timeline",
"width": 33.333333333333336,
"height": 451,
"time_frame": {
"relativeTime": 86400000
},
"alerts_or_incidents": "incident"
}
}
]
},
{
"id": "row-2618",
"data": [
{
"key": "xql_1683289526210",
"data": {
"type": "Custom XQL",
"width": 33.333333333333336,
"height": 11111,
"params": [
{
"name": "name",
"value": "orik"
}
],
"phrase": "dataset = drilldown | filter name = $name\n| view graph type = gauge subtype = radial header = \"User Score\" yaxis = score maxscalerange = 100 headerfontsize = 25 ",
"time_frame": {
"relativeTime": 86400000
},
"viewOptions": {
"type": "gauge",
"commands": [
{
"command": {
"op": "=",
"name": "subtype",
"value": "radial"
}
},
{
"command": {
"op": "=",
"name": "header",
"value": "\"User Score\""
}
},
{
"command": {
"op": "=",
"name": "yaxis",
"value": "score"
}
},
{
"command": {
"op": "=",
"name": "maxscalerange",
"value": "100"
}
},
{
"command": {
"op": "=",
"name": "headerfontsize",
"value": "25"
}
}
]
}
}
},
{
"key": "topIncidentsByAlertSeverity",
"data": {
"type": "Table",
"width": 33.333333333333336,
"height": 408
}
},
{
"key": "hostsBySeverity",
"data": {
"type": "Table",
"width": 33.333333333333336,
"height": 408
}
}
]
}
],
"default_dashboard_id": 132131,
"global_id": "27f78777b427452eb54974d3c14bf67a",
"metadata": {
"params": []
}
}
],
"widgets_data": [
{
"widget_key": "xql_1683289526210",
"title": "Drilldown | User Score",
"creation_time": 1687877496472,
"description": "",
"data": {
"params": [
{
"name": "name",
"value": "orik"
}
],
"phrase": "dataset = drilldown | filter name = $name\n| view graph type = gauge subtype = radial header = \"User Score\" yaxis = score maxscalerange = 100 headerfontsize = 25 ",
"time_frame": {
"relativeTime": 86400000
},
"viewOptions": {
"type": "gauge",
"commands": [
{
"command": {
"op": "=",
"name": "subtype",
"value": "radial"
}
},
{
"command": {
"op": "=",
"name": "header",
"value": "\"User Score\""
}
},
{
"command": {
"op": "=",
"name": "yaxis",
"value": "score"
}
},
{
"command": {
"op": "=",
"name": "maxscalerange",
"value": "100"
}
},
{
"command": {
"op": "=",
"name": "headerfontsize",
"value": "25"
}
}
]
}
},
"support_time_range": true,
"additional_info": {
"query_tables": [
"drilldown"
],
"query_uses_library": false
},
"creator_mail": "user@company.com"
}
]
}
],
"objects_type": "dashboards"
}Add or update the dashboards retrieved by the Get dashboards API.
You must have Instance Administrator permissions to run this endpoint.
Header parameters
AuthorizationstringRequired
{api_key}
x-xdr-auth-idstringRequired
{api_key_id}
Body
Responses
200
OK
application/json
post/public_api/v1/dashboards/insert
POST /public_api/v1/dashboards/insert HTTP/1.1
Host: api-yourfqdn
Authorization: text
x-xdr-auth-id: text
Content-Type: application/json
Accept: */*
Content-Length: 1400
{
"request_data": {
"dashboards_data": [
{
"name": "John Doe",
"description": null,
"status": "ENABLED",
"layout": [
{
"id": "row-5867",
"data": [
{
"key": "FAKE_KEY",
"data": {
"type": "Pie",
"width": 5435435,
"height": 451
}
},
{
"key": "incidentsByAssignment",
"data": {
"type": "Bar",
"width": 33,
"height": 451
}
},
{
"key": "incidentsHistory",
"data": {
"type": "Timeline",
"width": 33,
"height": 451,
"time_frame": {
"relativeTime": 86400000
},
"alerts_or_incidents": "incident"
}
}
]
},
{
"id": "row-3678",
"data": [
{
"key": "xql_1583269521210",
"data": {
"type": "Custom XQL",
"width": 33,
"height": 11111,
"params": [
{
"name": "name",
"value": "orik"
}
],
"phrase": "dataset = drilldown | filter name = $name\n| view graph type = gauge subtype = radial header = \"User Score\" yaxis = score maxscalerange = 100 headerfontsize = 25 ",
"time_frame": {
"relativeTime": 86400000
},
"viewOptions": {
"type": "gauge",
"commands": [
{
"command": {
"op": "=",
"name": "subtype",
"value": "radial"
}
},
{
"command": {
"op": "=",
"name": "header",
"value": "\"User Score\""
}
},
{
"command": {
"op": "=",
"name": "yaxis",
"value": "score"
}
},
{
"command": {
"op": "=",
"name": "maxscalerange",
"value": "100"
}
},
{
"command": {
"op": "=",
"name": "headerfontsize",
"value": "25"
}
}
]
}
}
},
{
"key": "topIncidentsByAlertSeverity",
"data": {
"type": "Table",
"width": 33,
"height": 408
}
},
{
"key": "hostsBySeverity",
"data": {
"type": "Table",
"width": 33,
"height": 408
}
}
]
}
],
"default_dashboard_id": 132131,
"global_id": "47052a2b17db4d799c4c5da38d203600",
"metadata": {
"params": []
}
}
]
}
}200
OK
{
"added_objects": [
{
"global_id": "47052a2b47db4d899c4c5da32d203700",
"internal_id": 37
}
],
"updated_objects": [
{
"global_id": "27f78778b427452ed54974d6c14cf67a",
"internal_id": 44
}
],
"errors": [
{
"global_id": "a62ed1dag81741fc948720e2a1be2801",
"error": "This is the reason for the failure."
}
]
}Delete the dashboards retrieved by the Get dashboards API.
You must have Instance Administrator permissions to run this endpoint.
Header parameters
AuthorizationstringRequired
{api_key}
x-xdr-auth-idstringRequired
{api_key_id}
Body
Responses
200
OK
application/json
objects_countintegerOptional
599
Invalid field or operator.
application/json
post/public_api/v1/dashboards/delete
POST /public_api/v1/dashboards/delete HTTP/1.1
Host: api-yourfqdn
Authorization: text
x-xdr-auth-id: text
Content-Type: application/json
Accept: */*
Content-Length: 86
{
"request_data": {
"filters": [
{
"field": "dashboard_id",
"value": 132131,
"operator": "EQ"
}
]
}
}{
"objects_count": 3,
"objects": {
"succeeded_items": [
{
"global_id": "47052a2b17db4e799c4c5db38d603600",
"internal_id": 27
},
{
"global_id": "a62ab1daf82741fc948760e2e1be2401",
"internal_id": 31
}
],
"failures_items": [
{
"global_id": "25f78778b427452ec54974d3c14bf67a",
"internal_id": 55,
"error": "Dashboard is not allowed to be deleted."
}
]
}
}Last updated
Was this helpful?
