Summary

The removeExpirationFromLimit() mutation removes the expiration date from an organization limit, making the limit permanent. Use this mutation when a limit's temporary expiration no longer applies. After this mutation completes, the limit remains active indefinitely until explicitly removed or updated.

This mutation requires either ManageClusters or ManageOrganizations permission on the cluster.

Syntax

graphql
removeExpirationFromLimit(
      input: RemoveExpirationFromLimitInput!
   ): LimitV2!

The mutation accepts a single required input argument of type RemoveExpirationFromLimitInput!. The input requires the unique identifier of the limit whose expiration date you want to remove. Use the organization() query to retrieve the limit identifier.

Input parameters

The input argument accepts a RemoveExpirationFromLimitInput object. The required field is id, the unique identifier of the limit whose expiration date to remove. Retrieve this value from the limitsV2 { id } field on the organization.

Table: RemoveExpirationFromLimitInput Input Datatype

ParameterTypeRequiredDefaultStabilityAvailabilityDescription
idStringyes    

Example

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

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 {
  removeExpirationFromLimit(
    input: { id: \"abc123\" }
  ) {id, limitName } }
}"
}
);


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": {
    "removeExpirationFromLimit": {
      "id": "abc123",
      "name": "ltd-1"
    }
  }
}

Returned values

The mutation returns a non-null LimitV2! object representing the updated limit. The returned fields cover ingest quotas, storage limits, retention settings, and access controls. After this mutation succeeds, the expiration field on the returned object is null, confirming that the limit is now permanent. Use the id field to reference the limit in subsequent operations.