The Dashboard API

The dashboard API returns a list of saved dashboards in the system. If id is specified in the request, the response will be a list that contains a single dashboard object. The fields query, queryWithoutTimeRange and index will not be in the dashboard object if the dashboard is not connected with an entity table or search.

Endpoint ⇒ GET /api/generate-query/dashboard

Query Parameters

Parameter Type Required Description

id

String

false

Fetches the dashboard that has the specified ID

Fields in a dashboard object

Fields Type Description

type

String

id

String

dashboard ID

index

Array

list of real index names

title

String

dashboard title

description

String

dashboard description

columns

Array

list of columns that are associated with the search

queries

Array

list that contains queries that are used to build the final query

filters

Array

list that contains filter objects that are associated with the dashboard

query

Object

final query

queryWithoutTimeRange

Object

final query without time range

dataModel

Object

dashboard data model

timeMode

String

time mode that is specified in the index pattern

Sample response

[{
        "type": "dashboard",
        "id": "dashboard:Id",
        "index": [
            "article"
        ],
        "title": "all articles",
        "description": "",
        "columns": [
            "title",
            "pmonth",
            "pyear",
            "source",
            "snippet"
        ],
        "queries": [],
        "filters": [
            {
                "query": {
                    "match_all": {}
                }
            }
        ],
        "query": {
            "bool": {
                "must": [
                    {
                        "match_all": {}
                    },
                    {
                        "range": {
                            "pdate": {
                                "gte": 956564100000,
                                "lte": 1587716100000,
                                "format": "epoch_millis"
                            }
                        }
                    }
                ],
                "must_not": []
            }
        },
        "timeMode": "relative",
        "dataModel": {
            "datamodelType": "SINGLE_SEARCH",
            "items": [
                {
                    "id": "40409e15-95fa-11e9-930a-4be260be8b6f",
                    "type": "node",
                    "d": {
                        "isRoot": true,
                        "entity": {
                            "id": "search:id",
                            "useGlobalTimeFilter": true
                        }
                    },
                    "x": 300,
                    "y": 150
                }
            ],
            "viewSettings": {
                "width": 1107,
                "height": 400,
                "zoom": 1.2,
                "offsetX": 600,
                "offsetY": 340
            }
        },
        "queryWithoutTimeRange": {
            "bool": {
                "must": [
                    {
                        "match_all": {}
                    }
                ],
                "must_not": []
            }
        }
    }]