---
search:
  tags:
    - database-services
    - PATCH
seo:
  description: >-
    set_extensions takes the extension list, or an object with… Reference for
    the PATCH /api/v1/database-services/{id} endpoint in the TimescaleDB
    Enterprise API.
  noindex: true
sidebar:
  label: Update a database service
  badge: PATCH
title: Update a database service
type: openapi-operation
---
set_extensions takes the extension list, or an object with extensions (the list) and versions (the package version of each new extension, by name, from check.extensions of GET /packs/available). The version of an extension of the service does not change. A new extension needs its package in the server packages of each server (409 with the text of the deploy check). A deploy installs the new extensions. add_extension takes &#123;name, version&#125; (version optional) and remove_extension takes &#123;name&#125;: they change one extension of the stored list and keep the other extensions as they are at that time, so a concurrent change of the list stays. An add of an extension of the list, and a remove of an extension that is not in the list, change nothing.

`PATCH /api/v1/database-services/{id}`

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

- `operations` (DatabaseServiceOperation[])

Request body example:

```json
{
  "operations": [
    {
      "op": "string",
      "value": null
    }
  ]
}
```

**Responses**

- `200` — OK
- `default` — Error

Response example, 200:

```json
{
  "apply_pending": {
    "caps_stale": true,
    "guard_missing": true,
    "licensing_setup": true,
    "restart_marker": true
  },
  "backupConfigOutOfSync": true,
  "backupNeedsAttention": true,
  "backupUnprotected": true,
  "components": [
    {
      "name": "string",
      "server_ids": [
        "string"
      ]
    }
  ],
  "connection_strings": [
    {
      "recommended": true,
      "service": "postgres",
      "uri": "string"
    }
  ],
  "connections": [
    {
      "database": "string",
      "forwarded": true,
      "host": "string",
      "password": "string",
      "pooled": true,
      "port": 0,
      "type": "postgres",
      "username": "string"
    }
  ],
  "created_at": "string",
  "data_dir": "string",
  "database_name": "string",
  "dcs_cluster_id": "string",
  "dcs_cluster_name": "string",
  "dcs_cluster_used_by_count": 0,
  "demo_memory_mb": 0,
  "extension_versions": {
    "property1": "string",
    "property2": "string"
  },
  "extensions": [
    "string"
  ],
  "health": {
    "checked_at": "2019-08-24T14:15:22Z",
    "components": [
      {
        "key": "patroni",
        "message": "string",
        "name": "string",
        "status": "healthy"
      }
    ],
    "reason": "string",
    "since": "2019-08-24T14:15:22Z",
    "status": "healthy"
  },
  "id": "string",
  "license_enforced": true,
  "license_file": "string",
  "license_grant_missing": true,
  "license_max_machines": 0,
  "license_max_memory_gb": 0,
  "license_max_vcpus": 0,
  "license_tier": "string",
  "livesync_target": true,
  "name": "string",
  "pack_release": "string",
  "password_redacted": true,
  "pg_version": "string",
  "pg_version_minor": "string",
  "postgresql_exists": true,
  "redeploy_recommended": true,
  "servers": [
    {
      "host": "string",
      "id": "string",
      "lan_address_change": {
        "changed_at": "2019-08-24T14:15:22Z",
        "current": "string",
        "previous": "string"
      },
      "license_cap_stale": true,
      "license_capped": true,
      "memory_gb": 0,
      "name": "string",
      "rebuild_error": "string",
      "rebuild_pending": true,
      "rebuild_state": "string",
      "restart_pending": true,
      "role": "string",
      "vcpus": 0,
      "vip_problem": "string"
    }
  ],
  "size": "string",
  "slots": [
    {
      "member_name": "string",
      "previous_server_id": "string",
      "previous_server_name": "string",
      "rebuild_pending": true,
      "role": "string",
      "server_id": "string",
      "server_name": "string"
    }
  ],
  "stanza": {
    "id": "string",
    "name": "string",
    "repos": [
      {
        "applied": true,
        "attached_server_ids": [
          "string"
        ],
        "diff_cron": "string",
        "diff_enabled": true,
        "full_cron": "string",
        "full_enabled": true,
        "host_server_id": "string",
        "host_server_name": "string",
        "id": "string",
        "path": "string",
        "repo_index": 0,
        "retention_full": 0,
        "retention_full_type": "count",
        "status": "active"
      }
    ]
  },
  "status": "string",
  "timescaledb_version": "string",
  "topology": "single_node",
  "type": "single-node",
  "updates_available": true,
  "vip": "string",
  "write_lock": {
    "grant_missing": true,
    "guard_checked_at": "2019-08-24T14:15:22Z",
    "guard_detail": "string",
    "guard_lock_at": "2019-08-24T14:15:22Z",
    "guard_no_grant": true,
    "guard_state": "ok",
    "license_expiry": "2019-08-24T14:15:22Z",
    "locked": true,
    "no_license": true,
    "reason": "trial_expired"
  }
}
```
