# Network › SSL Gateway › Services 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

> 6 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/services/

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

## Operations

- `GET /sslGateway` — List SSL Gateways
- `GET /sslGateway/{serviceName}` — Get an SSL Gateway
- `PUT /sslGateway/{serviceName}` — Update an SSL Gateway
- `GET /sslGateway/availableZones` — List available zones
- `GET /sslGateway/eligibility` — Check domain eligibility
- `GET /sslGateway/{serviceName}/natIp` — List NAT IPs

## List SSL Gateways

`GET /1.0/sslGateway`

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

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

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `iamTags` | query | object |  | Filter resources on IAM tags |

### Responses

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

```json
[
  "string"
]
```

### Example

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

# 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");

print_r($result);
?>
```

## Get an SSL Gateway

`GET /1.0/sslGateway/{serviceName}`

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

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

### Parameters

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

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowedSource` | ipBlock[] |  | Restrict SSL Gateway access to these ip block. No restriction if null |
| `displayName` | string |  | Custom name of your SSL Gateway |
| `hsts` | boolean |  | Set to true to enable Strict-Transport-Security HTTP header |
| `httpsRedirect` | boolean |  | Set to true to enable https redirect |
| `iam` | iam.ResourceMetadata | read-only | IAM resource metadata |
| `iam.displayName` | string | read-only | Resource display name |
| `iam.id` | string (uuid) | read-only | Unique identifier of the resource |
| `iam.state` | iam.ResourceMetadata.StateEnum | read-only | Resource state — one of `EXPIRED`, `IN_CREATION`, `OK`, `SUSPENDED` |
| `iam.tags` | object | read-only | Resource tags. Tags that were internally computed are prefixed with ovh: |
| `iam.urn` | string | read-only | Unique resource name used in policies |
| `ipv4` | ipv4 | read-only | The IPv4 you need to put in the A field of your domain name |
| `ipv6` | ipv6 | read-only | The IPv6 you need to put in the AAAA field of your domain name |
| `metricsToken` | string | read-only | The metrics token associated with your SSL Gateway |
| `offer` | sslGateway.OfferEnum | read-only | Current offer for your SSL Gateway — one of `advanced`, `enterprise`, `free`, `internal` |
| `reverse` | string |  | Custom reverse for your SSL Gateway |
| `serverHttps` | boolean |  | Set to true to contact backend servers over HTTPS |
| `serviceName` | string | read-only | The internal name of your SSL Gateway |
| `sslConfiguration` | sslGateway.SslConfigurationEnum |  | Modern oldest compatible clients : Firefox 27, Chrome 30, IE 11 on Windows 7, Edge, Opera 17, Safari 9, Android 5.0, and Java 8. Intermediate oldest compatible clients : Firefox 1, Chrome 1, IE 7, Opera 5, Safari 1, Windows XP IE8, Android 2.3, Java 7. Intermediate if null. — one of `intermediate`, `internal`, `modern` |
| `state` | sslGateway.StateEnum | read-only | Current state of your SSL Gateway — one of `creating`, `deleted`, `deleting`, `http-only`, `internal`, `ok`, `suspended`, `upgrading` |
| `zones` | string[] | read-only | Zones of your SSL Gateway |

```json
{
  "allowedSource": [
    "192.0.2.0/24"
  ],
  "displayName": "string",
  "hsts": true,
  "httpsRedirect": true,
  "iam": {
    "displayName": "string",
    "id": "00000000-0000-0000-0000-000000000000",
    "state": "EXPIRED",
    "tags": {
      "key": "string"
    },
    "urn": "string"
  },
  "ipv4": "192.0.2.0",
  "ipv6": "2001:41d0:1:1994::1",
  "metricsToken": "string",
  "offer": "advanced",
  "reverse": "string",
  "serverHttps": true,
  "serviceName": "string",
  "sslConfiguration": "intermediate",
  "state": "creating",
  "zones": [
    "string"
  ]
}
```

### Example

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

# 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}");

