---
title: "Enable log collection for a cluster"
method: POST
path: "/api/v1/k8s/logs/config"
tags: ["Collection Config"]
---

# Enable log collection for a cluster

`POST /api/v1/k8s/logs/config`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/k8s/logs/config`
- Auth: none declared

Save user's collection preferences for a specific cluster

## Request body

- K8sLogsCollectionConfigRequest
  - `app_filter` string
  - `cluster_id` string
  - `collection_interval` integer: In minutes
  - `exclude_namespaces` string[]
  - `is_enabled` boolean
  - `log_levels` string[]
  - `max_logs_per_collection` integer: Changed to *int
  - `namespace` string: Assuming single namespace

## Response `201`

Created

- object

---

[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)
