---
search:
  tags:
    - database-services
    - POST
seo:
  description: >-
    Validates the change set again on a new read… Reference for the POST
    /api/v1/database-services/{id}/settings/apply endpoint in the TimescaleDB
    Enterprise API.
  noindex: true
sidebar:
  label: Apply settings changes
  badge: POST
title: Apply settings changes
type: openapi-operation
---
Validates the change set again on a new read of pg_settings, stores the desired values with the check of settings_version, and starts the workflow apply_settings. It answers 409 when settings_version is old or when another workflow runs on the service or holds its backup server or DCS cluster, and 422 when a row has an error or no setting waits for its apply. Without changes and yaml, it applies again the overrides that wait for their apply. It answers 501 while the console cannot run the apply.

`POST /api/v1/database-services/{id}/settings/apply`

**Request body** (`application/json`, required)

- `changes` (SettingChangeInput[]) — The changes. Omit changes and yaml to apply again the overrides that wait for their apply.
- `hba` (HbaRule[]) — All HBA rules of the user, in their order (ADR D17), in place of the hba section of yaml. Omit it to keep the rules.
- `hba_version` (string) — With hba: hba.version of the settings read that the user changed. Another version of the rules gives 409, and a change of other settings does not.
- `restart` (string, required) — now: a rolling restart applies the parameters that need a restart. later: they wait for the next restart.
- `settings_version` (integer<int64>, required) — The version that the user saw.
- `yaml` (string) — All overrides as one YAML document (ADR D14), in place of changes.

Request body example:

```json
{
  "changes": [
    {
      "name": "string",
      "scope": "postgresql",
      "value": "string"
    }
  ],
  "hba": [
    {
      "address": "string",
      "comment": "string",
      "database": "string",
      "method": "string",
      "type": "string",
      "user": "string"
    }
  ],
  "hba_version": "string",
  "restart": "now",
  "settings_version": 0,
  "yaml": "string"
}
```

**Responses**

- `202` — Accepted
- `default` — Error

Response example, 202:

```json
{
  "settings_version": 0,
  "workflow_id": "string"
}
```
