dashboardsPage()

API Stability Long-Term

The dashboardsPage() GraphQL query is used to retrieve information on dashboards. You would specify which parameters you want and how many records you want returned in a batch, per page — and then which page you want returned.

To get a list of dashboards using the UI, see the Manage Dashboards page of the main documentation.

Syntax

graphql
dashboardsPage(
     search: string,
     pageSize: integer!,
     pageNumber: integer!
   ): DashboardPage!

For the input, enter search with a dashboard name. If you don't include it, all dashboards are returned. For the pageSize, specify the number of records you want per page. Imagining a list of dashboards that span several pages, use pageNumber to specify which page to return.

Example

The example below queries LogScale for the dashboards for the given search parameter:

Raw
graphql
query{
  dashboardsPage(
    search: "hosts"
    pageSize: 10
    pageNumber: 1
  ) {
    page {
      id, name, 
      displayName, searchDomain {
        id, name
      }
    }
    pageInfo {
      number
      totalNumberOfRows
      total
    }
  }
}
Mac OS or Linux (curl)
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d @- << EOF
{"query" : "query{
  dashboardsPage(
    search: \"hosts\"
    pageSize: 10
    pageNumber: 1
  ) {
    page {
      id, name, 
      displayName, searchDomain {
        id, name
      }
    }
    pageInfo {
      number
      totalNumberOfRows
      total
    }
  }
}"
}
EOF
Mac OS or Linux (curl) One-line
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d @- << EOF
{"query" : "query{
  dashboardsPage(
    search: \"hosts\"
    pageSize: 10
    pageNumber: 1
  ) {
    page {
      id, name, 
      displayName, searchDomain {
        id, name
      }
    }
    pageInfo {
      number
      totalNumberOfRows
      total
    }
  }
}"
}
EOF
Windows Cmd and curl
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql ^
    -H "Authorization: Bearer $TOKEN" ^
    -H "Content-Type: application/json" ^
    -d @'{"query" : "query{ ^
  dashboardsPage( ^
    search: \"hosts\" ^
    pageSize: 10 ^
    pageNumber: 1 ^
  ) { ^
    page { ^
      id, name,  ^
      displayName, searchDomain { ^
        id, name ^
      } ^
    } ^
    pageInfo { ^
      number ^
      totalNumberOfRows ^
      total ^
    } ^
  } ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "query{
  dashboardsPage(
    search: \"hosts\"
    pageSize: 10
    pageNumber: 1
  ) {
    page {
      id, name, 
      displayName, searchDomain {
        id, name
      }
    }
    pageInfo {
      number
      totalNumberOfRows
      total
    }
  }
}"
}'
    "$YOUR_LOGSCALE_URL/graphql"
Perl
perl
#!/usr/bin/perl

use HTTP::Request;
use LWP;

my $TOKEN = "TOKEN";

my $uri = '$YOUR_LOGSCALE_URL/graphql';

my $query = "query{
  dashboardsPage(
    search: \"hosts\"
    pageSize: 10
    pageNumber: 1
  ) {
    page {
      id, name, 
      displayName, searchDomain {
        id, name
      }
    }
    pageInfo {
      number
      totalNumberOfRows
      total
    }
  }
}";
$query =~ s/\n/ /g;
my $json = sprintf('{"query" : "%s"}',$query);
my $req = HTTP::Request->new("POST", $uri );

$req->header("Authorization" => "Bearer $TOKEN");
$req->header("Content-Type" => "application/json");

$req->content( $json );

my $lwp = LWP::UserAgent->new;

my $result = $lwp->request( $req );

print $result->{"_content"},"\n";
Python
python
#! /usr/local/bin/python3

import requests

url = '$YOUR_LOGSCALE_URL/graphql'
mydata = r'''{"query" : "query{
  dashboardsPage(
    search: \"hosts\"
    pageSize: 10
    pageNumber: 1
  ) {
    page {
      id, name, 
      displayName, searchDomain {
        id, name
      }
    }
    pageInfo {
      number
      totalNumberOfRows
      total
    }
  }
}"
}'''

resp = requests.post(url,
                     data = mydata,
                     headers = {
   "Authorization" : "Bearer $TOKEN",
   "Content-Type" : "application/json"
}
)

print(resp.text)
Node.js
javascript
const https = require('https');

const data = JSON.stringify(
    {"query" : "query{
  dashboardsPage(
    search: \"hosts\"
    pageSize: 10
    pageNumber: 1
  ) {
    page {
      id, name, 
      displayName, searchDomain {
        id, name
      }
    }
    pageInfo {
      number
      totalNumberOfRows
      total
    }
  }
}"
}
);


const options = {
  hostname: '$YOUR_LOGSCALE_URL',
  path: 'graphql',
  port: 443,
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Content-Length': data.length,
    Authorization: 'BEARER ' + process.env.TOKEN,
    'User-Agent': 'Node',
  },
};

const req = https.request(options, (res) => {
  let data = '';
  console.log(`statusCode: ${res.statusCode}`);

  res.on('data', (d) => {
    data += d;
  });
  res.on('end', () => {
    console.log(JSON.parse(data).data);
  });
});

req.on('error', (error) => {
  console.error(error);
});

req.write(data);
req.end();
Example Responses
Success (HTTP Response Code 200 OK)
json
{
  "data": {
    "dashboardsPage": {
      "page": [
        {
          "id": "abc123",
          "name": "Hosts",
          "displayName": "Hosts",
          "searchDomain": {
            "id": "def456",
            "name": "humio"
          }
        }
      ],
      "pageInfo": {
        "number": 1,
        "totalNumberOfRows": 1,
        "total": 1
      }
    }
  }
}

Notice that the example above requests information on dashboards with the name hosts. That resulted in one dashboard with that text in the name. The results show the unique identifiers, the name of the dashboard, and the repository, as requested. Click on Dashboard datatype in the table below for more parameters.

Returned Datatype

The returned datatype is used to choose what information you want about each dashboard. There are a couple of parameters and several sub-parameters. Those sub-parameters are many. Below is a list of them along with links to the sub-parameters:

Table: DashboardPage

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For return datatypes, this indicates that you must specify which fields you want returned in the results.
Table last updated: Jan 22, 2026
page[Dashboard]yes Long-TermSpecific information on each dashboard to be returned for the dashboard pages. See Dashboard.
pageInfoPageTypeyes Long-TermInformation about the dashboards page itself. See PageType.