# Public Cloud › Project Management › Service references › Private Endpoint API

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

> 2 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/public-cloud/project-management/service-references/private-endpoint/

OpenAPI v1: https://api.eu.ovhcloud.com/1.0/__schemas/developer-hub-navigation/public-cloud/project-management/service-references/private-endpoint.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/public-cloud/project-management/service-references/private-endpoint.json?format=openapi3

## Operations

- `GET /publicCloud/project/{projectId}/reference/privateEndpoint/serviceAvailability` — List private endpoint services
- `GET /publicCloud/project/{projectId}/reference/privateEndpoint/serviceAvailability/{name}` — Get a private endpoint service

## List private endpoint services

`GET /v2/publicCloud/project/{projectId}/reference/privateEndpoint/serviceAvailability`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/project-management/service-references/private-endpoint/#getPrivateEndpointServiceAvailabilities

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:reference/privateEndpoint/serviceAvailability/get`

Returns the services that can be reached through a private endpoint, with their tiers. Filter by region to restrict services and their tiers to it.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `X-Pagination-Cursor` | header | string |  | Pagination cursor |
| `X-Pagination-Size` | header | integer |  | Pagination size |
| `projectId` | path | string | yes | Project ID |
| `region` | query | string |  | Optional region filter. When set, only services offering a tier in this region are returned and each service's tiers are restricted to that region. When omitted, services are listed with their tiers across all regions. An unknown region is rejected. |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.reference.privateEndpoint.ServiceAvailability[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string | read-only | Service description |
| `name` | string | read-only | Service name |
| `tiers` | publicCloud.reference.privateEndpoint.ServiceTier[] | read-only | Enabled tiers of the service |
| `tiers[].bandwidth` | integer | read-only | Bandwidth of the tier in Mbit/s. Null when the catalog does not declare it. |
| `tiers[].location` | publicCloud.common.Location | read-only | Location where this tier is available |
| `tiers[].location.availabilityZone` | string |  | Availability zone within the region |
| `tiers[].location.region` | string | yes | Region code |
| `tiers[].name` | publicCloud.privateEndpoint.ServiceTierEnum | read-only | Tier name — one of `L`, `M`, `S` |
| `tiers[].port` | integer | read-only | Port the service listens on through the endpoint |
| `tiers[].transport` | publicCloud.privateEndpoint.ServiceTransportEnum | read-only | Transport protocol of the service — one of `TCP`, `UDP` |

```json
[
  {
    "description": "string",
    "name": "string",
    "tiers": [
      {
        "bandwidth": 0,
        "location": {
          "availabilityZone": "string",
          "region": "string"
        },
        "name": "L",
        "port": 0,
        "transport": "TCP"
      }
    ]
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/reference/privateEndpoint/serviceAvailability" \
  -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("/v2/publicCloud/project/{projectId}/reference/privateEndpoint/serviceAvailability")

# 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("/v2/publicCloud/project/{projectId}/reference/privateEndpoint/serviceAvailability");

print_r($result);
?>
```

## Get a private endpoint service

`GET /v2/publicCloud/project/{projectId}/reference/privateEndpoint/serviceAvailability/{name}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/project-management/service-references/private-endpoint/#getPrivateEndpointServiceAvailability

**Status:** Beta version  
**IAM actions:** `publicCloudProject:apiovh:reference/privateEndpoint/serviceAvailability/get`

Returns where one service can be reached through a private endpoint: region, port and transport of each tier.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `name` | path | string | yes | Name |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.reference.privateEndpoint.ServiceAvailability | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | string | read-only | Service description |
| `name` | string | read-only | Service name |
| `tiers` | publicCloud.reference.privateEndpoint.ServiceTier[] | read-only | Enabled tiers of the service |
| `tiers[].bandwidth` | integer | read-only | Bandwidth of the tier in Mbit/s. Null when the catalog does not declare it. |
| `tiers[].location` | publicCloud.common.Location | read-only | Location where this tier is available |
| `tiers[].location.availabilityZone` | string |  | Availability zone within the region |
| `tiers[].location.region` | string | yes | Region code |
| `tiers[].name` | publicCloud.privateEndpoint.ServiceTierEnum | read-only | Tier name — one of `L`, `M`, `S` |
| `tiers[].port` | integer | read-only | Port the service listens on through the endpoint |
| `tiers[].transport` | publicCloud.privateEndpoint.ServiceTransportEnum | read-only | Transport protocol of the service — one of `TCP`, `UDP` |

```json
{
  "description": "string",
  "name": "string",
  "tiers": [
    {
      "bandwidth": 0,
      "location": {
        "availabilityZone": "string",
        "region": "string"
      },
      "name": "L",
      "port": 0,
      "transport": "TCP"
    }
  ]
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/reference/privateEndpoint/serviceAvailability/{name}" \
  -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("/v2/publicCloud/project/{projectId}/reference/privateEndpoint/serviceAvailability/{name}")

# 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("/v2/publicCloud/project/{projectId}/reference/privateEndpoint/serviceAvailability/{name}");

print_r($result);
?>
```
