---
search:
  tags:
    - database-services
    - POST
seo:
  description: >-
    Changes how the servers of the service reach the… Reference for the POST
    /api/v1/database-services/{id}/network endpoint in the TimescaleDB
    Enterprise API.
sidebar:
  label: Change the network
  badge: POST
title: Change the network
type: openapi-operation
---
Changes how the servers of the service reach the console: through a relay zone, or directly. The servers change one at a time, the backup server first (with with_backup_server) and the leader last, then the members of the standalone DCS cluster (with with_dcs_cluster), the etcd leader last. Each server restarts its mesh agent; PostgreSQL, Patroni and etcd do not restart. A server that does not reach the console on the new path goes back to its old path, and the change stops. Run the change again to finish it, or with the old path to go back. Rejected with 409 when a check of preflight-database-service-network fails, and with with_dcs_cluster when another service of the DCS cluster is in another network.

`POST /api/v1/database-services/{id}/network`

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

- `console_address` (string) — For servers that reach the console directly: the IPv4 address of the console, for servers that cannot resolve the host name of the console by DNS. Not together with relay\_zone\_id.
- `relay_zone_id` (string) — The relay zone through which the servers reach the console. Empty: the servers reach the console directly.
- `with_backup_server` (boolean) — Change the backup server of the service too. It goes first.
- `with_dcs_cluster` (boolean) — Change the standalone DCS cluster of the service too. Its members go after the servers of the service, the etcd leader last. Each other service of the DCS cluster must be in the target network.

Request body example:

```json
{
  "console_address": "string",
  "relay_zone_id": "string",
  "with_backup_server": true,
  "with_dcs_cluster": true
}
```

**Responses**

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

Response example, 202:

```json
{
  "apply_pending": {
    "caps_stale": true,
    "guard_missing": true,
    "licensing_setup": true,
    "restart_marker": true
  },
  "backupConfigOutOfSync": true,
  "backupNeedsAttention": true,
  "backupUnprotected": true,
  "created_at": "string",
  "data_dir": "string",
  "database_name": "string",
  "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_grant_missing": true,
  "livesync_target": true,
  "name": "string",
  "pack_release": "string",
  "pg_version": "string",
  "pg_version_minor": "string",
  "postgresql_exists": true,
  "redeploy_recommended": true,
  "status": "string",
  "timescaledb_version": "string",
  "topology": "single_node",
  "updates_available": true,
  "vip": "string"
}
```
