The createScheduledReport() GraphQL mutation field is used to create a scheduled report.

To change a scheduled report, you can use the updateScheduledReport() mutation. To enable and disable scheduled reports, use the enableScheduledReport() and disableScheduledReport() mutations. Use the deleteScheduledReport() mutation to delete a scheduled reports.

There is also the query, scheduledReport() for getting information about a scheduled report. For this query and almost all of these mutations you will need the unique identifier of the scheduled report. Click on the » link below to see how to get this.

Hide Query Example

Show Scheduled Reports Query

API Stability Long-Term

Syntax

graphql
createScheduledReport(
       input: CreateScheduledReportInput!
    ): ScheduledReport!

For the input, you have to give the name of the view, the unique identifier of the dashboard, a list of recipients to get the report and their email addresses, etc. Click on Show Query above to find the identifier. See the Given Datatype section for details on the input parameters.

For the results, you can get plenty on the scheduled report. See the Returned Datatype section for what's available.

Example

Raw
graphql
mutation {
  createScheduledReport(input:
       { name: "my-report",
         viewName: "humio",
         enabled: true,
         description: "My Scheduled Report",
         dashboardId: "ILLF8JldGGP6tVspPuRtifX7ZGiHveGV",
         schedule: {cronExpression: "H 2 * * *", 
                    timeZone: "UTC+00:00", 
                    startDate: 1729781206587},
         labels: [ ]
         parameters: [ { id: "something", value: "123" }],
         layout: { paperSize: "A4", paperOrientation: "Portrait",
                   paperLayout: "List",
                   showTitleHeader: true, showDescription: true, 
                   showTitleFrontpage: true, showParameters: true,
                   showExportDate: false, footerShowPageNumbers: true,
                   maxNumberOfRows: 20 },
         recipients: [ "bob@company.com" ]
      } )
  { 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 {
  createScheduledReport(input:
       { name: \"my-report\",
         viewName: \"humio\",
         enabled: true,
         description: \"My Scheduled Report\",
         dashboardId: \"ILLF8JldGGP6tVspPuRtifX7ZGiHveGV\",
         schedule: {cronExpression: \"H 2 * * *\", 
                    timeZone: \"UTC+00:00\", 
                    startDate: 1729781206587},
         labels: [ ]
         parameters: [ { id: \"something\", value: \"123\" }],
         layout: { paperSize: \"A4\", paperOrientation: \"Portrait\",
                   paperLayout: \"List\",
                   showTitleHeader: true, showDescription: true, 
                   showTitleFrontpage: true, showParameters: true,
                   showExportDate: false, footerShowPageNumbers: true,
                   maxNumberOfRows: 20 },
         recipients: [ \"bob@company.com\" ]
      } )
  { 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 {
  createScheduledReport(input:
       { name: \"my-report\",
         viewName: \"humio\",
         enabled: true,
         description: \"My Scheduled Report\",
         dashboardId: \"ILLF8JldGGP6tVspPuRtifX7ZGiHveGV\",
         schedule: {cronExpression: \"H 2 * * *\", 
                    timeZone: \"UTC+00:00\", 
                    startDate: 1729781206587},
         labels: [ ]
         parameters: [ { id: \"something\", value: \"123\" }],
         layout: { paperSize: \"A4\", paperOrientation: \"Portrait\",
                   paperLayout: \"List\",
                   showTitleHeader: true, showDescription: true, 
                   showTitleFrontpage: true, showParameters: true,
                   showExportDate: false, footerShowPageNumbers: true,
                   maxNumberOfRows: 20 },
         recipients: [ \"bob@company.com\" ]
      } )
  { 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 { ^
  createScheduledReport(input: ^
       { name: \"my-report\", ^
         viewName: \"humio\", ^
         enabled: true, ^
         description: \"My Scheduled Report\", ^
         dashboardId: \"ILLF8JldGGP6tVspPuRtifX7ZGiHveGV\", ^
         schedule: {cronExpression: \"H 2 * * *\",  ^
                    timeZone: \"UTC+00:00\",  ^
                    startDate: 1729781206587}, ^
         labels: [ ] ^
         parameters: [ { id: \"something\", value: \"123\" }], ^
         layout: { paperSize: \"A4\", paperOrientation: \"Portrait\", ^
                   paperLayout: \"List\", ^
                   showTitleHeader: true, showDescription: true,  ^
                   showTitleFrontpage: true, showParameters: true, ^
                   showExportDate: false, footerShowPageNumbers: true, ^
                   maxNumberOfRows: 20 }, ^
         recipients: [ \"bob@company.com\" ] ^
      } ) ^
  { id } ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "mutation {
  createScheduledReport(input:
       { name: \"my-report\",
         viewName: \"humio\",
         enabled: true,
         description: \"My Scheduled Report\",
         dashboardId: \"ILLF8JldGGP6tVspPuRtifX7ZGiHveGV\",
         schedule: {cronExpression: \"H 2 * * *\", 
                    timeZone: \"UTC+00:00\", 
                    startDate: 1729781206587},
         labels: [ ]
         parameters: [ { id: \"something\", value: \"123\" }],
         layout: { paperSize: \"A4\", paperOrientation: \"Portrait\",
                   paperLayout: \"List\",
                   showTitleHeader: true, showDescription: true, 
                   showTitleFrontpage: true, showParameters: true,
                   showExportDate: false, footerShowPageNumbers: true,
                   maxNumberOfRows: 20 },
         recipients: [ \"bob@company.com\" ]
      } )
  { 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 {
  createScheduledReport(input:
       { name: \"my-report\",
         viewName: \"humio\",
         enabled: true,
         description: \"My Scheduled Report\",
         dashboardId: \"ILLF8JldGGP6tVspPuRtifX7ZGiHveGV\",
         schedule: {cronExpression: \"H 2 * * *\", 
                    timeZone: \"UTC+00:00\", 
                    startDate: 1729781206587},
         labels: [ ]
         parameters: [ { id: \"something\", value: \"123\" }],
         layout: { paperSize: \"A4\", paperOrientation: \"Portrait\",
                   paperLayout: \"List\",
                   showTitleHeader: true, showDescription: true, 
                   showTitleFrontpage: true, showParameters: true,
                   showExportDate: false, footerShowPageNumbers: true,
                   maxNumberOfRows: 20 },
         recipients: [ \"bob@company.com\" ]
      } )
  { 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 {
  createScheduledReport(input:
       { name: \"my-report\",
         viewName: \"humio\",
         enabled: true,
         description: \"My Scheduled Report\",
         dashboardId: \"ILLF8JldGGP6tVspPuRtifX7ZGiHveGV\",
         schedule: {cronExpression: \"H 2 * * *\", 
                    timeZone: \"UTC+00:00\", 
                    startDate: 1729781206587},
         labels: [ ]
         parameters: [ { id: \"something\", value: \"123\" }],
         layout: { paperSize: \"A4\", paperOrientation: \"Portrait\",
                   paperLayout: \"List\",
                   showTitleHeader: true, showDescription: true, 
                   showTitleFrontpage: true, showParameters: true,
                   showExportDate: false, footerShowPageNumbers: true,
                   maxNumberOfRows: 20 },
         recipients: [ \"bob@company.com\" ]
      } )
  { 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 {
  createScheduledReport(input:
       { name: \"my-report\",
         viewName: \"humio\",
         enabled: true,
         description: \"My Scheduled Report\",
         dashboardId: \"ILLF8JldGGP6tVspPuRtifX7ZGiHveGV\",
         schedule: {cronExpression: \"H 2 * * *\", 
                    timeZone: \"UTC+00:00\", 
                    startDate: 1729781206587},
         labels: [ ]
         parameters: [ { id: \"something\", value: \"123\" }],
         layout: { paperSize: \"A4\", paperOrientation: \"Portrait\",
                   paperLayout: \"List\",
                   showTitleHeader: true, showDescription: true, 
                   showTitleFrontpage: true, showParameters: true,
                   showExportDate: false, footerShowPageNumbers: true,
                   maxNumberOfRows: 20 },
         recipients: [ \"bob@company.com\" ]
      } )
  { 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": {
    "createScheduledReport": {
      "id": "abc123"
    }
  }
}

Given Datatype

For this input datatype, you would provide the name of the view associated with the scheduled report to create, the unique identifier of the related dashboard, a list of recipients to get the report and their email addresses, and a few other factors. Click on the Show Query link above the Syntax section for an example of how to find the identifier.

Table: CreateScheduledReportInput

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: Sep 17, 2024
dashboardIdstringyes Long-TermThe unique identifier of the dashboard for which the report was created.
descriptionstringyes Long-TermA description of the scheduled report.
enabledbooleanyes Long-TermFlag indicating whether the scheduled report is enabled.
labels[string]yes Long-TermLabels attached to the scheduled report.
layoutCreateScheduledReportLayoutInputyes Long-TermLayout of the scheduled report. See CreateScheduledReportLayoutInput.
namestringyes Long-TermThe name of the scheduled report.
parameters[CreateScheduledReportParameterValueInput]yes Long-TermA list of parameter value configurations. See CreateScheduledReportParameterValueInput.
passwordstring  Long-TermThe password used to protect any generated reports.
recipients[string]yes Long-TermA list of recipients who should receive an email with the generated report.
scheduleCreateScheduledReportScheduleInputyes Long-TermThe schedule by which to run the report. See CreateScheduledReportScheduleInput.
timeIntervalFromstring  Long-TermThe start of the relative time interval for the dashboard.
viewNamestringyes Long-TermThe name of the view of the scheduled report.

Returned Datatype

The return datatype is used to get the name of the related dashboard, the schedule for running the report, and the status for the last execution. The table below lists the return parameters you can specify:

Table: ScheduledReport

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 21, 2025
allowedActions[AssetAction]yes Short-TermAllowed asset actions. This is a preview and subject to changes. See AssetAction .
createdByUser  Long-TermUser who created the report. See User.
creationDatestringyes Long-TermDate when the report was created.
dashboardDashboardyes Long-TermThe dashboard for which the report was created. See Dashboard.
dashboardIdstringyes Long-TermThe unique identifier of the dashboard for which the report was created.
descriptionstringyes Long-TermDescription of the scheduled report.
enabledbooleanyes Long-TermWhether the scheduled report is enabled.
idstringyes Long-TermThe unique identifier of the scheduled report.
isPasswordDefinedbooleanyes Long-TermWhether a password is defined for the report.
labels[string]yes Long-TermLabels attached to the scheduled report.
lastExecutionErrors[string]yes Long-TermLast errors encountered while generating the scheduled report.
lastExecutionWarnings[string]yes Long-TermLast warnings encountered while generating the scheduled report.
layoutScheduledReportLayoutyes Long-TermLayout of the scheduled report. See ScheduledReportLayout.
namestringyes Long-TermThe name of the scheduled report.
parameters[ParameterValue]yes Long-TermList of parameter value configurations. See ParameterValue.
recipients[string]yes Long-TermList of recipients who should receive an email with the generated report.
resourcestringyes Short-TermThe resource identifier for this scheduled report.
scheduleScheduleyes Long-TermThe schedule by which to run the report. See Schedule.
statusstringyes Long-TermStatus of the latest report execution.
timeIntervalStartstring  Long-TermStart of the relative time interval for the dashboard.
timeOfLastReportExecutionlong  Long-TermUnix timestamp for the last report execution. The timestamp only indicates an attempt, not if it was successful.
timeOfNextPlannedReportExecutionlong  Long-TermUnix timestamp for the next planned report execution.