API Stability Long-Term

The deleteDashboardV2() GraphQL mutation may be used to delete a dashboard for a view using the unique identifiers of the view and the dashboard.

Syntax

Below is the syntax for the deleteDashboardV2() mutation field:

graphql
deleteDashboardV2(
      input: DeleteDashboardInputV2!
   ): SearchDomain!

Below is an example of how this mutation field might be used:

Raw
graphql
mutation {
  deleteDashboardV2( input: {
         viewId: "aK9GKAsTnMXfRxT8Fpecx3fX",
         dashboardId: "X3ax4M65ZyyRRd12MytBLifzoCmT5cK0"
  } )
  { id }
}
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" : "mutation {
  deleteDashboardV2( input: {
         viewId: \"aK9GKAsTnMXfRxT8Fpecx3fX\",
         dashboardId: \"X3ax4M65ZyyRRd12MytBLifzoCmT5cK0\"
  } )
  { id }
}"
}
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" : "mutation {
  deleteDashboardV2( input: {
         viewId: \"aK9GKAsTnMXfRxT8Fpecx3fX\",
         dashboardId: \"X3ax4M65ZyyRRd12MytBLifzoCmT5cK0\"
  } )
  { id }
}"
}
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" : "mutation { ^
  deleteDashboardV2( input: { ^
         viewId: \"aK9GKAsTnMXfRxT8Fpecx3fX\", ^
         dashboardId: \"X3ax4M65ZyyRRd12MytBLifzoCmT5cK0\" ^
  } ) ^
  { id } ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "mutation {
  deleteDashboardV2( input: {
         viewId: \"aK9GKAsTnMXfRxT8Fpecx3fX\",
         dashboardId: \"X3ax4M65ZyyRRd12MytBLifzoCmT5cK0\"
  } )
  { id }
}"
}'
    "$YOUR_LOGSCALE_URL/graphql"
Perl
perl
#!/usr/bin/perl

use HTTP::Request;
use LWP;

my $INGEST_TOKEN = "TOKEN";

my $uri = '$YOUR_LOGSCALE_URL/graphql';

