# Client API: Floating IPs

> Allocate and attach floating IPs to eligible services.

Source: https://www.coritan.com/docs/api/reference/client/floating-ips/

Allocate and attach floating IPs to eligible services.

Base URL: `https://api.coritan.com/api/v1`. Paths below are complete.

To try these requests in the browser, open the [interactive Client API reference](https://api.coritan.com/docs).

## Operations

| Method | Path | Summary |
| --- | --- | --- |
| GET | [`/api/v1/client/ips`](#op-get-api-v1-client-ips) | List account-owned floating IP / subnet services and attachment state |
| GET | [`/api/v1/client/ips/attach-targets`](#op-get-api-v1-client-ips-attach-targets) | Thin list of owned compute services eligible as floating-IP attach targets |
| GET | [`/api/v1/client/ips/orders`](#op-get-api-v1-client-ips-orders) | Open platform IP order intents for resume after login or a new tab |
| GET | [`/api/v1/client/ips/orders/{idempotency_key}`](#op-get-api-v1-client-ips-orders-idempotency-key) | Get my IP order |
| POST | [`/api/v1/client/ips/orders/{idempotency_key}/cancel`](#op-post-api-v1-client-ips-orders-idempotency-key-cancel) | Cancel my IP order |
| GET | [`/api/v1/client/ips/pools`](#op-get-api-v1-client-ips-pools) | Active geo pools with sellable stock for ordering |
| GET | [`/api/v1/client/ips/{service_id}`](#op-get-api-v1-client-ips-service-id) | Get my IP |
| POST | [`/api/v1/client/ips/{service_id}/attach`](#op-post-api-v1-client-ips-service-id-attach) | Attach IP |
| POST | [`/api/v1/client/ips/{service_id}/detach`](#op-post-api-v1-client-ips-service-id-detach) | Detach IP (or one subnet host) from its compute target; service remains on your account |
| GET | [`/api/v1/client/ips/{service_id}/hosts`](#op-get-api-v1-client-ips-service-id-hosts) | Host map for a rented subnet service |
| GET | [`/api/v1/client/ips/{service_id}/ptr`](#op-get-api-v1-client-ips-service-id-ptr) | Get PTR |
| PATCH | [`/api/v1/client/ips/{service_id}/ptr`](#op-patch-api-v1-client-ips-service-id-ptr) | Set PTR |

### List account-owned floating IP / subnet services and attachment state {#op-get-api-v1-client-ips}

`GET /api/v1/client/ips`

List account-owned floating IP / subnet services and attachment state.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |

### Thin list of owned compute services eligible as floating-IP attach targets {#op-get-api-v1-client-ips-attach-targets}

`GET /api/v1/client/ips/attach-targets`

Thin list of owned compute services eligible as floating-IP attach targets.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |

### Open platform IP order intents for resume after login or a new tab {#op-get-api-v1-client-ips-orders}

`GET /api/v1/client/ips/orders`

Open platform IP order intents for resume after login or a new tab.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |

### Get my IP order {#op-get-api-v1-client-ips-orders-idempotency-key}

`GET /api/v1/client/ips/orders/{idempotency_key}`

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `idempotency_key` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Cancel my IP order {#op-post-api-v1-client-ips-orders-idempotency-key-cancel}

`POST /api/v1/client/ips/orders/{idempotency_key}/cancel`

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `idempotency_key` | path | string | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Active geo pools with sellable stock for ordering {#op-get-api-v1-client-ips-pools}

`GET /api/v1/client/ips/pools`

Active geo pools with sellable stock for ordering.
Pass chosen pool `id` as config.pool_id when calling POST /services/order.
Prefer ``region`` matching the compute ``config.location`` airport code.
When subnet rental is disabled, block prefix queries return an empty list.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `version` | query | string | no | Default: `ipv4`. |
| `prefix_len` | query | integer or null | no | 32 (default) = floating /32 stock; 24–29 = block stock |
| `region` | query | string or null | no | Airport-code location filter (iad, fra, lhr, pdx, sin) |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Get my IP {#op-get-api-v1-client-ips-service-id}

`GET /api/v1/client/ips/{service_id}`

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `service_id` | path | integer | yes |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Attach IP {#op-post-api-v1-client-ips-service-id-attach}

`POST /api/v1/client/ips/{service_id}/attach`

Attach this IP (or a host from a rented subnet) to one of your compute
services (vps|container).

For subnet services, pass ``host_address`` / ``host_inventory_id``, or omit
both to attach the first free (lowest) host. For VPS targets, programs
Proxmox cloud-init ``ipconfig0`` (routed /32 + block gateway). For container
targets, places the /32 on the Wings host, remaps the server's published
ports onto it, re-points its gameproxy routes and restarts a running server;
the response carries a ``publish`` block describing what happened.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `service_id` | path | integer | yes |

#### Request body

`application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `target_type` | string | yes | vps \| container |
| `target_service_id` | integer | yes | Platform service id of the compute target |
| `host_address` | string or null | no | Host IP within a rented subnet; omit to attach first free host |
| `host_inventory_id` | integer or null | no | Alternative to host_address: inventory id of the host row |
| `is_primary` | boolean or null | no | For VPS multi-IP: set as primary (ipconfig0). Default: primary if none yet. |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Detach IP (or one subnet host) from its compute target; service remains on your account {#op-post-api-v1-client-ips-service-id-detach}

`POST /api/v1/client/ips/{service_id}/detach`

Detach IP (or one subnet host) from its compute target; service remains
on your account. For subnets with multiple attached hosts, pass host_address.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `service_id` | path | integer | yes |

#### Request body

`application/json`

| Field | Type | Required |
| --- | --- | --- |
| `host_address` | string or null | no |
| `host_inventory_id` | integer or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Host map for a rented subnet service {#op-get-api-v1-client-ips-service-id-hosts}

`GET /api/v1/client/ips/{service_id}/hosts`

Host map for a rented subnet service.

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `service_id` | path | integer | yes |  |
| `include_reserved` | query | boolean | no | Default: `True`. |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Get PTR {#op-get-api-v1-client-ips-service-id-ptr}

`GET /api/v1/client/ips/{service_id}/ptr`

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `service_id` | path | integer | yes |
| `host_address` | query | string or null | no |
| `host_inventory_id` | query | integer or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |

### Set PTR {#op-patch-api-v1-client-ips-service-id-ptr}

`PATCH /api/v1/client/ips/{service_id}/ptr`

Authentication: an access token, sent as `Authorization: Bearer <token>`.

#### Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| `service_id` | path | integer | yes |

#### Request body

`application/json` (required)

| Field | Type | Required |
| --- | --- | --- |
| `hostname` | string | yes |
| `host_address` | string or null | no |
| `host_inventory_id` | integer or null | no |

#### Responses

| Status | Meaning |
| --- | --- |
| `200` | Success. |
| `422` | The request is not valid. `detail` lists each problem. |