print_r($result);
?>
```

## Update an SSL Gateway

`PUT /1.0/sslGateway/{serviceName}`

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

**Status:** Beta version  
**IAM actions:** `sslGateway:apiovh:put`

### Parameters

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

### Request body (required)

Type: `sslGateway.SslGateway`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `allowedSource` | ipBlock[] |  | Restrict SSL Gateway access to these ip block. No restriction if null |
| `displayName` | string |  | Custom name of your SSL Gateway |
| `hsts` | boolean |  | Set to true to enable Strict-Transport-Security HTTP header |
| `httpsRedirect` | boolean |  | Set to true to enable https redirect |
| `ipv4` | ipv4 | read-only | The IPv4 you need to put in the A field of your domain name |
| `ipv6` | ipv6 | read-only | The IPv6 you need to put in the AAAA field of your domain name |
| `metricsToken` | string | read-only | The metrics token associated with your SSL Gateway |
| `offer` | sslGateway.OfferEnum | read-only | Current offer for your SSL Gateway — one of `advanced`, `enterprise`, `free`, `internal` |
| `reverse` | string |  | Custom reverse for your SSL Gateway |
| `serverHttps` | boolean |  | Set to true to contact backend servers over HTTPS |
| `serviceName` | string | read-only | The internal name of your SSL Gateway |
| `sslConfiguration` | sslGateway.SslConfigurationEnum |  | Modern oldest compatible clients : Firefox 27, Chrome 30, IE 11 on Windows 7, Edge, Opera 17, Safari 9, Android 5.0, and Java 8. Intermediate oldest compatible clients : Firefox 1, Chrome 1, IE 7, Opera 5, Safari 1, Windows XP IE8, Android 2.3, Java 7. Intermediate if null. — one of `intermediate`, `internal`, `modern` |
| `state` | sslGateway.StateEnum | read-only | Current state of your SSL Gateway — one of `creating`, `deleted`, `deleting`, `http-only`, `internal`, `ok`, `suspended`, `upgrading` |
| `zones` | string[] | read-only | Zones of your SSL Gateway |

```json
{
  "allowedSource": [
    "192.0.2.0/24"
  ],
  "displayName": "string",
  "hsts": true,
  "httpsRedirect": true,
  "reverse": "string",
  "serverHttps": true,
  "sslConfiguration": "intermediate"
}
```

### Responses

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

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/1.0/sslGateway/{serviceName}" \
  -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.SslGateway
result = client.put("/sslGateway/{serviceName}",
	allowedSource = None, # Restrict SSL Gateway access to these ip block. No restriction if null (type: array, nullable)
	displayName = None, # Custom name of your SSL Gateway (type: string, nullable)
	hsts = None, # Set to true to enable Strict-Transport-Security HTTP header (type: boolean)
	httpsRedirect = None, # Set to true to enable https redirect (type: boolean)
	reverse = None, # Custom reverse for your SSL Gateway (type: string, nullable)
	serverHttps = None, # Set to true to contact backend servers over HTTPS (type: boolean)
	sslConfiguration = None, # Modern oldest compatible clients : Firefox 27, Chrome 30, IE 11 on Windows 7, Edge, Opera 17, Safari 9, Android 5.0, and Java 8. Intermediate oldest compatible clients : Firefox 1, Chrome 1, IE 7, Opera 5, Safari 1, Windows XP IE8, Android 2.3, Java 7. Intermediate if null. (type: sslGateway.SslConfigurationEnum, nullable)
)

# 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.SslGateway
$result = $ovh->put("/sslGateway/{serviceName}", array(
	allowedSource => null, // Restrict SSL Gateway access to these ip block. No restriction if null (type: array, nullable)
	displayName => null, // Custom name of your SSL Gateway (type: string, nullable)
	hsts => null, // Set to true to enable Strict-Transport-Security HTTP header (type: boolean)
	httpsRedirect => null, // Set to true to enable https redirect (type: boolean)
	reverse => null, // Custom reverse for your SSL Gateway (type: string, nullable)
	serverHttps => null, // Set to true to contact backend servers over HTTPS (type: boolean)
	sslConfiguration => null, // Modern oldest compatible clients : Firefox 27, Chrome 30, IE 11 on Windows 7, Edge, Opera 17, Safari 9, Android 5.0, and Java 8. Intermediate oldest compatible clients : Firefox 1, Chrome 1, IE 7, Opera 5, Safari 1, Windows XP IE8, Android 2.3, Java 7. Intermediate if null. (type: sslGateway.SslConfigurationEnum, nullable)
));

print_r($result);
?>
```

## List available zones

`GET /1.0/sslGateway/availableZones`

Link: https://developers.eu.ovhcloud.com/reference/network/ssl-gateway/services/#get-sslgateway-availablezones

**Status:** Beta version  
**Authentication:** none (public operation)

### Responses

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

```json
[
  "string"
]
```

### Example

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

# 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/availableZones");

print_r($result);
?>
```

## Check domain eligibility

`GET /1.0/sslGateway/eligibility`

Link: https://developers.eu.ovhcloud.com/reference/network/ssl-gateway/services/#get-sslgateway-eligibility

**Status:** Beta version  
**Authentication:** none (public operation)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `domain` | query | string | yes | domain to check eligibility for SSL Gateway offer |

### Responses

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

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `domain` | string |  | Customer domain name |
| `ip6s` | ipv6[] |  | Eligible IP(s) v6 for this domain |
| `ips` | ipv4[] |  | Eligible IP(s) for this domain |
| `isHostedByOvh` | boolean |  | Whether this domain is hosted by Ovh or not |

```json
{
  "domain": "string",
  "ip6s": [
    "2001:41d0:1:1994::1"
  ],
  "ips": [
    "192.0.2.0"
  ],
  "isHostedByOvh": true
}
```

### Example

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

# 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/eligibility");

print_r($result);
?>
```

## List NAT IPs

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

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

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

### Parameters

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

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | sslGateway.NatIps[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ip` | ipBlock[] |  |  |
| `zone` | string |  |  |

```json
[
  {
    "ip": [
      "192.0.2.0/24"
    ],
    "zone": "string"
  }
]
```

### Example

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

# 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}/natIp");

print_r($result);
?>
```
