API Stability Long-Term

The updateRetention() GraphQL mutation is used to update the retention policy of a repository in LogScale.

For information on data retention in repositories, see the Data Retention documentation page.

Syntax

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

graphql
updateRetention(
      repositoryName: string!
      timeBasedRetention: float
      ingestSizeBasedRetention: float
      storageSizeBasedRetention: float
      timeBasedBackupRetention: float
   ): UpdateRetentionMutation!

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

Show:
graphql
mutation {
  updateRetention(
       repositoryName: "Testeroo",
       storageSizeBasedRetention: 50
  )
  { repository { id } }
}
Example Responses
Show:
json
{
  "data": {
    "updateRetention": {
      "repository": {
        "id": "cfeQriTyDwPerwIPCGw505lp"
      }
    }
  }
}

Returned Datatypes

The returned datatype UpdateRetentionMutation has one parameter and several sub-parameters. Click on the link below to see a table containing the sub-parameters:

Table: UpdateRetentionMutation

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: Oct 4, 2024
repositorysearchDomainyes Long-TermThe repository for which to update retention. See searchDomain.