# Public Cloud › Network › Site-to-Site VPN › Endpoint groups 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

> 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/public-cloud/network/site-to-site-vpn/endpoint-groups/

OpenAPI v1: https://api.eu.ovhcloud.com/v1/__schemas/developer-hub-navigation/public-cloud/network/site-to-site-vpn/endpoint-groups.json?format=openapi3
OpenAPI v2: https://api.eu.ovhcloud.com/v2/__schemas/developer-hub-navigation/public-cloud/network/site-to-site-vpn/endpoint-groups.json?format=openapi3

## Operations

- `GET /publicCloud/project/{projectId}/vpn/endpointGroup` — List endpoint groups
- `GET /publicCloud/project/{projectId}/vpn/endpointGroup/{endpointGroupId}` — Get an endpoint group
- `POST /publicCloud/project/{projectId}/vpn/endpointGroup` — Create an endpoint group
- `DELETE /publicCloud/project/{projectId}/vpn/endpointGroup/{endpointGroupId}` — Delete an endpoint group
- `PUT /publicCloud/project/{projectId}/vpn/endpointGroup/{endpointGroupId}` — Update an endpoint group

## List endpoint groups

`GET /v2/publicCloud/project/{projectId}/vpn/endpointGroup`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/network/site-to-site-vpn/endpoint-groups/#getAllVpnEndpointGroups

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:vpn/endpointGroup/get`

Returns the endpoint groups of the project, in every region.

### 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 |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.vpn.EndpointGroup[] | successful operation |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of the current target specification. Send it back in the update payload to detect concurrent changes. |
| `createdAt` | string (date-time) | read-only | Date and time the endpoint group was created |
| `currentState` | publicCloud.vpn.EndpointGroupCurrentState | read-only | Observed state of the endpoint group. Null while the endpoint group is being created. |
| `currentState.cidrs` | ipBlock[] | read-only | Networks of the endpoint group, in CIDR notation |
| `currentState.description` | string | read-only | Free-form description of the endpoint group. Null when none was given. |
| `currentState.location` | publicCloud.vpn.Location | read-only | Region of the endpoint group |
| `currentState.location.region` | string | yes | Region code, such as GRA11 |
| `currentState.name` | string | read-only | Name of the endpoint group |
| `currentTasks` | common.CurrentTask[] | read-only | Asynchronous operations ongoing on the endpoint group |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the endpoint group |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness of the endpoint group: whether its observed state has converged to its target specification — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.vpn.EndpointGroupTargetSpec | read-only | Last target specification requested for the endpoint group |
| `targetSpec.cidrs` | ipBlock[] | yes | Networks of the endpoint group, in CIDR notation. Replaced as a whole on update, and only while no IPsec connection uses the endpoint group. At least one. |
| `targetSpec.description` | string |  | Free-form description of the endpoint group. At most 255 characters. |
| `targetSpec.location` | publicCloud.vpn.Location | yes | Region of the endpoint group: only the IPsec connections of the VPN gateways of this region can use it. Immutable after creation. |
| `targetSpec.location.region` | string | yes | Region code, such as GRA11 |
| `targetSpec.name` | string | yes | Name of the endpoint group. At most 255 characters. |
| `updatedAt` | string (date-time) | read-only | Date and time the endpoint group was last updated |

```json
[
  {
    "checksum": "string",
    "createdAt": "2024-01-01T12:00:00Z",
    "currentState": {
      "cidrs": [
        "192.0.2.0/24"
      ],
      "description": "string",
      "location": {
        "region": "string"
      },
      "name": "string"
    },
    "currentTasks": [
      {
        "errors": [
          {
            "message": "string"
          }
        ],
        "id": "00000000-0000-0000-0000-000000000000",
        "link": "string",
        "status": "ERROR",
        "type": "string"
      }
    ],
    "id": "00000000-0000-0000-0000-000000000000",
    "resourceStatus": "CREATING",
    "targetSpec": {
      "cidrs": [
        "192.0.2.0/24"
      ],
      "description": "string",
      "location": {
        "region": "string"
      },
      "name": "string"
    },
    "updatedAt": "2024-01-01T12:00:00Z"
  }
]
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/vpn/endpointGroup" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -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}/vpn/endpointGroup")

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

