API Stability Long-Term

The updateLimitV2() GraphQL mutation is used to update the limit with the given name. Only the arguments defined will be updated.

For more information on query quotas, see the Query Quotas documentation page. You may also want to look at Limits & Standards for related information.

Syntax

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

graphql
updateLimitV2(
      input: UpdateLimitInputV2!
   ): LimitV2!

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

Raw
graphql
mutation {
  updateLimitV2( input:
    { id: "abc123",
      userLimit: 10
    }
  )
 { 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 {
  updateLimitV2( input:
    { id: \"abc123\",
      userLimit: 10
    }
  )
 { 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 {
  updateLimitV2( input:
    { id: \"abc123\",
      userLimit: 10
    }
  )
 { 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 { ^
  updateLimitV2( input: ^
    { id: \"abc123\", ^
      userLimit: 10 ^
    } ^
  ) ^
 { id } ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "mutation {
  updateLimitV2( input:
    { id: \"abc123\",
      userLimit: 10
    }
  )
 { 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 {
  updateLimitV2( input:
    { id: \"abc123\",
      userLimit: 10
    }
  )
 { 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 {
  updateLimitV2( input:
    { id: \"abc123\",
      userLimit: 10
    }
  )
 { 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 {
  updateLimitV2( input:
    { id: \"abc123\",
      userLimit: 10
    }
  )
 { 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": {
    "updateLimitV2": {
      "id": "abc123"
    }
  }
}

Given Datatypes

For UpdateLimitInputV2, there are several parameters. Below is a list of them along with a description of each:

Table: UpdateLimitInputV2

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 23, 2024
allowFlightControlboolean  Long-TermWhether to allow Flight control.
allowLoginboolean  Long-TermWhether to allow login.
allowSelfServicestring  Long-TermWhether to allow self service.
dailyIngestlong  Long-TermThe amount of daily ingest allowed.
dailyIngestContractualTypeOrganizations__ContractualType  Long-TermThe contractual type for daily ingest: Limited, Unlimited, or Ignored.
dailyScanlong  Long-TermThe amount of daily scan permitted.
dailyScanContractualTypeOrganizations__ContractualType  Long-TermThe contractual type for daily scans: Limited, Unlimited, or Ignored.
dateTypestring  Long-TermThe data type.
expirationlong  Long-TermThe expiration date.
idstringyes Long-TermThe unique identifier of the limit.
maxRetentioninteger  Long-TermThe maximum retention of events.
measurementTypeOrganizations__MeasurementType  Long-TermThe type of measurement: SegmentWriteSize or ProcessedEventsSize.
namestring  Long-TermThe name of the limit.
repositoryLimitinteger  Long-TermThe limit for the repository.
retentioninteger  Long-TermThe amount of retention.
storageContractualTypeOrganizations__ContractualType  Long-TermThe contractual type for storage: Limited, Unlimited, or Ignored.
trialboolean  Long-TermWhether this is a trial limit.
userLimitinteger  Long-TermThe user limit.

Returned Datatypes

For LimitV2, there are several parameters. Below is a list of them along with a description of each:

Table: LimitV2

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 26, 2025
allowFlightControlbooleanyes Long-TermWhether the customer is allowed flight control.
allowLoginbooleanyes Long-TermWhether the limit allows logging in.
allowSelfServicebooleanyes Long-TermWhether the limit allows self service.
dailyIngestcontractualyes Long-TermThe daily ingest allowed for the limit.
dataScannedLimitcontractualyes Long-TermThe data scanned measurement allowed for the limit. See Limited.
dataTypestringyes Long-TermData type for the limit, all repositories linked to the limit will get this datatype logged in usage.
deletedDatelong  Long-TermThe deleted date for the limit.
expirationDatelong  Long-TermThe expiration date for the limit.
idstringyes Long-TermThe unique identifier of the limit.
limitNamestringyes Long-TermThe name of the limit.
maxRetentionintegeryes Long-TermThe max retention in days allowed for the limit, this can be greater than or equal to retention.
measurementPointOrganizations__MeasurementTypeyes Long-TermThe usage measurement type used for the limit. This datatype is an enumerated list. The choices are SegmentWriteSize and ProcessedEventsSize.
repoLimitinteger  Long-TermThe number of repositories allowed for the limit.
repositories[Repository]yes Long-TermThe repositories related to the limit. See Repository.
retentionintegeryes Long-TermThe retention in days allowed for the limit, that's the contracted value.
storageLimitcontractualyes Long-TermThe amount of storage allowed for the limit. See Limited.
trialbooleanyes Long-TermWhether the limit is a trial.
userLimitcontractualyes Long-TermThe user seats allowed for the limit. See Limited.