# Network › Load Balancer › Frontends › UDP API

> Part of the OVHcloud developer hub. Index of every page and section: https://developers.eu.ovhcloud.com/llms.txt
> The Network product's sections: https://developers.eu.ovhcloud.com/reference/network/llms.txt
> Everything in one file: https://developers.eu.ovhcloud.com/llms-full.txt

> 5 operations of the OVHcloud API. Calls carry `authorization: Bearer $OVH_TOKEN`; the EU host is shown, Canada and the United States answer on api.ca.ovhcloud.com and api.us.ovhcloud.com.

Page: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/udp/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/network/load-balancer/frontends/udp.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/network/load-balancer/frontends/udp.json?format=openapi3

## Operations

- `GET /ipLoadbalancing/{serviceName}/udp/frontend` — List UDP frontends
- `POST /ipLoadbalancing/{serviceName}/udp/frontend` — Create a UDP frontend
- `GET /ipLoadbalancing/{serviceName}/udp/frontend/{frontendId}` — Get a UDP frontend
- `DELETE /ipLoadbalancing/{serviceName}/udp/frontend/{frontendId}` — Delete a UDP frontend
- `PUT /ipLoadbalancing/{serviceName}/udp/frontend/{frontendId}` — Update a UDP frontend

## List UDP frontends

`GET /1.0/ipLoadbalancing/{serviceName}/udp/frontend`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/udp/#get-iploadbalancing-servicename-udp-frontend

**Status:** Beta version  
**IAM actions:** `loadbalancer:apiovh:udp/frontend/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `defaultFarmId` | query | integer |  | Filter the value of defaultFarmId property (=) |
| `port` | query | string |  | Filter the value of port property (like) |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |
| `zone` | query | string |  | Filter the value of zone property (=) |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | integer[] | successful operation |

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/udp/frontend" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/ipLoadbalancing/{serviceName}/udp/frontend")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/ipLoadbalancing/{serviceName}/udp/frontend");

print_r($result);
?>
```

## Create a UDP frontend

`POST /1.0/ipLoadbalancing/{serviceName}/udp/frontend`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/udp/#post-iploadbalancing-servicename-udp-frontend