print_r($result);
?>
```

## Get an endpoint group

`GET /v2/publicCloud/project/{projectId}/vpn/endpointGroup/{endpointGroupId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/network/site-to-site-vpn/endpoint-groups/#getVpnEndpointGroup

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:vpn/endpointGroup/get`

Returns the endpoint group and its observed state.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `endpointGroupId` | path | string (uuid) | yes | Endpoint group ID |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.vpn.EndpointGroup | successful operation |
| 404 | object | Error 404 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of the current target specification. Send it back in the update payload to detect concurrent changes. |
| `createdAt` | string (date-time) | read-only | Date and time the endpoint group was created |
| `currentState` | publicCloud.vpn.EndpointGroupCurrentState | read-only | Observed state of the endpoint group. Null while the endpoint group is being created. |
| `currentState.cidrs` | ipBlock[] | read-only | Networks of the endpoint group, in CIDR notation |
| `currentState.description` | string | read-only | Free-form description of the endpoint group. Null when none was given. |
| `currentState.location` | publicCloud.vpn.Location | read-only | Region of the endpoint group |
| `currentState.location.region` | string | yes | Region code, such as GRA11 |
| `currentState.name` | string | read-only | Name of the endpoint group |
| `currentTasks` | common.CurrentTask[] | read-only | Asynchronous operations ongoing on the endpoint group |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the endpoint group |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness of the endpoint group: whether its observed state has converged to its target specification — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.vpn.EndpointGroupTargetSpec | read-only | Last target specification requested for the endpoint group |
| `targetSpec.cidrs` | ipBlock[] | yes | Networks of the endpoint group, in CIDR notation. Replaced as a whole on update, and only while no IPsec connection uses the endpoint group. At least one. |
| `targetSpec.description` | string |  | Free-form description of the endpoint group. At most 255 characters. |
| `targetSpec.location` | publicCloud.vpn.Location | yes | Region of the endpoint group: only the IPsec connections of the VPN gateways of this region can use it. Immutable after creation. |
| `targetSpec.location.region` | string | yes | Region code, such as GRA11 |
| `targetSpec.name` | string | yes | Name of the endpoint group. At most 255 characters. |
| `updatedAt` | string (date-time) | read-only | Date and time the endpoint group was last updated |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "cidrs": [
      "192.0.2.0/24"
    ],
    "description": "string",
    "location": {
      "region": "string"
    },
    "name": "string"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "cidrs": [
      "192.0.2.0/24"
    ],
    "description": "string",
    "location": {
      "region": "string"
    },
    "name": "string"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X GET \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/vpn/endpointGroup/{endpointGroupId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -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}/vpn/endpointGroup/{endpointGroupId}")

# 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}/vpn/endpointGroup/{endpointGroupId}");

print_r($result);
?>
```

## Create an endpoint group

`POST /v2/publicCloud/project/{projectId}/vpn/endpointGroup`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/network/site-to-site-vpn/endpoint-groups/#createVpnEndpointGroup

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:vpn/endpointGroup/create`

Creates an endpoint group: a list of networks, in CIDR notation, that the IPsec connections of its region reference as targetSpec.endpointGroup.local or targetSpec.endpointGroup.distant. Several IPsec connections can share one endpoint group. Creation applies immediately: the response already holds the result.

### Parameters

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

### Request body (required)

Type: `publicCloud.vpn.EndpointGroupCreation`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `targetSpec` | publicCloud.vpn.EndpointGroupTargetSpec | yes | Desired specification of the endpoint group to create |
| `targetSpec.cidrs` | ipBlock[] | yes | Networks of the endpoint group, in CIDR notation. Replaced as a whole on update, and only while no IPsec connection uses the endpoint group. At least one. |
| `targetSpec.description` | string |  | Free-form description of the endpoint group. At most 255 characters. |
| `targetSpec.location` | publicCloud.vpn.Location | yes | Region of the endpoint group: only the IPsec connections of the VPN gateways of this region can use it. Immutable after creation. |
| `targetSpec.location.region` | string | yes | Region code, such as GRA11 |
| `targetSpec.name` | string | yes | Name of the endpoint group. At most 255 characters. |

```json
{
  "targetSpec": {
    "cidrs": [
      "192.0.2.0/24"
    ],
    "description": "string",
    "location": {
      "region": "string"
    },
    "name": "string"
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.vpn.EndpointGroup | successful operation |
| 400 | object | Error 400 response |
| 403 | object | Error 403 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of the current target specification. Send it back in the update payload to detect concurrent changes. |
| `createdAt` | string (date-time) | read-only | Date and time the endpoint group was created |
| `currentState` | publicCloud.vpn.EndpointGroupCurrentState | read-only | Observed state of the endpoint group. Null while the endpoint group is being created. |
| `currentState.cidrs` | ipBlock[] | read-only | Networks of the endpoint group, in CIDR notation |
| `currentState.description` | string | read-only | Free-form description of the endpoint group. Null when none was given. |
| `currentState.location` | publicCloud.vpn.Location | read-only | Region of the endpoint group |
| `currentState.location.region` | string | yes | Region code, such as GRA11 |
| `currentState.name` | string | read-only | Name of the endpoint group |
| `currentTasks` | common.CurrentTask[] | read-only | Asynchronous operations ongoing on the endpoint group |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the endpoint group |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness of the endpoint group: whether its observed state has converged to its target specification — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.vpn.EndpointGroupTargetSpec | read-only | Last target specification requested for the endpoint group |
| `targetSpec.cidrs` | ipBlock[] | yes | Networks of the endpoint group, in CIDR notation. Replaced as a whole on update, and only while no IPsec connection uses the endpoint group. At least one. |
| `targetSpec.description` | string |  | Free-form description of the endpoint group. At most 255 characters. |
| `targetSpec.location` | publicCloud.vpn.Location | yes | Region of the endpoint group: only the IPsec connections of the VPN gateways of this region can use it. Immutable after creation. |
| `targetSpec.location.region` | string | yes | Region code, such as GRA11 |
| `targetSpec.name` | string | yes | Name of the endpoint group. At most 255 characters. |
| `updatedAt` | string (date-time) | read-only | Date and time the endpoint group was last updated |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "cidrs": [
      "192.0.2.0/24"
    ],
    "description": "string",
    "location": {
      "region": "string"
    },
    "name": "string"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "cidrs": [
      "192.0.2.0/24"
    ],
    "description": "string",
    "location": {
      "region": "string"
    },
    "name": "string"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X POST \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/vpn/endpointGroup" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -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: publicCloud.vpn.EndpointGroupCreation
result = client.post("/v2/publicCloud/project/{projectId}/vpn/endpointGroup",
	targetSpec = None, # Desired specification of the endpoint group to create (type: publicCloud.vpn.EndpointGroupTargetSpec)
)

# 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: publicCloud.vpn.EndpointGroupCreation
$result = $ovh->post("/v2/publicCloud/project/{projectId}/vpn/endpointGroup", array(
	targetSpec => null, // Desired specification of the endpoint group to create (type: publicCloud.vpn.EndpointGroupTargetSpec)
));

print_r($result);
?>
```

## Delete an endpoint group

`DELETE /v2/publicCloud/project/{projectId}/vpn/endpointGroup/{endpointGroupId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/network/site-to-site-vpn/endpoint-groups/#deleteVpnEndpointGroup

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:vpn/endpointGroup/delete`

Deletes the endpoint group. It is refused while an IPsec connection uses it. Deletion applies immediately: the response already holds the result.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `endpointGroupId` | path | string (uuid) | yes | Endpoint group ID |
| `projectId` | path | string | yes | Project ID |

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.vpn.EndpointGroup | successful operation |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of the current target specification. Send it back in the update payload to detect concurrent changes. |
| `createdAt` | string (date-time) | read-only | Date and time the endpoint group was created |
| `currentState` | publicCloud.vpn.EndpointGroupCurrentState | read-only | Observed state of the endpoint group. Null while the endpoint group is being created. |
| `currentState.cidrs` | ipBlock[] | read-only | Networks of the endpoint group, in CIDR notation |
| `currentState.description` | string | read-only | Free-form description of the endpoint group. Null when none was given. |
| `currentState.location` | publicCloud.vpn.Location | read-only | Region of the endpoint group |
| `currentState.location.region` | string | yes | Region code, such as GRA11 |
| `currentState.name` | string | read-only | Name of the endpoint group |
| `currentTasks` | common.CurrentTask[] | read-only | Asynchronous operations ongoing on the endpoint group |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the endpoint group |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness of the endpoint group: whether its observed state has converged to its target specification — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.vpn.EndpointGroupTargetSpec | read-only | Last target specification requested for the endpoint group |
| `targetSpec.cidrs` | ipBlock[] | yes | Networks of the endpoint group, in CIDR notation. Replaced as a whole on update, and only while no IPsec connection uses the endpoint group. At least one. |
| `targetSpec.description` | string |  | Free-form description of the endpoint group. At most 255 characters. |
| `targetSpec.location` | publicCloud.vpn.Location | yes | Region of the endpoint group: only the IPsec connections of the VPN gateways of this region can use it. Immutable after creation. |
| `targetSpec.location.region` | string | yes | Region code, such as GRA11 |
| `targetSpec.name` | string | yes | Name of the endpoint group. At most 255 characters. |
| `updatedAt` | string (date-time) | read-only | Date and time the endpoint group was last updated |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "cidrs": [
      "192.0.2.0/24"
    ],
    "description": "string",
    "location": {
      "region": "string"
    },
    "name": "string"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "cidrs": [
      "192.0.2.0/24"
    ],
    "description": "string",
    "location": {
      "region": "string"
    },
    "name": "string"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X DELETE \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/vpn/endpointGroup/{endpointGroupId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -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("/v2/publicCloud/project/{projectId}/vpn/endpointGroup/{endpointGroupId}")

# 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("/v2/publicCloud/project/{projectId}/vpn/endpointGroup/{endpointGroupId}");

print_r($result);
?>
```

## Update an endpoint group

`PUT /v2/publicCloud/project/{projectId}/vpn/endpointGroup/{endpointGroupId}`

Link: https://developers.eu.ovhcloud.com/reference/public-cloud/network/site-to-site-vpn/endpoint-groups/#editVpnEndpointGroup

**Status:** Alpha version  
**IAM actions:** `publicCloudProject:apiovh:vpn/endpointGroup/edit`

The target specification replaces the previous one as a whole: a field left null goes back to its default, and targetSpec.cidrs replaces the networks as a whole. Send the checksum of the last GET to reject the update with a checksum mismatch when someone changed the resource in between. While an IPsec connection uses the endpoint group, its networks cannot change and only the name and the description can: sending the current networks again is accepted. The update applies immediately: the response already holds the result.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `endpointGroupId` | path | string (uuid) | yes | Endpoint group ID |
| `projectId` | path | string | yes | Project ID |

### Request body (required)

Type: `publicCloud.vpn.EndpointGroupUpdate`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string |  | Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins). |
| `targetSpec` | publicCloud.vpn.EndpointGroupUpdateTargetSpec | yes | Desired specification of the endpoint group. It replaces the previous one as a whole. |
| `targetSpec.cidrs` | ipBlock[] | yes | Networks of the endpoint group, in CIDR notation. Replaced as a whole on update, and only while no IPsec connection uses the endpoint group. At least one. |
| `targetSpec.description` | string |  | Free-form description of the endpoint group. Null or omitted removes the current description. At most 255 characters. |
| `targetSpec.name` | string | yes | Name of the endpoint group. At most 255 characters. |

```json
{
  "checksum": "string",
  "targetSpec": {
    "cidrs": [
      "192.0.2.0/24"
    ],
    "description": "string",
    "name": "string"
  }
}
```

### Responses

| Status | Type | Description |
| --- | --- | --- |
| 200 | publicCloud.vpn.EndpointGroup | successful operation |
| 400 | object | Error 400 response |
| 404 | object | Error 404 response |
| 409 | object | Error 409 response |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checksum` | string | read-only | Hash of the current target specification. Send it back in the update payload to detect concurrent changes. |
| `createdAt` | string (date-time) | read-only | Date and time the endpoint group was created |
| `currentState` | publicCloud.vpn.EndpointGroupCurrentState | read-only | Observed state of the endpoint group. Null while the endpoint group is being created. |
| `currentState.cidrs` | ipBlock[] | read-only | Networks of the endpoint group, in CIDR notation |
| `currentState.description` | string | read-only | Free-form description of the endpoint group. Null when none was given. |
| `currentState.location` | publicCloud.vpn.Location | read-only | Region of the endpoint group |
| `currentState.location.region` | string | yes | Region code, such as GRA11 |
| `currentState.name` | string | read-only | Name of the endpoint group |
| `currentTasks` | common.CurrentTask[] | read-only | Asynchronous operations ongoing on the endpoint group |
| `currentTasks[].errors` | common.TaskError[] | read-only | Errors that occurred on the task |
| `currentTasks[].errors[].message` | string | read-only | Error description |
| `currentTasks[].id` | string (uuid) | read-only | Identifier of the current task |
| `currentTasks[].link` | string | read-only | Link to the task details |
| `currentTasks[].status` | common.CurrentTaskStatusEnum | read-only | Current global status of the current task — one of `ERROR`, `PENDING`, `RUNNING`, `SCHEDULED`, `WAITING_USER_INPUT` |
| `currentTasks[].type` | string | read-only | Type of the current task |
| `id` | string (uuid) | read-only | Unique identifier of the endpoint group |
| `resourceStatus` | common.ResourceStatusEnum | read-only | Readiness of the endpoint group: whether its observed state has converged to its target specification — one of `CREATING`, `CREATION_PLANNED`, `DELETING`, `ERROR`, `OUT_OF_SYNC`, `READY`, `SUSPENDED`, `UNKNOWN`, `UPDATING` |
| `targetSpec` | publicCloud.vpn.EndpointGroupTargetSpec | read-only | Last target specification requested for the endpoint group |
| `targetSpec.cidrs` | ipBlock[] | yes | Networks of the endpoint group, in CIDR notation. Replaced as a whole on update, and only while no IPsec connection uses the endpoint group. At least one. |
| `targetSpec.description` | string |  | Free-form description of the endpoint group. At most 255 characters. |
| `targetSpec.location` | publicCloud.vpn.Location | yes | Region of the endpoint group: only the IPsec connections of the VPN gateways of this region can use it. Immutable after creation. |
| `targetSpec.location.region` | string | yes | Region code, such as GRA11 |
| `targetSpec.name` | string | yes | Name of the endpoint group. At most 255 characters. |
| `updatedAt` | string (date-time) | read-only | Date and time the endpoint group was last updated |

```json
{
  "checksum": "string",
  "createdAt": "2024-01-01T12:00:00Z",
  "currentState": {
    "cidrs": [
      "192.0.2.0/24"
    ],
    "description": "string",
    "location": {
      "region": "string"
    },
    "name": "string"
  },
  "currentTasks": [
    {
      "errors": [
        {
          "message": "string"
        }
      ],
      "id": "00000000-0000-0000-0000-000000000000",
      "link": "string",
      "status": "ERROR",
      "type": "string"
    }
  ],
  "id": "00000000-0000-0000-0000-000000000000",
  "resourceStatus": "CREATING",
  "targetSpec": {
    "cidrs": [
      "192.0.2.0/24"
    ],
    "description": "string",
    "location": {
      "region": "string"
    },
    "name": "string"
  },
  "updatedAt": "2024-01-01T12:00:00Z"
}
```

### Example

```bash
curl -X PUT \
  "https://api.eu.ovhcloud.com/v2/publicCloud/project/{projectId}/vpn/endpointGroup/{endpointGroupId}" \
  -H "accept: application/json" \
  -H "X-Schemas-Version: 2026-06" \
  -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: publicCloud.vpn.EndpointGroupUpdate
result = client.put("/v2/publicCloud/project/{projectId}/vpn/endpointGroup/{endpointGroupId}",
	checksum = None, # Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins). (type: string, nullable)
	targetSpec = None, # Desired specification of the endpoint group. It replaces the previous one as a whole. (type: publicCloud.vpn.EndpointGroupUpdateTargetSpec)
)

# 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: publicCloud.vpn.EndpointGroupUpdate
$result = $ovh->put("/v2/publicCloud/project/{projectId}/vpn/endpointGroup/{endpointGroupId}", array(
	checksum => null, // Optional concurrency-control checksum. When supplied, it must match the resource's current checksum or the request is rejected with a 409 checksum-mismatch conflict. When omitted or empty, the concurrency check is skipped and the write is forced (last-write-wins). (type: string, nullable)
	targetSpec => null, // Desired specification of the endpoint group. It replaces the previous one as a whole. (type: publicCloud.vpn.EndpointGroupUpdateTargetSpec)
));

print_r($result);
?>
```
