The createDashboardFromPackageTemplate() GraphQL mutation field may be used to create a dashboard in LogScale from a package dashboard template.

Similar to this mutation, there is the createDashboardFromTemplateV2(), which is used to create a dashboard from a YAML template. There are also some basic, related mutations: You can use createDashboard() to create a one from scratch. You can use updateDashboard() to make many changes to a dashboard. The renameDashboard() mutation is used just to rename it. You can use copyDashboard() to clone an existing dashboard, and deleteDashboardV3() to delete one. To get a list of dashboards, use the dashboardsPage() query.

For more information on creating dashboards, see the Create Dashboards documentation page. You may also want to look at the Package Management page.

API Stability Long-Term

Syntax

graphql
createDashboardFromPackageTemplate(
      viewName: string!,
      packageId: VersionedPackageSpecifier!,
      dashboardTemplateName: string!,
      overrideName: string
   ): CreateDashboardFromPackageTemplateMutation!

For the input, you'll have to give the name of view or repository, and the name of the dashboard template. You'll also have to give the package name, followed by an ampersand and then the version number (see Example below).

For the results, since you will have created a dashboard with this mutation, you may want to get the identifier generated for it to use with other mutations and queries. See the tables in the Returned Datatype section for more choices.

Example

Raw
graphql
mutation {
  createDashboardFromPackageTemplate(
        viewName: "humio", packageId: "humio/insights@0.0.14",
        dashboardTemplateName: "Hosts",
        overrideName: "Visitors"
        )
  { dashboard {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 {
  createDashboardFromPackageTemplate(
        viewName: \"humio\", packageId: \"humio/insights@0.0.14\",
        dashboardTemplateName: \"Hosts\",
        overrideName: \"Visitors\"
        )
  { dashboard {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 {
  createDashboardFromPackageTemplate(
        viewName: \"humio\", packageId: \"humio/insights@0.0.14\",
        dashboardTemplateName: \"Hosts\",
        overrideName: \"Visitors\"
        )
  { dashboard {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 { ^
  createDashboardFromPackageTemplate( ^
        viewName: \"humio\", packageId: \"humio/insights@0.0.14\", ^
        dashboardTemplateName: \"Hosts\", ^
        overrideName: \"Visitors\" ^
        ) ^
  { dashboard {id}} ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "mutation {
  createDashboardFromPackageTemplate(
        viewName: \"humio\", packageId: \"humio/insights@0.0.14\",
        dashboardTemplateName: \"Hosts\",
        overrideName: \"Visitors\"
        )
  { dashboard {id}}
}"
}'
    "$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 = "mutation {
  createDashboardFromPackageTemplate(
        viewName: \"humio\", packageId: \"humio/insights@0.0.14\",
        dashboardTemplateName: \"Hosts\",
        overrideName: \"Visitors\"
        )
  { dashboard {id}}
}";
$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" : "mutation {
  createDashboardFromPackageTemplate(
        viewName: \"humio\", packageId: \"humio/insights@0.0.14\",
        dashboardTemplateName: \"Hosts\",
        overrideName: \"Visitors\"
        )
  { dashboard {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 {
  createDashboardFromPackageTemplate(
        viewName: \"humio\", packageId: \"humio/insights@0.0.14\",
        dashboardTemplateName: \"Hosts\",
        overrideName: \"Visitors\"
        )
  { dashboard {id}}
}"
}
);


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": {
    "createDashboardFromPackageTemplate": {
      "dashboard": {
        "id": "abc123"
      }
    }
  }
}

Given Datatype

For the input datatype, you'll have to give the name of view or repository, and the name of the dashboard template contained in the package. You'll also have to give the package name, followed by an ampersand and then the version number (see Example above).

Table: Input Using Standard Datatypes

Parameter Type Required Default Description
dashboardTemplateName string yes   The name of the dashboard template in the package.
overrideName string     The name of the new dashboard to create.
packageId VersionedPackageSpecifier yes   The identifier of the package containing the dashboard template to use. VersionedPackageSpecifier is a scalar value.
viewName string yes   The name of the view where the package is installed.

Returned Datatype

For the returned datatype, there are several sub-parameters related to the dashboard (see second table below). Since you will have created the dashboard with this mutation, you may only want to get the unique identifier generated for it to use with other mutations and queries.

Table: CreateDashboardFromPackageTemplateMutation

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: Mar 25, 2025
dashboardDashboardyes Long-TermThe dashboard to create from the package template. See Dashboard.

The table below contains the parameters of the sub-datatype used by the only parameter of the datatype shown above.

Table: Dashboard

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: Aug 19, 2025
allowedActions[AssetAction]yes Short-TermThe allowed asset actions. See AssetAction Table). This is feature is a preview and may be changed.
createdInfoAssetCommitMetadata  Long-TermMetadata related to the creation of the dashboard. See AssetCommitMetadata.
defaultFilterDashboardFilter  Long-TermThe default filter used with the dashboard (see DashboardFilter Table).
defaultSharedTimeEnabledbooleanyes Long-TermWhether the shared time by default is enabled.
defaultSharedTimeEndstringyes Long-TermThe default shared ending time.
defaultSharedTimeStartstringyes Long-TermThe default shared starting time.
descriptionstring  Long-TermA description of the dashboard.
displayNamestringyes Long-TermThe display name of the dashboard.
filters[DashboardFilter]yes Long-TermThe filters used with the dashboard. See DashboardFilter.
idstringyes Long-TermThe unique identifier for the dashboard.
isStarredbooleanyes Long-TermWhether the dashboard is marked with a star.
labels[string]yes Long-TermAny labels associated with the dashboard.
modifiedInfoAssetCommitMetadata  Long-TermMetadata related to the latest modification of the dashboard. See AssetCommitMetadata.
namestringyes Long-TermThe name of the dashboard.
packagePackageInstallationyes Long-TermThe package, if there is one, in which the dashboard is included (see PackageInstallation Table).
packageIdVersionedPackageSpecifieryes Long-TermThe unique identifiers of the package. VersionedPackageSpecifier is a scalar.
parameters[DashboardParameter]yes Long-TermList of dashboard parameters (see DashboardParameter Table).
readOnlyTokens[DashboardLink]yes Long-TermList of tokens used to access the dashboard without logging in. Useful for wall mounted dashboards or public dashboards. See DashboardLink.
resourcestringyes Short-TermThe resource identifier for this dashboard.
searchDomainSearchDomainyes Long-TermThe search domain for the dashboard. See SearchDomain.
sections[Section]yes Long-TermThe sections for the dashboard. See Section.
series[SeriesConfig]yes Long-TermThe series configuration for the dashboard. See SeriesConfig.
templateYamlstringyes DeprecatedA yaml formatted string that describes the dashboard. This field has been replaced with yamlTemplate. It will be removed at the earliest in version 1.225.
timeJumpSizeInMsinteger  Long-TermThe skip time in milliseconds for the dashboard.
updateFrequencyDashboardUpdateFrequencyTypeyes Long-TermThe frequency in which dashboard is updated. See DashboardUpdateFrequencyType, and the explanations under the DashboardParameter.
widgets[Widget]yes Long-TermWidgets for the dashboard (see Widget Table).
yamlTemplateYAMLyes Long-TermA yaml formatted string that describes the dashboard. YAML is a scalar. It doesn't contain links or permissions, and is safe to share and use for making copies of a dashboard. This replaced templateYaml starting in LogScale version 1.165.