Custom Dashboards
Custom dashboards let you build tailored views of your crawl and health score data. The data model consists of several related types:
- Custom Dashboard Collection -- a named group of dashboards, scoped to an account.
- Custom Dashboard -- a single dashboard within a collection, with a type such as
Trends. - Custom Chart -- a chart widget inside a dashboard, tracking a specific metric over time.
- Custom Table -- a tabular widget displaying metric data across crawls.
- Custom View -- links a project (and optionally a segment) to a dashboard, defining which data is displayed.
Querying dashboards
Retrieve all dashboards for an account, including their charts:
- Query
- Variables
- Response
- cURL
query GetCustomDashboards($accountId: ObjectID!) {
getAccount(id: $accountId) {
customDashboards(first: 10) {
nodes {
id
name
type
createdAt
customCharts(first: 5) {
nodes {
id
metric
type
}
}
}
totalCount
}
}
}
{
"accountId": "TjAwN0FjY291bnQ3MTU"
}
{
"data": {
"getAccount": {
"customDashboards": {
"nodes": [
{
"id": "TjAzN0N1c3RvbURhc2hib2FyZDE",
"name": "SEO Overview",
"type": "Trends",
"createdAt": "2025-01-10T08:00:00.000Z",
"customCharts": {
"nodes": [
{
"id": "TjAzN0N1c3RvbUNoYXJ0MQ",
"metric": "all_pages_basic",
"type": "Line"
}
]
}
}
],
"totalCount": 1
}
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"query GetCustomDashboards($accountId: ObjectID!) { getAccount(id: $accountId) { customDashboards(first: 10) { nodes { id name type createdAt customCharts(first: 5) { nodes { id metric type } } } totalCount } } }","variables":{"accountId":"TjAwN0FjY291bnQ3MTU"}}' https://api.lumar.io/graphql
Querying collections
Collections group dashboards together for organisation. Retrieve collections and their child dashboards:
- Query
- Variables
- Response
- cURL
query GetDashboardCollections($accountId: ObjectID!) {
getAccount(id: $accountId) {
customDashboardCollections(first: 10) {
nodes {
id
name
customDashboards(first: 5) {
nodes {
id
name
type
}
}
}
totalCount
}
}
}
{
"accountId": "TjAwN0FjY291bnQ3MTU"
}
{
"data": {
"getAccount": {
"customDashboardCollections": {
"nodes": [
{
"id": "TjAzN0NvbGxlY3Rpb24x",
"name": "Monthly Reports",
"customDashboards": {
"nodes": [
{
"id": "TjAzN0N1c3RvbURhc2hib2FyZDE",
"name": "SEO Overview",
"type": "Trends"
}
]
}
}
],
"totalCount": 1
}
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"query GetDashboardCollections($accountId: ObjectID!) { getAccount(id: $accountId) { customDashboardCollections(first: 10) { nodes { id name customDashboards(first: 5) { nodes { id name type } } } totalCount } } }","variables":{"accountId":"TjAwN0FjY291bnQ3MTU"}}' https://api.lumar.io/graphql
Creating a collection
Use the createCustomDashboardCollection mutation to create a new collection. You can optionally initialise it with default dashboards by passing initCustomDashboards.
- Mutation
- Variables
- Response
- cURL
mutation CreateCustomDashboardCollection($input: CreateCustomDashboardCollectionInput!) {
createCustomDashboardCollection(input: $input) {
customDashboardCollection {
id
name
}
}
}
{
"input": {
"accountId": "TjAwN0FjY291bnQ3MTU",
"name": "Monthly SEO Reports",
"initCustomDashboards": ["Trends"]
}
}
{
"data": {
"createCustomDashboardCollection": {
"customDashboardCollection": {
"id": "TjAzN0NvbGxlY3Rpb24x",
"name": "Monthly SEO Reports"
}
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"mutation CreateCustomDashboardCollection($input: CreateCustomDashboardCollectionInput!) { createCustomDashboardCollection(input: $input) { customDashboardCollection { id name } } }","variables":{"input":{"accountId":"TjAwN0FjY291bnQ3MTU","name":"Monthly SEO Reports","initCustomDashboards":["Trends"]}}}' https://api.lumar.io/graphql
Creating a dashboard
Add a dashboard to an existing collection (or standalone) with the createCustomDashboard mutation.
- Mutation
- Variables
- Response
- cURL
mutation CreateCustomDashboard($input: CreateCustomDashboardInput!) {
createCustomDashboard(input: $input) {
customDashboard {
id
name
type
}
}
}
{
"input": {
"accountId": "TjAwN0FjY291bnQ3MTU",
"name": "SEO Trends Dashboard",
"type": "Trends",
"customDashboardCollectionId": "TjAzN0NvbGxlY3Rpb24x"
}
}
{
"data": {
"createCustomDashboard": {
"customDashboard": {
"id": "TjAzN0N1c3RvbURhc2hib2FyZDE",
"name": "SEO Trends Dashboard",
"type": "Trends"
}
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"mutation CreateCustomDashboard($input: CreateCustomDashboardInput!) { createCustomDashboard(input: $input) { customDashboard { id name type } } }","variables":{"input":{"accountId":"TjAwN0FjY291bnQ3MTU","name":"SEO Trends Dashboard","type":"Trends","customDashboardCollectionId":"TjAzN0NvbGxlY3Rpb24x"}}}' https://api.lumar.io/graphql
Working with views
Custom views associate a project and optional segment with a dashboard. When you add views to a dashboard, the charts and tables within it will display data for those projects.
Use the addCustomViewsToCustomDashboard mutation to link projects, or include customViewIds when creating a dashboard.
Organising and copying
- Reorder dashboards within a collection using the
collectionPositionfield when updating a dashboard. - Copy a dashboard using
copyCustomDashboard-- this duplicates the dashboard and its charts into a target collection. - Copy a collection using
copyCustomDashboardCollection-- this duplicates the entire collection including all dashboards. UseexcludedCustomViewIdsto skip specific views during the copy.