Summary

The addOrUpdateQueryQuotaDefaultSettings() mutation creates or updates the system-wide default query quota settings. Query quotas limit how much query resource a user can consume within a defined time interval. This protects cluster performance from excessive query load. The input accepts a list of interval rules, so you can enforce quotas across multiple intervals — for example, per-minute and per-day — in a single call. These defaults apply to all users without per-user quota settings configured. Use this mutation to establish baseline resource limits before assigning individual overrides with addOrUpdateQueryQuotaUserSettings().

API Stability Short-Term

Syntax

graphql
addOrUpdateQueryQuotaDefaultSettings(
      input: QueryQuotaDefaultSettingsInput!
   ): QueryQuotaDefaultSettings!

The required input argument takes a QueryQuotaDefaultSettingsInput object, which specifies one or more quota interval rules. See the Input Parameters section for the full field list.

The mutation returns a non-null QueryQuotaDefaultSettings object containing the saved default quota configuration. See the Returned Values section for available fields.

Example

Raw
graphql
mutation {
  addOrUpdateQueryQuotaDefaultSettings(input: 
    {settings: [{interval: PerDay, 
                 measurementKind: QueryCount,
                 valueKind: Limited, value: 1000}]} )
  {settings {
    __typename
  }}
}
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 {
  addOrUpdateQueryQuotaDefaultSettings(input: 
    {settings: [{interval: PerDay, 
                 measurementKind: QueryCount,
                 valueKind: Limited, value: 1000}]} )
  {settings {
    __typename
  }}
}"
}
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 {
  addOrUpdateQueryQuotaDefaultSettings(input: 
    {settings: [{interval: PerDay, 
                 measurementKind: QueryCount,
                 valueKind: Limited, value: 1000}]} )
  {settings {
    __typename
  }}
}"
}
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 { ^
  addOrUpdateQueryQuotaDefaultSettings(input:  ^
    {settings: [{interval: PerDay,  ^
                 measurementKind: QueryCount, ^
                 valueKind: Limited, value: 1000}]} ) ^
  {settings { ^
    __typename ^
  }} ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "mutation {
  addOrUpdateQueryQuotaDefaultSettings(input: 
    {settings: [{interval: PerDay, 
                 measurementKind: QueryCount,
                 valueKind: Limited, value: 1000}]} )
  {settings {
    __typename
  }}
}"
}'
    "$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 {
  addOrUpdateQueryQuotaDefaultSettings(input: 
    {settings: [{interval: PerDay, 
                 measurementKind: QueryCount,
                 valueKind: Limited, value: 1000}]} )
  {settings {
    __typename
  }}
}";
$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 {
  addOrUpdateQueryQuotaDefaultSettings(input: 
    {settings: [{interval: PerDay, 
                 measurementKind: QueryCount,
                 valueKind: Limited, value: 1000}]} )
  {settings {
    __typename
  }}
}"
}'''

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 {
  addOrUpdateQueryQuotaDefaultSettings(input: 
    {settings: [{interval: PerDay, 
                 measurementKind: QueryCount,
                 valueKind: Limited, value: 1000}]} )
  {settings {
    __typename
  }}
}"
}
);


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": {
    "addOrUpdateQueryQuotaDefaultSettings": {
      "settings": [
        {
          "__typename": "QueryQuotaIntervalSetting"
        }
      ]
    }
  }
}

Input Parameters

The required input argument accepts a QueryQuotaDefaultSettingsInput object. This object contains a single field, settings, which accepts a list of QueryQuotaIntervalSettingInput objects. Each object defines one quota rule for a specific interval.

Table: QueryQuotaDefaultSettingsInput Input Datatype

ParameterTypeRequiredDefaultStabilityAvailabilityDescription
Some input parameters may be required, as indicated in the Required column. For return values, this indicates that you are assured a value if the field is requested for the results. 
Table last updated: Oct 14, 2026 
settingsQueryQuotaIntervalSettingInputyes Short-Term The default query quota settings. See QueryQuotaIntervalSettingInput.

The QueryQuotaDefaultSettingsInput datatype references QueryQuotaIntervalSettingInput for interval rule configuration. That sub-datatype is included in the following table.

Table: QueryQuotaIntervalSettingInput Input Datatype

ParameterTypeRequiredDefaultStabilityAvailabilityDescription
Some input parameters may be required, as indicated in the Required column. For return values, this indicates that you are assured a value if the field is requested for the results. 
Table last updated: Oct 14, 2026 
intervalQueryQuotaIntervalyes Short-Term The query quota time interval to use. See QueryQuotaInterval.
measurementKindQueryQuotaMeasurementKindyes Short-Term The kind of measurement used for the query quota. See QueryQuotaMeasurementKind.
valueLong  Short-Term The amount to set for the query quota.
valueKindQueryQuotaIntervalSettingKindyes Short-Term The kind of query quota setting. See QueryQuotaIntervalSettingKind.

Returned Values

The mutation returns the saved default quota configuration as a QueryQuotaDefaultSettings object. The settings list contains one QueryQuotaIntervalSetting entry for each configured interval rule. Each entry includes a source field that identifies whether the rule originates from the system default or from a user-specified override. Rules returned by this mutation always have source set to Default.

Table: QueryQuotaDefaultSettings Datatype

ParameterTypeRequiredDefaultStabilityAvailabilityDescription
Some input parameters may be required, as indicated in the Required column. For return values, this indicates that you are assured a value if the field is requested for the results. 
Table last updated: Oct 14, 2026 
settingsQueryQuotaIntervalSettingyes Short-Term List of the default rules that apply to users. See QueryQuotaIntervalSetting.

Table: QueryQuotaIntervalSetting Datatype

ParameterTypeRequiredDefaultStabilityAvailabilityDescription
Some input parameters may be required, as indicated in the Required column. For return values, this indicates that you are assured a value if the field is requested for the results. 
Table last updated: Oct 14, 2026 
intervalQueryQuotaIntervalyes Short-Term The interval for setting the query quota. See QueryQuotaInterval.
measurementKindQueryQuotaMeasurementKindyes Short-Term The kind of measurement. See QueryQuotaMeasurementKind.
sourceQueryQuotaIntervalSettingSourceyes Short-Term The source of the query quota. See QueryQuotaIntervalSettingSource.
valueLong  Short-Term The query quota value.
valueKindQueryQuotaIntervalSettingKindyes Short-Term The kind of value. See QueryQuotaIntervalSettingKind.