Summary

The updateLimitV2() mutation updates a named limit in LogScale. Only the fields you supply in the input are updated; omitted fields retain their current values. Use this mutation to adjust ingestion caps, storage quotas, retention periods, user limits, or trial status for an existing limit record.

Syntax

graphql
updateLimitV2(
      input: UpdateLimitInputV2!
   ): LimitV2!

The mutation accepts a single required argument, input, of type UpdateLimitInputV2!. The input requires the id of the limit to update; all other input fields are optional. The mutation returns a non-null LimitV2! object representing the updated limit.

Input parameters

The id field is required and identifies the limit to update. All other fields are optional; include only the fields whose values you want to change. The following table describes each input field:

Table: UpdateLimitInputV2 Input Datatype

ParameterTypeRequiredDefaultStabilityAvailabilityDescription
allowFlightControlBoolean  Long-Term Whether to allow Flight control.
allowLoginBoolean  Long-Term Whether to allow login.
allowSelfServiceBoolean  Long-Term Whether to allow self service.
dailyIngestLong  Long-Term The amount of daily ingest allowed.
dailyIngestContractualTypeOrganizations__ContractualType  Long-Term The contractual type for daily ingest: Limited, Unlimited, or Ignored.
dailyScanLong  Long-Term The amount of daily scan permitted.
dailyScanContractualTypeOrganizations__ContractualType  Long-Term The contractual type for daily scans: Limited, Unlimited, or Ignored.
dateTypeString  Long-Term The data type.
expirationLong  Long-Term The expiration date.
idStringyes Long-Term The unique identifier of the limit.
maxRetentionInt  Long-Term The maximum retention of events.
measurementTypeOrganizations__MeasurementType  Long-Term The type of measurement: SegmentWriteSize or ProcessedEventsSize.
nameString  Long-Term The name of the limit.
repositoryLimitInt  Long-Term The limit for the repository.
retentionInt  Long-Term The amount of retention.
storageContractualTypeOrganizations__ContractualType  Long-Term The contractual type for storage: Limited, Unlimited, or Ignored.
trialBoolean  Long-Term Whether this is a trial limit.
userLimitInt  Long-Term The user limit.

Example

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 $TOKEN = "TOKEN";

my $uri = '$YOUR_LOGSCALE_URL/graphql';

my $query = "mutation {
  updateLimitV2( input:
    { id: \"abc123\",
      userLimit: 10
    }
  )
 { 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 {
  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',
  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"
    }
  }
}

Returned values

The mutation returns a LimitV2! object representing the updated limit record. The object includes fields for user limits, storage quotas, daily ingestion caps, retention periods, and contractual type classifications. The following table lists the available fields:

Table: LimitV2 Datatype

ParameterTypeRequiredDefaultStabilityAvailabilityDescription
allowFlightControlBooleanyes Long-Term Whether the customer is allowed flight control.
allowLoginBooleanyes Long-Term Whether the limit allows logging in.
allowSelfServiceBooleanyes Long-Term Whether the limit allows self service.
dailyIngestcontractualyes Long-Term The daily ingest allowed for the limit.
dataScannedLimitcontractualyes Long-Term The data scanned measurement allowed for the limit. See Limited.
dataTypeStringyes Long-Term Data type for the limit, all repositories linked to the limit will get this datatype logged in usage.
deletedDateLong  Long-Term The deleted date for the limit.
displayNameStringyes Long-Term The display name of the limit.
expirationDateLong  Long-Term The expiration date for the limit.
idStringyes Long-Term The unique identifier of the limit.
limitNameStringyes Long-Term The limit name Stability: Long-term
maxRetentionIntyes Long-Term The max retention in days allowed for the limit, this can be greater than or equal to retention Stability: Long-term
measurementPointOrganizations__MeasurementTypeyes Long-Term The usage measurement type used for the limit Stability: Long-term
repoLimitInt  Long-Term The number of repositories allowed for the limit Stability: Long-term
repositoriesRepositoryyes Long-Term The repositories related to the limit. See Repository.
retentionIntyes Long-Term The retention in days allowed for the limit, that's the contracted value.
storageLimitcontractualyes Long-Term The amount of storage allowed for the limit Stability: Long-term
trialBooleanyes Long-Term Whether the limit is a trial.
userLimitcontractualyes Long-Term The user seats allowed for the limit Stability: Long-term