> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/xdr-5-api/cortex-platform/dashboards.md).

# Dashboards

APIs for managing Dashboards

## Get 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. <br>

```json
{"openapi":"3.0.0","info":{"title":"Cortex XDR Platform APIs","version":"Cortex XDR 5.2"},"tags":[{"name":"Dashboards","description":"APIs for managing Dashboards"}],"servers":[{"url":"https://api-yourfqdn"}],"paths":{"/public_api/v1/dashboards/get":{"post":{"summary":"Get dashboards","tags":["Dashboards"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"objects_count":{"type":"integer"},"objects":{"type":"array","items":{"type":"object","properties":{"dashboards_data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"status":{"type":"string"},"layout":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"data":{"type":"object","properties":{"type":{"type":"string"},"width":{"type":"number"},"height":{"type":"integer"},"time_frame":{"type":"object","properties":{"relativeTime":{"type":"integer"}}},"alerts_or_incidents":{"type":"string"},"params":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"phrase":{"type":"string"},"viewOptions":{"type":"object","properties":{"type":{"type":"string"},"commands":{"type":"array","items":{"type":"object","properties":{"command":{"type":"object","properties":{"op":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}}}}}}}}}}}}}}}},"default_dashboard_id":{"type":"integer"},"global_id":{"type":"string"},"metadata":{"type":"object","properties":{"params":{"type":"array","items":{"type":"object","properties":{}}}}}}}},"widgets_data":{"type":"array","items":{"type":"object","properties":{"widget_key":{"type":"string"},"title":{"type":"string"},"creation_time":{"type":"integer"},"description":{"type":"string"},"data":{"type":"object","properties":{"params":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}}},"phrase":{"type":"string"},"time_frame":{"type":"object","properties":{"relativeTime":{"type":"integer"}}},"viewOptions":{"type":"object","properties":{"type":{"type":"string"},"commands":{"type":"array","items":{"type":"object","properties":{"command":{"type":"object","properties":{"op":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}}}}}}}}}},"support_time_range":{"type":"boolean"},"additional_info":{"type":"object","properties":{"query_tables":{"type":"array","items":{"type":"string"}},"query_uses_library":{"type":"boolean"}}},"creator_mail":{"type":"string"}}}}}}},"objects_type":{"type":"string"}}}}}},"599":{"description":"Invalid field or operator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}}},"operationId":"post-public_api-v1-dashboards-get","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["request_data"],"properties":{"request_data":{"type":"object","properties":{"filters":{"type":"array","description":"An array of filter fields.","items":{"type":"object","properties":{"field":{"enum":["dashboard_id","name","time_generated","source"],"description":"Identifies the dashboard field the filter is matching. Filters are based on the following keywords:\r\n- `dashboard_id`: Dashboard ID.\r\n- `name`: Dashboard name.\r\n- `time_generated`: Time the dashboard was generated in epoch milliseconds.\r\n- `source`: Dashboard source."},"operator":{"enum":["EQ","NEQ","IN","GTE","LTE"],"description":"Identifies the comparison operator you want to use for this filter. Valid keywords are:\r\n`EQ` / `NEQ`\r\n- `dashboard_id`: Integer\r\n- `name`: String\r\n- `source`: String\r\n\r\n`IN`\r\n- `dashboard_id`: List of integers\r\n- `name`: List of strings\r\n- `source`: List of strings\r\n\r\n`gte` / `lte`\r\n- `time_generated`: Integer representing the time the dashboard was generated in epoch milliseconds.\r\n- `dashboard_id`: Integer representing the dashboard ID"},"value":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"array","items":{"type":"string"}}],"description":"Value that this filter must match. The contents of this field will differ depending on the dashboard field that you specified for this filter:\r\n- `name`, `source`: String or list of strings.\r\n- `time_generated`: Integer.\r\n- `dashboard_id`: Integer or list of integers.","items":{}}}}}}}}}}}},"description":"Get dashboard details by filtering based on the dashboard name, dashboard ID, time the dashboard was generated, or dashboard source.\r\n\r\nYou must have **Instance Administrator** permissions to run this endpoint.\r\n","parameters":[{"schema":{"type":"string"},"in":"header","name":"Authorization","description":"{api_key}","required":true},{"schema":{"type":"string"},"in":"header","name":"x-xdr-auth-id","description":"{api_key_id}","required":true}]}}},"components":{"schemas":{"reply":{"type":"object","title":"reply","description":"The query result upon error.","properties":{"err_code":{"type":"string","description":"HTTP response code."},"err_msg":{"type":"string","description":"Error message."},"err_extra":{"type":"string","description":"Additional information describing the error."}}}}}}
```

## Insert or update dashboards

> Add or update the dashboards retrieved by the Get dashboards API.\
> \
> You must have \*\*Instance Administrator\*\* permissions to run this endpoint.

