---
title: "Update a partition."
method: PUT
path: "/v1/partitions/{id}"
tags: ["partitionManagement"]
---

# Update a partition.

`PUT /v1/partitions/{id}`

Update an existing partition in the organization.

## Path parameters

- `id` string, required

## Request body

- UpdatePartitionDefinition
  - `retentionPeriod` integer — The number of days to retain data in the partition, or -1 to use the default value for your account. Only relevant if your account has variable retention enabled.
  - `reduceRetentionPeriodImmediately` boolean — This is required if the newly specified `retentionPeriod` is less than the existing retention period. In such a situation, a value of `true` says that data between the existing retention period and the new retention period should be deleted immediately; if `false`, such data will be deleted after seven days. This property is optional and ignored if the specified `retentionPeriod` is greater than or equal to the current retention period.
  - `isCompliant` boolean — Whether to mark a partition as compliant. Mark a partition as compliant if it contains data used for compliance or audit purpose. Retention for a compliant partition can only be increased and cannot be reduced after the partition marked as compliant. A partition once marked compliant, cannot be marked non-compliant later.
  - `isIncludedInDefaultSearch` boolean — Indicates whether the partition is included in the default search scope. When executing a query such as "error | count," certain partitions are automatically part of the search scope. However, for specific partitions, the user must explicitly mention the partition using the _index term, as in "_index=webApp error | count". This property governs the default inclusion of the partition in the search scope. Configuring this property is exclusively permitted for flex partitions.
  - `routingExpression` string — The query that defines the data to be included in the partition.

## Response `200`

The partition was successfully modified.

- Partition
  - `name` string, required — The name of the partition.
  - `routingExpression` string, required — The query that defines the data to be included in the partition.
  - `analyticsTier` string — The Data Tier where the data in the partition will reside. Possible values are: 1. `continuous` 2. `frequent` 3. `infrequent` Note: The "infrequent" and "frequent" tiers are only available to Cloud Flex Credits Enterprise Suite accounts.
  - `retentionPeriod` integer — The number of days to retain data in the partition, or -1 to use the default value for your account. Only relevant if your account has variable retention enabled.
  - `isCompliant` boolean — Whether the partition is compliant or not. Mark a partition as compliant if it contains data used for compliance or audit purpose. Retention for a compliant partition can only be increased and cannot be reduced after the partition is marked compliant. A partition once marked compliant, cannot be marked non-compliant later.
  - `isIncludedInDefaultSearch` boolean — Indicates whether the partition is included in the default search scope. When executing a query such as "error | count," certain partitions are automatically part of the search scope. However, for specific partitions, the user must explicitly mention the partition using the _index term, as in "_index=webApp error | count". This property governs the default inclusion of the partition in the search scope. Configuring this property is exclusively permitted for flex partitions.
  - `newRetentionPeriod` integer — If the retention period is scheduled to be updated in the future (i.e., if retention period is previously reduced with value of reduceRetentionPeriodImmediately as false), this property gives the future value of retention period while retentionPeriod gives the current value. retentionPeriod will take up the value of newRetentionPeriod after the scheduled time.
  - `retentionEffectiveAt` string, date-time — When the newRetentionPeriod will become effective in UTC format.
  - `createdAt` string, date-time, required — Creation timestamp in UTC in [RFC3339](https://tools.ietf.org/html/rfc3339) format.
  - `createdBy` string, required — Identifier of the user who created the resource.
  - `modifiedAt` string, date-time, required — Last modification timestamp in UTC.
  - `modifiedBy` string, required — Identifier of the user who last modified the resource.
  - `id` string, required — Unique identifier for the partition.
  - `totalBytes` integer, required — Size of data in partition in bytes.
  - `isActive` boolean — This has the value `true` if the partition is active and `false` if it has been decommissioned.
  - `indexType` string — This has the value `DefaultIndex`, `AuditIndex`or `Partition` depending upon the type of partition.
  - `dataForwardingId` string — Id of the data forwarding configuration to be used by the partition.

## Other responses

- `default` — Operation failed with an error.

---

[API](https://skmtc.net/sumologic/apis/sumo-logic-api.md) · [All operations](https://skmtc.net/sumologic/apis/sumo-logic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sumologic/sumo-logic-api/revisions/18a824df1e78/schema)
