> 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/xsoar-6-api/cortex-xsoar-6.x-apis/dashboards.md).

# Dashboards

APIs for managing dashboards

## Import a dashboard

> Import a dashboard to Cortex XSOAR

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Dashboards","description":"APIs for managing dashboards"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"Dashboard":{"type":"object","title":"Dashboard ...","properties":{"accounts":{"type":"object","additionalProperties":{"type":"object"}},"allRead":{"type":"boolean"},"allReadWrite":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"commitMessage":{"type":"string"},"created":{"type":"string","format":"date-time"},"dbotCreatedBy":{"type":"string","description":"Who has created this event - relevant only for manual incidents"},"definitionId":{"type":"string"},"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"fromServerVersion":{"$ref":"#/components/schemas/Version"},"hasRole":{"type":"boolean","description":"Internal field to make queries on role faster"},"hidePivot":{"type":"boolean"},"hideSearch":{"type":"boolean"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"isCommon":{"type":"boolean"},"itemVersion":{"$ref":"#/components/schemas/Version"},"layout":{"$ref":"#/components/schemas/WidgetCells"},"locked":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"modulePage":{"type":"boolean"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"owner":{"type":"string"},"packID":{"type":"string"},"packName":{"type":"string"},"packPropagationLabels":{"type":"array","items":{"type":"string"}},"period":{"$ref":"#/components/schemas/Period"},"prevName":{"type":"string"},"previousAllRead":{"type":"boolean"},"previousAllReadWrite":{"type":"boolean"},"previousRoles":{"type":"array","description":"Do not change this field manually","items":{"type":"string"}},"primaryTerm":{"type":"integer","format":"int64"},"propagationLabels":{"type":"array","items":{"type":"string"}},"remote":{"type":"boolean"},"roles":{"type":"array","description":"The role assigned to this investigation","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"shouldCommit":{"type":"boolean"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"system":{"type":"boolean"},"toDate":{"type":"string","format":"date-time"},"toServerVersion":{"$ref":"#/components/schemas/Version"},"vcShouldIgnore":{"type":"boolean"},"vcShouldKeepItemLegacyProdMachine":{"type":"boolean"},"version":{"type":"integer","format":"int64"},"xsoarHasReadOnlyRole":{"type":"boolean"},"xsoarPreviousReadOnlyRoles":{"type":"array","items":{"type":"string"}},"xsoarReadOnlyRoles":{"type":"array","items":{"type":"string"}}}},"Version":{"type":"object","title":"Version represents a version.","properties":{"Digits":{"type":"array","description":"WARNING: when adding new attributes or changing the names\nof the existing ones, remember to add support in UnmarshalJSON\nfor items that were exported by msgpack.","items":{"type":"integer","format":"int64"}},"Label":{"type":"string"}}},"WidgetCells":{"type":"array","title":"WidgetCells ...","items":{"$ref":"#/components/schemas/WidgetCell"}},"WidgetCell":{"type":"object","title":"WidgetCell ...","properties":{"forceRange":{"type":"boolean"},"h":{"type":"integer","format":"int64"},"i":{"type":"string"},"id":{"type":"string"},"reflectDimensions":{"type":"boolean"},"w":{"type":"integer","format":"int64"},"widget":{"$ref":"#/components/schemas/Widget"},"x":{"type":"integer","format":"int64"},"y":{"type":"integer","format":"int64"}}},"Widget":{"type":"object","description":"Widget describe a widget component used to get statistics requests, based on parameters such as\ndataType and widgetType. A widget can be a part of widgets collection inside a dashboard.","properties":{"Cache":{"type":"object","description":"Cache of join functions","additionalProperties":{"type":"array","items":{"type":"string"}}},"accounts":{"type":"object","description":"Accounts list of accounts to query the widget data from","additionalProperties":{"type":"object"}},"cacheVersn":{"type":"integer","format":"int64"},"category":{"type":"string","description":"Category the widget is related to. Used to display in widget library under category or dataType if empty."},"commitMessage":{"type":"string"},"created":{"type":"string","format":"date-time"},"dataType":{"type":"string","description":"Data type of the widget. Describes what data does the widget query. supporting data types \"incidents\",\"messages\",\"system\",\"entries\",\"tasks\", \"audit\"."},"dateRange":{"$ref":"#/components/schemas/DateRange"},"definition":{"$ref":"#/components/schemas/GenericObjectDefinition"},"definitionId":{"type":"string"},"description":{"type":"string","description":"The description of the widget's usage and data representation."},"fromServerVersion":{"$ref":"#/components/schemas/Version"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"ignoreWorkers":{"type":"boolean","description":"Do not use workers mechanism while searching bleve"},"indexName":{"type":"string"},"isPredefined":{"type":"boolean","description":"Is the widget a system widget."},"itemVersion":{"$ref":"#/components/schemas/Version"},"locked":{"type":"boolean","description":"Is the widget locked for editing."},"modified":{"type":"string","format":"date-time"},"name":{"type":"string","description":"Default name of the widget."},"numericId":{"type":"integer","format":"int64"},"packID":{"type":"string"},"packName":{"type":"string"},"packPropagationLabels":{"type":"array","items":{"type":"string"}},"page":{"type":"integer","description":"0-based page","format":"int64"},"params":{"type":"object","description":"Additional parameters for this widget, depends on widget type and data.","additionalProperties":{"type":"object"}},"prevName":{"type":"string","description":"The previous name of the widget."},"primaryTerm":{"type":"integer","format":"int64"},"propagationLabels":{"type":"array","items":{"type":"string"}},"query":{"type":"string","description":"Query to search on the dataType."},"remote":{"type":"boolean"},"searchAfter":{"type":"array","description":"Efficient next page, pass max sort value from previous page","items":{"type":"string"}},"searchAfterElastic":{"type":"array","description":"Efficient next page, pass max ES sort value from previous page","items":{"type":"string"}},"searchAfterMap":{"type":"object","description":"Map accounts search after values - stores next page sort values per account.\nThere is no need to store searchBeforeMap as [current page searchBefore] equals to [prev page searchAfter]\nMore, there is no way to generate correct searchBefore from current page as some tenants may not appear at all.\nThe map is relevant in proxy mode and used by tenants, each tenant extracts the searchAfter keys from the map.","additionalProperties":{"type":"array","items":{"type":"string"}}},"searchAfterMapOrder":{"type":"object","additionalProperties":{"type":"integer","format":"int64"}},"searchBefore":{"type":"array","description":"Efficient prev page, pass min sort value from next page","items":{"type":"string"}},"searchBeforeElastic":{"type":"array","description":"Efficient prev page, pass min ES sort value from next page","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"shouldCommit":{"type":"boolean"},"size":{"type":"integer","description":"Size is limited to 1000, if not passed it defaults to 0, and no results will return","format":"int64"},"sizeInBytes":{"type":"integer","format":"int64"},"skipAggregateAccounts":{"type":"boolean","description":"SkipAggregateAccounts flag that indicates whether to skip aggregate accounts results"},"sort":{"type":"array","description":"The sort order","items":{"$ref":"#/components/schemas/Order"}},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"toServerVersion":{"$ref":"#/components/schemas/Version"},"vcShouldIgnore":{"type":"boolean"},"vcShouldKeepItemLegacyProdMachine":{"type":"boolean"},"version":{"type":"integer","format":"int64"},"widgetType":{"type":"string","description":"Widget type describes how does the widget should recieve the data, and display it. Supporting types: \"bar\", \"column\", \"pie\", \"list\", \"number\", \"trend\", \"text\", \"duration\", \"image\", \"line\", and \"table\"."}},"required":["name","widgetType"]},"DateRange":{"type":"object","description":"DateRange provides common fields for date filtering","properties":{"fromDate":{"type":"string","format":"date-time"},"fromDateLicense":{"type":"string","format":"date-time"},"period":{"$ref":"#/components/schemas/Period"},"toDate":{"type":"string","format":"date-time"}}},"Period":{"type":"object","title":"Period holds the 'Period' query, such as last 3 days, last 6 hours, between 6 days from now until 3 days from now.","properties":{"by":{"type":"string","description":"By is used for legacty, and if exists it will override ByTo and ByFrom"},"byFrom":{"type":"string"},"byTo":{"type":"string"},"field":{"type":"string"},"fromValue":{"type":"string","format":"duration"},"toValue":{"type":"string","format":"duration"}}},"GenericObjectDefinition":{"type":"object","title":"GenericObjectDefinition ...","properties":{"auditable":{"type":"boolean"},"cacheVersn":{"type":"integer","format":"int64"},"commitMessage":{"type":"string"},"created":{"type":"string","format":"date-time"},"definitionId":{"type":"string"},"fromServerVersion":{"$ref":"#/components/schemas/Version"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"itemVersion":{"$ref":"#/components/schemas/Version"},"locked":{"type":"boolean"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"numericId":{"type":"integer","format":"int64"},"packID":{"type":"string"},"packName":{"type":"string"},"packPropagationLabels":{"type":"array","items":{"type":"string"}},"partitioned":{"type":"boolean"},"pluralName":{"type":"string"},"prevName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"propagationLabels":{"type":"array","items":{"type":"string"}},"rbacSupport":{"type":"boolean"},"remote":{"type":"boolean"},"sequenceNumber":{"type":"integer","format":"int64"},"shouldCommit":{"type":"boolean"},"sizeInBytes":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"system":{"type":"boolean"},"toServerVersion":{"$ref":"#/components/schemas/Version"},"vcShouldIgnore":{"type":"boolean"},"vcShouldKeepItemLegacyProdMachine":{"type":"boolean"},"version":{"type":"integer","format":"int64"}}},"Order":{"type":"object","description":"Order struct holds a sort field and the direction of sorting","properties":{"asc":{"type":"boolean"},"field":{"type":"string"},"fieldType":{"type":"string"}}}}},"paths":{"/dashboards/import":{"post":{"summary":"Import a dashboard","description":"Import a dashboard to Cortex XSOAR","operationId":"importDashboard","requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"description":"The JSON file of the dashboard to import.","type":"string"}}}}}},"responses":{"200":{"description":"The saved dashboard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dashboard"}}}}},"tags":["Dashboards"]}}}}
```

## \[Deprecated] Get Dashboard Statistics

> Get a given dashboard statistics result.\
> Deprecated - use "/v2/statistics/dashboards/query

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Dashboards","description":"APIs for managing dashboards"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"StatsQueryResponse":{"type":"object","title":"StatsQueryResponse - Describe the data returned related to a specific widget cell in a dashboard.","properties":{"accountErrors":{"type":"array","items":{"type":"string"}},"data":{"type":"object","description":"data array or object describing the statistics data based on type."},"totalAccounts":{"type":"integer","format":"int64"},"widgetCellId":{"type":"string"}}}}},"paths":{"/statistics/dashboards/query":{"post":{"summary":"[Deprecated] Get Dashboard Statistics","description":"Get a given dashboard statistics result.\nDeprecated - use \"/v2/statistics/dashboards/query","operationId":"GetStatsForDashboardOldFormat","responses":{"200":{"description":"Return an array of stats results for each widget cell in dashboard.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StatsQueryResponse"}}}}}},"tags":["Dashboards"]}}}}
```

## Get Dashboard Statistics

> Get a given dashboard statistics result.

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 6 API","version":"6"},"tags":[{"name":"Dashboards","description":"APIs for managing dashboards"}],"servers":[{"url":"https://hostname"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"StatsQueryResponse":{"type":"object","title":"StatsQueryResponse - Describe the data returned related to a specific widget cell in a dashboard.","properties":{"accountErrors":{"type":"array","items":{"type":"string"}},"data":{"type":"object","description":"data array or object describing the statistics data based on type."},"totalAccounts":{"type":"integer","format":"int64"},"widgetCellId":{"type":"string"}}}}},"paths":{"/v2/statistics/dashboards/query":{"post":{"summary":"Get Dashboard Statistics","description":"Get a given dashboard statistics result.","operationId":"GetStatsForDashboard","responses":{"200":{"description":"Return an array of stats results for each widget cell in dashboard.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StatsQueryResponse"}}}}}},"tags":["Dashboards"]}}}}
```


---

# 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/xsoar-6-api/cortex-xsoar-6.x-apis/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.