my $json = '{"query" : "mutation {
  deleteDashboardV2( input: {
         viewId: \"aK9GKAsTnMXfRxT8Fpecx3fX\",
         dashboardId: \"X3ax4M65ZyyRRd12MytBLifzoCmT5cK0\"
  } )
  { id }
}"
}';
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" : "mutation {
  deleteDashboardV2( input: {
         viewId: \"aK9GKAsTnMXfRxT8Fpecx3fX\",
         dashboardId: \"X3ax4M65ZyyRRd12MytBLifzoCmT5cK0\"
  } )
  { id }
}"
}'''

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" : "mutation {
  deleteDashboardV2( input: {
         viewId: \"aK9GKAsTnMXfRxT8Fpecx3fX\",
         dashboardId: \"X3ax4M65ZyyRRd12MytBLifzoCmT5cK0\"
  } )
  { id }
}"
}
);


const options = {
  hostname: '$YOUR_LOGSCALE_URL/graphql',
  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": {
    "deleteDashboardV2": {
      "id": "aK9GKAsTnMXfRxT8Fpecx3fX"
    }
  }
}

Given Datatypes

For DeleteDashboardInputV2, there are two parameters. Below are descriptions of them:

Table: DeleteDashboardInputV2

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Sep 18, 2024
dashboardIdstringyes Long-TermThe dashboardId to delete.
viewIdstringyes Long-TermThe unique identifier for the view containing the dashboard to delete.

Returned Datatypes

SearchDomain has a several parameters. They're listed below along with descriptions of each:

Table: SearchDomain

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Mar 27, 2025
actionmultipleyes Long-TermA saved action. The multiple datatype consists of (id: string): Action. See Action.
actionsActionyes Long-TermA list of saved actions. See Action.
aggregateAlertmultipleyes Long-TermA saved aggregate alert. The multiple datatype consists of (id: string): AggregateAlert. See AggregateAlert.
aggregateAlerts[AggregateAlert]yes Long-TermA list of saved aggregate alerts. See AggregateAlert.
alertmultipleyes Long-TermA saved alert. The multiple datatype consists of (id: string): Alert. See Alert.
alerts[Alert]yes Long-TermSaved alerts. See Alert.
allowedViewActions[ViewAction]yes Long-TermReturns the all actions the user is allowed to perform on the view. See ViewAction.
automaticSearchbooleanyes Long-TermWhether to execute automatically the default search query.
availablePackagesmultipleyes Long-TermReturns a list of available packages that can be installed. The multiple datatype consists of (filter: string, tags: [PackageTag], categories: [string]): [PackageRegistrySearchResultItem]. PackageTag is a scalar. See PackageRegistrySearchResultItem.
dashboardmultipleyes Long-TermThe default or initial Dashboard to use. The multiple datatype consists of (id: string): Dashboard. See Dashboard).
dashboards[Dashboard]yes Long-TermAll dashboards available on the view. See Dashboard.
defaultQuerysavedQueryyes Long-TermThe default query used for the search domain when none is selected. See savedQuery.
deletedDatelong  Long-TermThe point in time the search domain was marked for deletion.
descriptionstring  Long-TermA description of the search domain.
fileFieldSearchmultipleyes Long-TermUsed to search fields in a CSV or JSON file. The multiple datatype consists of fileFieldSearch(fileName: string, fieldName: string, prefixFilter: string, valueFilters: [FileFieldFilterType], fieldsToInclude: [string], maxEntries: integer): [[DictionaryEntryType]]. See FileFieldFilterType and DictionaryEntryType.
files[File]yes Long-TermFiles belonging to the search domain. See File.
filterAlertmultipleyes Long-TermA saved filter alert. The multiple datatype consists of (id: string): FilterAlert. See FilterAlert.
filterAlerts[FilterAlert]yes Long-TermSaved filter alerts. See FilterAlert.
groups[group]yes Long-TermGroups with assigned roles. See group.
hasPackageInstalledmultipleyes Long-TermWhether there is an installed package. The multiple datatype consists of (packageId: VersionedPackageSpecifier): boolean. VersionedPackageSpecifier is a scalar.
idstringyes Long-TermThe unique identifier for the search domain.
installedPackages[PackageInstallation]yes Long-TermList packages installed on a specific view or repository. See PackageInstallation.
interactions[ViewInteraction]yes Long-TermAll interactions defined on the view. See ViewInteraction.
isActionAllowedmultipleyes Long-TermWhether the current user is allowed to perform the action. The multiple datatype consists of (action: ViewAction): boolean. See ViewAction.
isStarredbooleanyes Long-TermWhether the search domain is highlighted with a star.
nameRepoOrViewNameyes Long-TermThe name of the search domain. RepoOrViewName is a scalar.
packageV2multipleyes Long-TermReturns a specific version of a package given a package version. The multiple datatype consists of (packageId: VersionedPackageSpecifier): Package2. VersionedPackageSpecifier is a scalar value. See Package2.
packageVersionsmultipleyes Long-Term

The available versions of a package. This is a preview and may be moved to the Package2.

The multiple datatype consists of (packageId: UnversionedPackageSpecifier): [RegistryPackageVersionInfo]. UnversionedPackageSpecifier is a scalar. See RegistryPackageVersionInfo.

permanentlyDeletedAtlong  Long-TermThe point in time the search domain will not be restorable anymore.
recentQueriesV2[RecentQuery]yes Long-TermAll recent queries for the search domain. See RecentQuery.
reposExcludedInSearchLimit[string]yes Long-TermRepositories not part of the search limitation.
resourcestringyes Short-TermThe resource identifier for the search domain.
savedQueries[savedQuery]yes Long-TermThe saved queries. See savedQuery.
savedQuerymultipleyes Long-TermA saved query. The multiple datatype consists of (id: string): SavedQuery. savedQuery).
scheduledReportmultipleyes Long-TermA saved scheduled report. The multiple datatype consists of (id: string): ScheduledReport. See scheduledReport.
scheduledReports[scheduledReport]yes Long-TermSaved scheduled reports. See scheduledReport.
scheduledSearchmultipleyes Long-TermA saved scheduled search. The multiple datatype consists of (id: string): ScheduledSearch. See ScheduledSearch).
scheduledSearches[ScheduledSearch]yes Long-TermThe scheduled searches to use with the search domain. See ScheduledSearch.
searchLimitedMslong  Long-TermLimit in milliseconds to which searches should are limited.
starredFields[string]yes Long-TermAll fields in the search domain to mark with a star.
tags[string]yes Long-TermAll tags from all datasources.
users[User]yes Long-TermUsers who have access to the search domain. See User.
usersandgroupsmultipleyes Long-TermUsers and groups associated with the search domain. The multiple datatype consists of (search: string, skip: integer, limit: integer): UsersAndGroupsSearchResultSet. See UsersAndGroupsSearchResultSet.
usersV2multipleyes Preview

Search users with a given permission, whose email or name matches this search string.

The multiple datatype consists of (search: string, permissionFilter: Permission, skip: integer, limit: integer): Users.

See Permission and users.

viewerQueryPrefixstringyes Long-TermThe query prefix prepended to each search in this domain.