# Network › SSL Gateway › Backends 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/ssl-gateway/backends/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/network/ssl-gateway/backends.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/network/ssl-gateway/backends.json?format=openapi3

## Operations

- `GET /sslGateway/{serviceName}/server` — List servers
- `POST /sslGateway/{serviceName}/server` — Add a server
- `GET /sslGateway/{serviceName}/server/{id}` — Get a server
- `DELETE /sslGateway/{serviceName}/server/{id}` — Remove a server
- `PUT /sslGateway/{serviceName}/server/{id}` — Update a server

## List servers

`GET /1.0/sslGateway/{serviceName}/server`

Link: https://developers.eu.ovhcloud.com/reference/network/ssl-gateway/backends/#get-sslgateway-servicename-server

**Status:** Beta version  
**IAM actions:** `sslGateway:apiovh:server/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your SSL Gateway |

### Responses

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

```json
[
  0
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sslGateway/{serviceName}/server" \
  -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("/sslGateway/{serviceName}/server")

# 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("/sslGateway/{serviceName}/server");

print_r($result);
?>
```

## Add a server

`POST /1.0/sslGateway/{serviceName}/server`

Link: https://developers.eu.ovhcloud.com/reference/network/ssl-gateway/backends/#post-sslgateway-servicename-server

**Status:** Beta version  
**IAM actions:** `sslGateway:apiovh:server/create`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `serviceName` | path | string | yes | The internal name of your SSL Gateway |

### Request body (required)

Type: `object`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | ip | yes | IPv4 address of your server |
| `port` | integer | yes | Port of your server |

```json
{
  "address": "192.0.2.0",
  "port": 0
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | sslGateway.Server | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | ip |  | IP address of the server attached to your SSL Gateway |
| `id` | integer | read-only | Id of your server |
| `port` | integer |  | Port of your server attached to your SSL Gateway |
| `state` | sslGateway.ServerStateEnum | read-only | Server state — one of `creating`, `deleted`, `deleting`, `internal`, `ok`, `updating` |

```json
{
  "address": "192.0.2.0",
  "id": 0,
  "port": 0,
  "state": "creating"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/1.0/sslGateway/{serviceName}/server" \
  -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("/sslGateway/{serviceName}/server",
	address = None, # IPv4 address of your server (type: ip)
	port = None, # Port of your server (type: long)
)

# 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("/sslGateway/{serviceName}/server", array(
	address => null, // IPv4 address of your server (type: ip)
	port => null, // Port of your server (type: long)
));

print_r($result);
?>
```

## Get a server

`GET /1.0/sslGateway/{serviceName}/server/{id}`

Link: https://developers.eu.ovhcloud.com/reference/network/ssl-gateway/backends/#get-sslgateway-servicename-server-id

**Status:** Beta version  
**IAM actions:** `sslGateway:apiovh:server/get`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of your server |
| `serviceName` | path | string | yes | The internal name of your SSL Gateway |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | sslGateway.Server | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | ip |  | IP address of the server attached to your SSL Gateway |
| `id` | integer | read-only | Id of your server |
| `port` | integer |  | Port of your server attached to your SSL Gateway |
| `state` | sslGateway.ServerStateEnum | read-only | Server state — one of `creating`, `deleted`, `deleting`, `internal`, `ok`, `updating` |

```json
{
  "address": "192.0.2.0",
  "id": 0,
  "port": 0,
  "state": "creating"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/1.0/sslGateway/{serviceName}/server/{id}" \
  -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("/sslGateway/{serviceName}/server/{id}")

# 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("/sslGateway/{serviceName}/server/{id}");

print_r($result);
?>
```

## Remove a server

`DELETE /1.0/sslGateway/{serviceName}/server/{id}`

Link: https://developers.eu.ovhcloud.com/reference/network/ssl-gateway/backends/#delete-sslgateway-servicename-server-id

**Status:** Beta version  
**IAM actions:** `sslGateway:apiovh:server/delete`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of your server |
| `serviceName` | path | string | yes | The internal name of your SSL Gateway |

### Responses

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

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/1.0/sslGateway/{serviceName}/server/{id}" \
  -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("/sslGateway/{serviceName}/server/{id}")

# 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("/sslGateway/{serviceName}/server/{id}");

print_r($result);
?>
```

## Update a server

`PUT /1.0/sslGateway/{serviceName}/server/{id}`

Link: https://developers.eu.ovhcloud.com/reference/network/ssl-gateway/backends/#put-sslgateway-servicename-server-id

**Status:** Beta version  
**IAM actions:** `sslGateway:apiovh:server/edit`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Id of your server |
| `serviceName` | path | string | yes | The internal name of your SSL Gateway |

### Request body (required)

Type: `sslGateway.Server`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `address` | ip |  | IP address of the server attached to your SSL Gateway |
| `id` | integer | read-only | Id of your server |
| `port` | integer |  | Port of your server attached to your SSL Gateway |
| `state` | sslGateway.ServerStateEnum | read-only | Server state — one of `creating`, `deleted`, `deleting`, `internal`, `ok`, `updating` |

```json
{
  "address": "192.0.2.0",
  "port": 0
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/sslGateway/{serviceName}/server/{id}" \
  -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: sslGateway.Server
result = client.put("/sslGateway/{serviceName}/server/{id}",
	address = None, # IP address of the server attached to your SSL Gateway (type: ip)
	port = None, # Port of your server attached to your SSL Gateway (type: integer)
)

# 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: sslGateway.Server
$result = $ovh->put("/sslGateway/{serviceName}/server/{id}", array(
	address => null, // IP address of the server attached to your SSL Gateway (type: ip)
	port => null, // Port of your server attached to your SSL Gateway (type: integer)
));

print_r($result);
?>
```
