Summary

The updatePersistedAggregationMetadata() GraphQL mutation is used to update metadata of an existing persisted aggregation (e.g., name, description, labels).

Stability Level Preview

Syntax

graphql
updatePersistedAggregationMetadata(
     input: UpdatePersistedAggregationMetadataInput!
   ): PersistedAggregation!

For the input, you'll have to give the unique identifier of the persisted aggregation to change (use persistedAggregations() to get the identifier). You'll also have to enter what you want to change: the name, description, or all of the labels. See the Input Parameters section for details.

For the results, you can get the name, description, and the labels — the values you may have or didn't change — as well as a few other items. See the Returned Values section. It returns FieldValidationException on validation errors.

Example

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

Input Parameters

For the input, you'll have to provide the unique identifier of the persisted aggregation to change. You can first use the persistedAggregations() query to get the identifier. You'll also have to enter what you want to change: the name, description, or labels. Whatever you don't enter, won't be changed. As for labels, to make a change, you have to give a complete list; you can't add or delete one and leave the others in place.

Table: UpdatePersistedAggregationMetadataInput Input Datatype

ParameterTypeRequiredDefaultStabilityDescription
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: Apr 6, 2026
descriptionstring  PreviewA new description with a maximum of 1024 characters. If not provided, the description is unchanged.
idstringyes PreviewThe unique identifier of the persisted aggregation to change.
labels[string]  PreviewA list of replacement labels, which are non-empty, contain only no more than sixty-four alphanumeric characters, spaces, hyphens, or underscores.
namestring  PreviewThe name for the persisted aggregation. Must start with an alphanumeric character, but can also contain spaces, hyphens, and underscores — for a maximum of 128 characters.

Returned Values

For the results, you may want to get the returned values you didn't change (i.e., the name, description, or labels). There are a few other items you can get. They're listed in the table below:

Table: PersistedAggregation Datatype

ParameterTypeRequiredDefaultStabilityDescription
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: May 12, 2026
createdInfoPersistedAggregationCommitMetadatayes PreviewMetadata related to the creation of the persisted aggregation. See PersistedAggregationCommitMetadata.
descriptionstring  PreviewThe description of the persisted aggregation.
enabledbooleanyes PreviewWhether the persisted aggregation is enabled.
destinationRepository  PreviewThe destination repository where aggregation output data is written. This is immutable after creation. See Repository.
healthInfoPersistedAggregationHealthInfo  PreviewDerived health status information for the persisted aggregation. See PersistedAggregationHealthInfo.
idstringyes PreviewThe unique identifier of the persisted aggregation.
labels[string]yes PreviewThe labels associated with the aggregation.
modifiedInfoPersistedAggregationCommitMetadata  PreviewMetadata related to the last modification of the persisted. See PersistedAggregationCommitMetadata.
namestringyes PreviewThe name of the persisted aggregation.
queryOwnershipTypestringyes PreviewThe ownership type of the query.
queryStringstringyes PreviewThe query string for the aggregation.
schedulePersistedAggregationScheduleyes PreviewThe schedule configuration for the aggregation. See PersistedAggregationSchedule.
searchDomainSearchDomain  PreviewThe view or repository to which this persisted aggregation belongs. See SearchDomain.
staticFields[PersistedAggregationStaticField]yes PreviewStatic key-value fields attached to each result event. See PersistedAggregationStaticField.
tagstringyes PreviewThe unique tag identifier for the persisted aggregation. Immutable after creation.