---
search:
  tags:
    - license
    - POST
seo:
  description: >-
    Check which installed licenses fit a proposed service topology. Reference
    for the POST /api/v1/license/fit endpoint in the TimescaleDB Enterprise API.
  noindex: true
sidebar:
  label: Check which licenses fit
  badge: POST
title: Check which licenses fit
type: openapi-operation
---
Check which installed licenses fit a proposed service topology.

`POST /api/v1/license/fit`

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

- `backup_server_id` (string) — Backup server of the proposed service. enforcing looks at it too
- `dcs_cluster_id` (string) — DCS cluster of the proposed advanced\_ha service. enforcing looks at its servers too
- `server_ids` (string[]) — PG node server ids for the proposed service (empty to check topology-level fit before servers are chosen)
- `service_id` (string) — Existing service being rebound: its own license does not count as in use, and its servers are checked when server\_ids is empty
- `size` (string) — Size (a tier name from sizes) that a trial license gets; the restart prediction uses it
- `topology` (string) — single\_node | standard\_ha | advanced\_ha

Request body example:

```json
{
  "backup_server_id": "string",
  "dcs_cluster_id": "string",
  "server_ids": [
    "string"
  ],
  "service_id": "string",
  "size": "string",
  "topology": "string"
}
```

**Responses**

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

Response example, 200:

```json
{
  "current_size": "string",
  "enforcing": true,
  "licenses": [
    {
      "entitlements": [
        "string"
      ],
      "expiry": "2019-08-24T14:15:22Z",
      "file": "string",
      "fits": true,
      "id": "string",
      "max_machines": 0,
      "max_memory_gb": 0,
      "max_vcpus": 0,
      "name": "string",
      "reason": "string",
      "restart": "required",
      "service": {
        "id": "string",
        "name": "string",
        "server_count": 0
      },
      "status": "string",
      "tier": "string"
    }
  ],
  "recommended_file": "string",
  "recommended_size": "string",
  "servers": [
    {
      "id": "string",
      "memory_gb": 0,
      "vcpus": 0
    }
  ],
  "sizes": [
    {
      "max_memory_gb": 0,
      "max_vcpus": 0,
      "name": "string"
    }
  ]
}
```
