---
title: "Update archive policy"
method: PUT
path: "/api/v1/k8s/logs/archive/policies/{policy_id}"
tags: ["Archive"]
---

# Update archive policy

`PUT /api/v1/k8s/logs/archive/policies/{policy_id}`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/k8s/logs/archive/policies/{policy_id}`
- Auth: none declared

Update an existing archive policy

## Path parameters

- `policy_id` string, required

## Request body

- object

## Response `200`

OK

- K8sLogsK8sLogArchivePolicy
  - `app_names` string[]: Filter by app names
  - `archive_after_days` integer
  - `cluster_ids` string[]: Filter by cluster IDs
  - `compression_type` string
  - `created_at` string
  - `id` string
  - `is_active` boolean
  - `log_levels` string[]: Filter by log levels (ERROR, WARN, INFO, DEBUG)
  - `namespaces` string[]: Kubernetes-specific filters
  - `policy_name` string
  - `retention_days` integer
  - `storage_location` string
  - `updated_at` string

---

[API](https://skmtc.dev/nife/apis/nife-io-swagger-api.md) - [All operations](https://skmtc.dev/nife/apis/nife-io-swagger-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nife/apis/nife-io-swagger-api/revisions/6e868dc62795?raw)
