> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fiddler.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Configurations

> REST API endpoints for reading and changing runtime configurations, such as data retention periods, in Fiddler Platform.

> [!NOTE]
>
> This capability is currently in [private preview](/reference/feature-maturity-definitions#private-preview) and is not yet available to all customers. Contact your Fiddler Customer Success Manager to request access.

The Configurations endpoints (the Config Manager API) let organization administrators read and change certain Fiddler settings at runtime,
without redeploying.
A configuration applies at one scope: your organization, a project, or a model.
When the same setting is configured at more than one scope, the most specific scope wins.

> [!WARNING]
>
> **Retention settings permanently delete data.**
> Once a retention period is applied, data older than that period is deleted by background processes and cannot be recovered.
> For ML model events set at `MODEL` scope, and for GenAI metrics, shortening the period also deletes existing data older than the new period.
> For GenAI traces, the new period applies only to data ingested after the change.
> Contact your Fiddler Customer Success Manager before setting or shortening a retention period.

## Data Retention Settings

This reference documents the data retention settings below.
The API accepts other registered settings too;
contact your Fiddler Customer Success Manager before changing any of them.

| Setting (`name`) | What it controls | Scopes (`source_name`) | Minimum |
| - | - | - | - |
| `PROD_EVENTS_TTL_DAYS` | Retention period, in days, for ML model production events | `ORGANIZATION`, `PROJECT`, `MODEL` | 7 days |
| `GENAI_TRACES_TTL_DAYS` | Retention period, in days, for raw GenAI trace and span data | `ORGANIZATION` | 7 days, unless your deployment sets a different minimum |
| `GENAI_METRICS_TTL_DAYS` | Retention period, in days, for pre-aggregated GenAI metrics | `ORGANIZATION` | 60 days |

For `ORGANIZATION` scope, `source_id` is your organization's UUID.
For `PROJECT` and `MODEL` scope, it is the project or model UUID.

## Things to Know

* **Create once, then update.** Each setting can be created only once per scope.
  If it already exists, creating it returns `409 Conflict`.
  A setting can exist before you first create it: on deployments where stored values take effect, Fiddler copies retention values set as environment variables into organization-level configurations at startup.
  To change a value, find the configuration's `id` with [List configurations](/sdk-api/rest-api/configurations/get-configurations), then call [Update configuration value](/sdk-api/rest-api/configurations/update-configuration).
* **Use the configuration's own ID.** Update, get, and delete take the configuration's `id`, not the ID of the model, project, or organization it applies to.
* **Retention changes are applied asynchronously.** For retention settings, the update response returns the **previous** value.
  The stored value changes only after the new retention period has been applied.
  Creating a configuration saves the value first and applies it afterward, so a successful create response doesn't mean the retention period is in effect yet.
  Poll [Get configuration details](/sdk-api/rest-api/configurations/get-configuration) until `value` shows the new value.
* **ML event retention on existing models must be set per model.** `PROD_EVENTS_TTL_DAYS` set at `ORGANIZATION` or `PROJECT` scope applies only to models created afterward.
  To apply a retention period to an existing model, set it at `MODEL` scope.
* **Deleting a configuration does not remove retention.** Data keeps being deleted on the schedule that was already applied.
  Organization-level configurations cannot be deleted.

> **[Create a new configuration](/sdk-api/rest-api/configurations/add-configuration)**
>
> `POST /v3/configurations`

> **[Delete configuration](/sdk-api/rest-api/configurations/delete-configuration)**
>
> `DELETE /v3/configurations/{configuration_id}`

> **[Get configuration details](/sdk-api/rest-api/configurations/get-configuration)**
>
> `GET /v3/configurations/{configuration_id}`

> **[List configurations](/sdk-api/rest-api/configurations/get-configurations)**
>
> `GET /v3/configurations`

> **[Update configuration value](/sdk-api/rest-api/configurations/update-configuration)**
>
> `PATCH /v3/configurations/{configuration_id}`
