---
title: "Change policy"
method: PATCH
path: "/cdn/logs_uploader/policies/{id}"
tags: ["Logs uploader"]
---

# Change policy

`PATCH /cdn/logs_uploader/policies/{id}`

Change logs uploader policy partially.

## Path parameters

- `id` integer, required

## Request body

- PatchLogsUploaderPolicy
  - `include_empty_logs` boolean — Include empty logs in the upload.
  - `include_shield_logs` boolean — Include logs from origin shielding in the upload.
  - `name` string — Name of the policy.
  - `description` string — Description of the policy.
  - `retry_interval_minutes` integer — Interval in minutes to retry failed uploads.
  - `rotate_interval_minutes` integer — Interval in minutes to rotate logs.
  - `rotate_threshold_mb` integer, nullable — Threshold in MB to rotate logs.
  - `rotate_threshold_lines` integer — Threshold in lines to rotate logs.
  - `date_format` string — Date format for logs.
  - `field_delimiter` string — Field delimiter for logs.
  - `field_separator` string — Field separator for logs.
  - `fields` string[] — List of fields to include in logs.
  - `file_name_template` string — Template for log file name.
  - `format_type` 'json' | '' — Format type for logs. Possible values: - **""** - empty, it means it will apply the format configurations from the policy. - **"json"** - output the logs as json lines.
  - `tags` object — Tags allow for dynamic decoration of logs by adding predefined fields to the log format. These tags serve as customizable key-value pairs that can be included in log entries to enhance context and readability.
  - `escape_special_characters` boolean — When set to true, the service sanitizes string values by escaping characters that may be unsafe for transport, logging, or downstream processing. The following categories of characters are escaped: - Control and non-printable characters - Quotation marks and escape characters - Characters outside the standard ASCII range The resulting output contains only printable ASCII characters.
  - `log_sample_rate` number, float — Sampling rate for logs. A value between 0 and 1 that determines the fraction of log entries to collect. - **1** - collect all logs (default). - **0.5** - collect approximately 50% of logs. - **0** - collect no logs (effectively disables logging without removing the policy).

## Response `200`

Successful.

- LogsUploaderPolicyResponse
  - `id` integer
  - `client_id` integer — Client that owns the policy.
  - `created` string, date-time — Time when logs uploader policy was created.
  - `updated` string, date-time — Time when logs uploader policy was updated.
  - `include_empty_logs` boolean — Include empty logs in the upload.
  - `include_shield_logs` boolean — Include logs from origin shielding in the upload.
  - `name` string — Name of the policy.
  - `description` string — Description of the policy.
  - `retry_interval_minutes` integer — Interval in minutes to retry failed uploads.
  - `rotate_interval_minutes` integer — Interval in minutes to rotate logs.
  - `rotate_threshold_mb` integer, nullable — Threshold in MB to rotate logs.
  - `rotate_threshold_lines` integer — Threshold in lines to rotate logs.
  - `date_format` string — Date format for logs.
  - `field_delimiter` string — Field delimiter for logs.
  - `field_separator` string — Field separator for logs.
  - `fields` string[] — List of fields to include in logs.
  - `file_name_template` string — Template for log file name.
  - `format_type` 'json' | '' — Format type for logs. Possible values: - **""** - empty, it means it will apply the format configurations from the policy. - **"json"** - output the logs as json lines.
  - `tags` object — Tags allow for dynamic decoration of logs by adding predefined fields to the log format. These tags serve as customizable key-value pairs that can be included in log entries to enhance context and readability.
  - `escape_special_characters` boolean — When set to true, the service sanitizes string values by escaping characters that may be unsafe for transport, logging, or downstream processing. The following categories of characters are escaped: - Control and non-printable characters - Quotation marks and escape characters - Characters outside the standard ASCII range The resulting output contains only printable ASCII characters.
  - `log_sample_rate` number, float — Sampling rate for logs. A value between 0 and 1 that determines the fraction of log entries to collect. - **1** - collect all logs (default). - **0.5** - collect approximately 50% of logs. - **0** - collect no logs (effectively disables logging without removing the policy).
  - `related_uploader_configs` integer[] — List of logs uploader configs that use this policy.

## Other responses

- `400` — You will receive an error with the invalid parameter mentioned.
- `403` — Feature is disabled for your account.
- `404` — Policy do not exist or has been deleted.

---

[API](https://skmtc.net/g-core/apis/gcore-openapi.md) · [All operations](https://skmtc.net/g-core/apis/gcore-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/g-core/gcore-openapi/versions/09e652815095/schema)