**Status:** Beta version  
**IAM actions:** `loadbalancer:apiovh:udp/frontend/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `dedicatedIpfo` | ipBlock[] |  | Only attach frontend on these ip. No restriction if null |
| `defaultFarmId` | integer |  | Default UDP Farm of your frontend |
| `disabled` | boolean |  | Disable your frontend. Default: 'false' |
| `displayName` | string |  | Human readable name for your frontend, this field is for you |
| `port` | string | yes | Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range. |
| `zone` | string | yes | Zone of your frontend. Use "all" for all owned zone. |

```json
{
  "dedicatedIpfo": [
    "192.0.2.0/24"
  ],
  "defaultFarmId": 0,
  "disabled": true,
  "displayName": "string",
  "port": "string",
  "zone": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipLoadbalancing.frontendUdp.FrontendUdp | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `dedicatedIpfo` | ipBlock[] |  | Only attach frontend on these ip. No restriction if null |
| `defaultFarmId` | integer |  | Default UDP Farm of your frontend |
| `disabled` | boolean |  | Disable frontend. Default: 'false' |
| `displayName` | string |  | Human readable name for your frontend, this field is for you |
| `frontendId` | integer | read-only | Id of your frontend |
| `port` | string |  | Listening port(s) on the server |
| `zone` | string |  | Zone of you frontend |

```json
{
  "dedicatedIpfo": [
    "192.0.2.0/24"
  ],
  "defaultFarmId": 0,
  "disabled": true,
  "displayName": "string",
  "frontendId": 0,
  "port": "string",
  "zone": "string"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/udp/frontend" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.post("/ipLoadbalancing/{serviceName}/udp/frontend",
	dedicatedIpfo = None, # Only attach frontend on these ip. No restriction if null (type: ipBlock[], nullable)
	defaultFarmId = None, # Default UDP Farm of your frontend (type: long, nullable)
	disabled = None, # Disable your frontend. Default: 'false' (type: boolean, nullable)
	displayName = None, # Human readable name for your frontend, this field is for you (type: string, nullable)
	port = None, # Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range. (type: string)
	zone = None, # Zone of your frontend. Use "all" for all owned zone. (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->post("/ipLoadbalancing/{serviceName}/udp/frontend", array(
	dedicatedIpfo => null, // Only attach frontend on these ip. No restriction if null (type: ipBlock[], nullable)
	defaultFarmId => null, // Default UDP Farm of your frontend (type: long, nullable)
	disabled => null, // Disable your frontend. Default: 'false' (type: boolean, nullable)
	displayName => null, // Human readable name for your frontend, this field is for you (type: string, nullable)
	port => null, // Port(s) attached to your frontend. Supports single port (numerical value), range (2 dash-delimited increasing ports) and comma-separated list of 'single port' and/or 'range'. Each port must be in the [1;49151] range. (type: string)
	zone => null, // Zone of your frontend. Use "all" for all owned zone. (type: string)
));

print_r($result);
?>
```

## Get a UDP frontend

`GET /1.0/ipLoadbalancing/{serviceName}/udp/frontend/{frontendId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/udp/#get-iploadbalancing-servicename-udp-frontend-frontendid

**Status:** Beta version  
**IAM actions:** `loadbalancer:apiovh:udp/frontend/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `frontendId` | path | integer | yes | Id of your frontend |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | ipLoadbalancing.frontendUdp.FrontendUdp | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `dedicatedIpfo` | ipBlock[] |  | Only attach frontend on these ip. No restriction if null |
| `defaultFarmId` | integer |  | Default UDP Farm of your frontend |
| `disabled` | boolean |  | Disable frontend. Default: 'false' |
| `displayName` | string |  | Human readable name for your frontend, this field is for you |
| `frontendId` | integer | read-only | Id of your frontend |
| `port` | string |  | Listening port(s) on the server |
| `zone` | string |  | Zone of you frontend |

```json
{
  "dedicatedIpfo": [
    "192.0.2.0/24"
  ],
  "defaultFarmId": 0,
  "disabled": true,
  "displayName": "string",
  "frontendId": 0,
  "port": "string",
  "zone": "string"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/udp/frontend/{frontendId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.get("/ipLoadbalancing/{serviceName}/udp/frontend/{frontendId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->get("/ipLoadbalancing/{serviceName}/udp/frontend/{frontendId}");

print_r($result);
?>
```

## Delete a UDP frontend

`DELETE /1.0/ipLoadbalancing/{serviceName}/udp/frontend/{frontendId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/udp/#delete-iploadbalancing-servicename-udp-frontend-frontendid

**Status:** Beta version  
**IAM actions:** `loadbalancer:apiovh:udp/frontend/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `frontendId` | path | integer | yes | Id of your frontend |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/udp/frontend/{frontendId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN"
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

result = client.delete("/ipLoadbalancing/{serviceName}/udp/frontend/{frontendId}")

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

$result = $ovh->delete("/ipLoadbalancing/{serviceName}/udp/frontend/{frontendId}");

print_r($result);
?>
```

## Update a UDP frontend

`PUT /1.0/ipLoadbalancing/{serviceName}/udp/frontend/{frontendId}`

Link: https://developers.eu.ovhcloud.com/reference/network/load-balancer/frontends/udp/#put-iploadbalancing-servicename-udp-frontend-frontendid

**Status:** Beta version  
**IAM actions:** `loadbalancer:apiovh:udp/frontend/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `frontendId` | path | integer | yes | Id of your frontend |
| `serviceName` | path | string | yes | The internal name of your IP load balancing |

### Request body (required)

Type: `ipLoadbalancing.frontendUdp.FrontendUdp`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `dedicatedIpfo` | ipBlock[] |  | Only attach frontend on these ip. No restriction if null |
| `defaultFarmId` | integer |  | Default UDP Farm of your frontend |
| `disabled` | boolean |  | Disable frontend. Default: 'false' |
| `displayName` | string |  | Human readable name for your frontend, this field is for you |
| `frontendId` | integer | read-only | Id of your frontend |
| `port` | string |  | Listening port(s) on the server |
| `zone` | string |  | Zone of you frontend |

```json
{
  "dedicatedIpfo": [
    "192.0.2.0/24"
  ],
  "defaultFarmId": 0,
  "disabled": true,
  "displayName": "string",
  "port": "string",
  "zone": "string"
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | — | successful operation |

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/ipLoadbalancing/{serviceName}/udp/frontend/{frontendId}" \
  -H "accept: application/json" \
  -H "authorization: Bearer $OVH_TOKEN" \
  -H "content-type: application/json" \
  -d '{ }'
```

```python
'''
First, install the latest release of Python wrapper: $ pip install ovh
'''
import json
import ovh

# Instantiate an OVH Client.
# You can generate new credentials with full access to your account on
# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
client = ovh.Client(
	endpoint='ovh-eu',               # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
	application_key='xxxxxxxxxx',    # Application Key
	application_secret='xxxxxxxxxx', # Application Secret
	consumer_key='xxxxxxxxxx',       # Consumer Key
)

# Request body type: ipLoadbalancing.frontendUdp.FrontendUdp
result = client.put("/ipLoadbalancing/{serviceName}/udp/frontend/{frontendId}",
	dedicatedIpfo = None, # Only attach frontend on these ip. No restriction if null (type: array, nullable)
	defaultFarmId = None, # Default UDP Farm of your frontend (type: integer, nullable)
	disabled = None, # Disable frontend. Default: 'false' (type: boolean)
	displayName = None, # Human readable name for your frontend, this field is for you (type: string, nullable)
	port = None, # Listening port(s) on the server (type: string)
	zone = None, # Zone of you frontend (type: string)
)

# Pretty print
print(json.dumps(result, indent=4))
```

```php
<?php
/**
 * First, download the latest release of PHP wrapper on github
 * And include this script into the folder with extracted files
 */
require __DIR__ . '/vendor/autoload.php';
use \Ovh\Api;

/**
 * Instantiate an OVH Client.
 * You can generate new credentials with full access to your account on
 * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)
 */
$ovh = new Api('xxxxxxxxxx',  // Application Key
               'xxxxxxxxxx',  // Application Secret
               'ovh-eu',      // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)
               'xxxxxxxxxx'); // Consumer Key

// Request body type: ipLoadbalancing.frontendUdp.FrontendUdp
$result = $ovh->put("/ipLoadbalancing/{serviceName}/udp/frontend/{frontendId}", array(
	dedicatedIpfo => null, // Only attach frontend on these ip. No restriction if null (type: array, nullable)
	defaultFarmId => null, // Default UDP Farm of your frontend (type: integer, nullable)
	disabled => null, // Disable frontend. Default: 'false' (type: boolean)
	displayName => null, // Human readable name for your frontend, this field is for you (type: string, nullable)
	port => null, // Listening port(s) on the server (type: string)
	zone => null, // Zone of you frontend (type: string)
));

print_r($result);
?>
```