```json
{"openapi":"3.0.0","info":{"title":"Cortex XDR Platform APIs","version":"Cortex XDR 5.2"},"tags":[{"name":"Dashboards","description":"APIs for managing Dashboards"}],"servers":[{"url":"https://api-yourfqdn"}],"paths":{"/public_api/v1/dashboards/insert":{"post":{"summary":"Insert or update dashboards","tags":["Dashboards"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"added_objects":{"type":"array","description":"Array listing the the global ID and internal ID of the objects added.","items":{"type":"object","properties":{"global_id":{"type":"string"},"internal_id":{"type":"integer"}}}},"updated_objects":{"type":"array","description":"Array listing the the global ID and internal ID of the objects updated.","items":{"type":"object","properties":{"global_id":{"type":"string"},"internal_id":{"type":"integer"}}}},"errors":{"type":"array","description":"List of errors including the global ID and the error message.","items":{"type":"object","properties":{"global_id":{"type":"string"},"error":{"type":"string"}}}}}}}}}},"operationId":"post-public_api-v1-dashboards-insert","description":"Add or update the dashboards retrieved by the Get dashboards API.\n\nYou must have **Instance Administrator** permissions to run this endpoint.","parameters":[{"schema":{"type":"string"},"in":"header","name":"Authorization","description":"{api_key}","required":true},{"schema":{"type":"string"},"in":"header","name":"x-xdr-auth-id","description":"{api_key_id}","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"request_data":{"type":"object","properties":{"dashboards_data":{"type":"array","description":"An array of dashboard details as retrieved by the Get dashboards API.","items":{"type":"object","properties":{"name":{"type":"string","description":"Dashboard name."},"description":{"type":"string","description":"Dashboard description.","nullable":true},"status":{"type":"string","description":"Dashboard status."},"layout":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"data":{"type":"object","properties":{"type":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"time_frame":{"type":"object","properties":{"relativeTime":{"type":"integer"}}},"alerts_or_incidents":{"type":"string"}}}}}}}}},"default_dashboard_id":{"type":"integer"},"global_id":{"type":"string","description":"**Note:** If no global ID is added in the request data, there might be errors with the global ID listed as \"None\"."},"metadata":{"type":"object","properties":{"params":{"type":"array","items":{"type":"object"}}}}}}},"widgets_data":{"type":"array","description":"An array of relevant XQL widget details as retrieved by the Get dashboards API.","items":{"type":"object","properties":{"widget_key":{"type":"string"},"title":{"type":"string"},"creation_time":{"type":"integer"},"description":{"type":"string","nullable":true},"data":{"type":"object","properties":{"phrase":{"type":"string"},"time_frame":{"type":"object","properties":{"relativeTime":{"type":"integer"}}},"viewOptions":{"type":"object","properties":{"type":{"type":"string"},"commands":{"type":"array","items":{"type":"object"}}}}}},"support_time_range":{"type":"boolean"},"additional_info":{"type":"object","properties":{"query_tables":{"type":"array","items":{"type":"string"}},"query_uses_library":{"type":"boolean"}}},"creator_mail":{"type":"string"}}}}}}}}}}}}}}}
```

## Delete dashboards

> Delete the dashboards retrieved by the Get dashboards API.\
> \
> You must have \*\*Instance Administrator\*\* permissions to run this endpoint.

```json
{"openapi":"3.0.0","info":{"title":"Cortex XDR Platform APIs","version":"Cortex XDR 5.2"},"tags":[{"name":"Dashboards","description":"APIs for managing Dashboards"}],"servers":[{"url":"https://api-yourfqdn"}],"paths":{"/public_api/v1/dashboards/delete":{"post":{"summary":"Delete dashboards","tags":["Dashboards"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"objects_count":{"type":"integer"},"objects":{"type":"object","properties":{"succeeded_items":{"type":"array","description":"List of the global ID and internal ID of dashboards successfully deleted.","items":{"type":"object","properties":{"global_id":{"type":"string"},"internal_id":{"type":"integer"}}}},"failures_items":{"type":"array","description":"List of global IDs and internal IDs that were not deleted and the error messages explaining why.","items":{"type":"object","properties":{"global_id":{"type":"string"},"internal_id":{"type":"integer"},"error":{"type":"string"}}}}}}}}}}},"599":{"description":"Invalid field or operator.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/reply"}}}}},"operationId":"post-public_api-v1-dashboards-delete","description":"Delete the dashboards retrieved by the Get dashboards API.\n\nYou must have **Instance Administrator** permissions to run this endpoint.","parameters":[{"schema":{"type":"string"},"in":"header","name":"Authorization","description":"{api_key}","required":true},{"schema":{"type":"string"},"in":"header","name":"x-xdr-auth-id","description":"{api_key_id}","required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["request_data"],"properties":{"request_data":{"type":"object","properties":{"filters":{"type":"array","description":"An array of filter fields.","items":{"type":"object","properties":{"field":{"description":"Identifies the dashboard field the filter is matching. Filters are based on the following keywords:\r\n- `dashboard_id`: Dashboard ID.\r\n- `name`: Dashboard name.\r\n- `time_generated`: Time the dashboard was generated in epoch milliseconds.\r\n- `source`: Dashboard source.","enum":["dashboard_id"]},"operator":{"description":"Identifies the comparison operator you want to use for this filter. Valid keywords are:\r\n`EQ` / `NEQ`\r\n- `dashboard_id`: Integer\r\n- `name`: String\r\n- `source`: String\r\n\r\n`IN`\r\n- `dashboard_id`: List of integers\r\n- `name`: List of strings\r\n- `source`: List of strings\r\n\r\n`gte` / `lte`\r\n- `time_generated`: Integer representing the time the dashboard was generated in epoch milliseconds.\r\n- `dashboard_id`': Integer representing the dashboard ID.","enum":["EQ","NEQ","IN","GTE","LTE"]},"value":{"oneOf":[{"type":"string"},{"type":"integer"},{"type":"array","items":{"type":"string"}}],"description":"Value that this filter must match. The contents of this field will differ depending on the dashboard field that you specified for this filter:\r\n- `name`, `source`: String or list of strings.\r\n- `time_generated`: Integer.\r\n- `dashboard_id`: Integer or list of integers.","items":{}}}}}}}}}}}}}}},"components":{"schemas":{"reply":{"type":"object","title":"reply","description":"The query result upon error.","properties":{"err_code":{"type":"string","description":"HTTP response code."},"err_msg":{"type":"string","description":"Error message."},"err_extra":{"type":"string","description":"Additional information describing the error."}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/xdr-5-api/cortex-platform/dashboards.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
