# Platform Defaults API

Source: https://userguide.qualytics.io/settings/platform-defaults/api/

The Platform Defaults API lets you retrieve the current Platform Defaults for your workspace and update them programmatically, with an optional propagation flag that overwrites the corresponding values on every existing datastore and container.

Observability and Profile defaults apply only to source datastores, not enrichment datastores. Scan defaults apply to source and enrichment datastores. Enrichment datastores start with observability tracking disabled and AI Effort **Off**; you can configure their own Profile settings separately.

> **Tip**
>
> For complete API documentation, including request/response schemas, visit the [API docs](https://userguide.qualytics.io/api/docs).

All endpoints use the base URL of your Qualytics deployment (e.g., `https://your-instance.qualytics.io/api`).

---

## Get Platform Defaults

Retrieve the current Platform Defaults for the workspace.

**Endpoint**: `GET /api/settings/global-defaults`

**Permission**: Manager user role or higher.

> **Example: Example request and response**
>
> **Request**:
>
> ```bash
> curl -X GET "https://your-instance.qualytics.io/api/settings/global-defaults" \
>   -H "Authorization: Bearer YOUR_TOKEN"
> ```
>
> **Response**:
>
> ```json
> {
>   "volumetric_tracking_enabled": false,
>   "automate_volumetric_checks": false,
>   "freshness_tracking_enabled": false,
>   "automate_freshness_checks": false,
>   "ai_effort": "medium",
>   "infer_as_draft": false,
>   "high_count_rollup_threshold": 10,
>   "enrichment_source_record_limit": 10,
>   "one_record_anomaly_per_check": false,
>   "sync_analysis_concurrency": 16
> }
> ```
>
> > **Note**
> >
> > `GET` returns the defaults as a flat object. `PATCH` wraps the same fields under a `settings` key and adds a `propagation` key (shown below), because a `PATCH` can also report what propagation did.

---

## Update Platform Defaults

Update one or more Platform Defaults. This endpoint uses partial update semantics: only the fields you include in the request body are changed. Omitted fields remain unchanged.

**Endpoint**: `PATCH /api/settings/global-defaults`

**Permission**: Admin user role.

**Query parameters**:

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `propagate` | `boolean` | `false` | When `true`, saved Observability and Profile values are also written to existing source datastores. Observability values also apply to their non-deleted containers. Scan values apply to existing source and enrichment datastores; `one_record_anomaly_per_check` also applies to their non-deleted containers. `sync_analysis_concurrency` is never propagated: it is one value for the whole deployment, not a per-datastore default, so propagation ignores it even when it is in the same request. |

**Request Body**:

| Field | Type | Range | Qualytics default | Description |
| --- | --- | --- | --- | --- |
| `volumetric_tracking_enabled` | `boolean` | true / false | `false` | Turns on daily recording of volume metrics for each container. |
| `automate_volumetric_checks` | `boolean` | true / false | `false` | Automatically creates an AI volumetric check for each tracked container. Coupled with `volumetric_tracking_enabled`. |
| `freshness_tracking_enabled` | `boolean` | true / false | `false` | Turns on daily recording of the last time data was added or updated. |
| `automate_freshness_checks` | `boolean` | true / false | `false` | Automatically creates an AI freshness check for each tracked container. Coupled with `freshness_tracking_enabled`. |
| `ai_effort` | `string` | `off`, `low`, `medium`, `high`, `xhigh`, `max` | `medium` | Effort level Qualytics AI uses when generating checks during a profile operation. The six values map to the UI slider stops **Off**, **Low**, **Medium**, **High**, **Extra High**, and **Max**. |
| `infer_as_draft` | `boolean` | true / false | `false` | When `true`, AI-generated checks are saved as drafts and require review before they activate. When `false`, they activate as soon as the profile completes. |
| `high_count_rollup_threshold` | `integer` | 1 to 1000 | `10` | How many record anomalies can be created per check before they are grouped into one rolled-up anomaly. Values above 1000 are silently capped. |
| `enrichment_source_record_limit` | `integer` | 1 to 1,000,000,000 | `10` | How many source records are stored in your enrichment destination as examples per failing check. |
| `one_record_anomaly_per_check` | `boolean` | true / false | `false` | `false` gives a view centered on the source record: a record that fails several checks produces one anomaly listing all of them. `true` gives a view centered on the check: the record produces one record anomaly per failed check, even when several checks flag the same record. Shape anomalies are always one per failed check. With `propagate=true`, the value is also written to existing datastores (as `default_one_record_anomaly_per_check`) and their containers. There is no per-scan equivalent. See [One anomaly per check](https://userguide.qualytics.io/settings/platform-defaults/deep-dive/how-it-works/#one-anomaly-per-check). |
| `sync_analysis_concurrency` | `integer` | 1 to 256 | `16` | How many tables or files a Sync analyzes at the same time. One value for the whole deployment, applied to the next Sync that starts, with no restart. Values outside the range are rejected with `422`. |

> **Warning: Coupling of tracking and automation**
>
> `automate_volumetric_checks=true` cannot be stored without `volumetric_tracking_enabled=true`. On save, Qualytics silently normalizes the request to enforce this invariant. When both fields are submitted together, automation wins: `automate_volumetric_checks=true` combined with `volumetric_tracking_enabled=false` results in `volumetric_tracking_enabled=true`. When only tracking is submitted, tracking wins: setting `volumetric_tracking_enabled=false` while the stored `automate_volumetric_checks` is `true` sets `automate_volumetric_checks=false`. The same coupling applies to the freshness pair.

> **Example: Update Profile defaults without propagation**
>
> Set the default AI Effort to **high** and keep AI-generated checks as drafts:
>
> **Request**:
>
> ```bash
> curl -X PATCH "https://your-instance.qualytics.io/api/settings/global-defaults" \
>   -H "Authorization: Bearer YOUR_TOKEN" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "ai_effort": "high",
>     "infer_as_draft": true
>   }'
> ```
>
> **Response**:
>
> ```json
> {
>   "settings": {
>     "volumetric_tracking_enabled": false,
>     "automate_volumetric_checks": false,
>     "freshness_tracking_enabled": false,
>     "automate_freshness_checks": false,
>     "ai_effort": "high",
>     "infer_as_draft": true,
>     "high_count_rollup_threshold": 10,
>     "enrichment_source_record_limit": 10,
>     "one_record_anomaly_per_check": false,
>     "sync_analysis_concurrency": 16
>   },
>   "propagation": null
> }
> ```

> **Example: Update Observability defaults and propagate**
>
> Turn on Volume Tracking + AI volumetric checks for every existing source datastore and its containers:
>
> **Request**:
>
> ```bash
> curl -X PATCH "https://your-instance.qualytics.io/api/settings/global-defaults?propagate=true" \
>   -H "Authorization: Bearer YOUR_TOKEN" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "volumetric_tracking_enabled": true,
>     "automate_volumetric_checks": true
>   }'
> ```
>
> **Response**:
>
> ```json
> {
>   "settings": {
>     "volumetric_tracking_enabled": true,
>     "automate_volumetric_checks": true,
>     "freshness_tracking_enabled": false,
>     "automate_freshness_checks": false,
>     "ai_effort": "medium",
>     "infer_as_draft": false,
>     "high_count_rollup_threshold": 10,
>     "enrichment_source_record_limit": 10,
>     "one_record_anomaly_per_check": false,
>     "sync_analysis_concurrency": 16
>   },
>   "propagation": {
>     "updated": 3,
>     "skipped": 0,
>     "datastores_updated": 3,
>     "containers_updated": 12
>   }
> }
> ```

> **Example: Update Scan defaults**
>
> Cap record anomalies at 100 per check and store up to 25 source examples per anomaly:
>
> **Request**:
>
> ```bash
> curl -X PATCH "https://your-instance.qualytics.io/api/settings/global-defaults" \
>   -H "Authorization: Bearer YOUR_TOKEN" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "high_count_rollup_threshold": 100,
>     "enrichment_source_record_limit": 25
>   }'
> ```
>
> **Response**:
>
> ```json
> {
>   "settings": {
>     "volumetric_tracking_enabled": false,
>     "automate_volumetric_checks": false,
>     "freshness_tracking_enabled": false,
>     "automate_freshness_checks": false,
>     "ai_effort": "medium",
>     "infer_as_draft": false,
>     "high_count_rollup_threshold": 100,
>     "enrichment_source_record_limit": 25,
>     "one_record_anomaly_per_check": false,
>     "sync_analysis_concurrency": 16
>   },
>   "propagation": null
> }
> ```

> **Example: Update the Sync default**
>
> Let a Sync analyze 32 tables or files at once. The `propagate` flag is irrelevant here, since this value is never propagated:
>
> **Request**:
>
> ```bash
> curl -X PATCH "https://your-instance.qualytics.io/api/settings/global-defaults" \
>   -H "Authorization: Bearer YOUR_TOKEN" \
>   -H "Content-Type: application/json" \
>   -d '{
>     "sync_analysis_concurrency": 32
>   }'
> ```
>
> **Response**:
>
> ```json
> {
>   "settings": {
>     "volumetric_tracking_enabled": false,
>     "automate_volumetric_checks": false,
>     "freshness_tracking_enabled": false,
>     "automate_freshness_checks": false,
>     "ai_effort": "medium",
>     "infer_as_draft": false,
>     "high_count_rollup_threshold": 10,
>     "enrichment_source_record_limit": 10,
>     "one_record_anomaly_per_check": false,
>     "sync_analysis_concurrency": 32
>   },
>   "propagation": null
> }
> ```

For the UI equivalent, see the [Configure Observability Defaults](https://userguide.qualytics.io/settings/platform-defaults/how-tos/configure-observability-defaults/), [Configure Sync Defaults](https://userguide.qualytics.io/settings/platform-defaults/how-tos/configure-sync-defaults/), [Configure Profile Defaults](https://userguide.qualytics.io/settings/platform-defaults/how-tos/configure-profile-defaults/), and [Configure Scan Defaults](https://userguide.qualytics.io/settings/platform-defaults/how-tos/configure-scan-defaults/) pages.

---

## Error Responses

| Status Code | Description |
| --- | --- |
| `401 Unauthorized` | Missing or invalid API token. |
| `403 Forbidden` | User does not have the required role (Manager for GET, Admin for PATCH). |
| `422 Unprocessable Entity` | Invalid request body (e.g., `ai_effort` outside the accepted set, a rollup threshold below 1, a source record limit above 1,000,000,000, or a sync concurrency outside 1 to 256). |

> **Example: Error response examples**
>
> **403 Forbidden** on PATCH without Admin role:
>
> ```json
> { "detail": "Required role(s): ['Admin']" }
> ```
>
> **422 Unprocessable Entity** on invalid effort value:
>
> ```json
> { "detail": [{ "type": "enum", "loc": ["body", "ai_effort"], "msg": "Input should be 'off', 'low', 'medium', 'high', 'xhigh' or 'max'" }] }
> ```

---

## Permission Summary

| Operation | Minimum Permission |
| --- | --- |
| Get Platform Defaults | Manager user role |
| Update Platform Defaults | Admin user role |
| Update Platform Defaults with `propagate=true` | Admin user role |

*Last updated: November 4, 2026.*
