List a VPC's site-to-site VPN connections

​

Paged list of the VPC's live VPN connections. Search matches the name. Reading the list refreshes the provider-reported states first, so a connection's state is as fresh as the last read; a provider that does not answer in time leaves the states last read. Requires the vpc feature; the vpn feature is not needed to read.

Path Parameters

  • Resource ID (UUID)

Query Parameters

  • Page number (1-indexed, default: 1)

  • Items per page (max varies by endpoint; default max 100)

  • Sortable fields: name, state, peerAddress, createdAt.

  • Search term to filter results across relevant text fields

  • Restrict the list to one state. The provider-reported states are refreshed before the filter applies.

    A VPN connection's lifecycle. creating and removing are owned by a job, which activeJobId names. connecting, connected, disconnected and error are what the provider reports about a built connection; they are refreshed when the VPC's VPN connections are read, so the state is as fresh as the last read. disconnected is not a fault: an idle connection can rest there until traffic brings it up, and a peer that stopped answering dead-peer detection reads the same. error is the provider reporting an error on a live connection. failed is the last job on the connection failing, with failureReason saying why and what to do next. A removing connection whose failureReason is set is a delete that failed and stopped; the delete can be retried at once. A named schema rather than an inline enum so a generated client keys on the member names.

    values
    creatingconnectingconnecteddisconnectederrorfailedremoving

Responses

  • application/json
  • application/json
  • Missing permission, or the vpc feature is not enabled for the entity. The vpn feature gates create, update and reset only; list, detail and delete stay open without it.

  • application/json
  • A path id that is not a uuid, a query key this endpoint does not take, or a state outside the enum

  • application/json
Request Example for get/resource/vpcs/{id}/vpn-connections
curl 'https://api.gpcn.com/v1/resource/vpcs/123e4567-e89b-12d3-a456-426614174000/vpn-connections?page=1&sort=createdAt%3Adesc&state=creating' \
  --header 'X-API-Key: YOUR_SECRET_TOKEN'
{
  "success": true,
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "string",
      "description": "string",
      "state": "creating",
      "providerState": "string",
      "failureReason": "string",
      "gatewayKind": "router",
      "localEndpointAddress": "string",
      "peerAddress": "203.0.113.10",
      "peerCidrs": [
        "192.168.10.0/24"
      ],
      "ikeVersion": "v1",
      "encryption": "aes128",
      "integrity": "sha256",
      "dhGroup": 14,
      "pfsGroup": 14,
      "ikeLifetimeSeconds": 28800,
      "ipsecLifetimeSeconds": 3600,
      "dpd": true,
      "desiredApplied": true,
      "activeJobId": "123e4567-e89b-12d3-a456-426614174000",
      "acceptedVerbs": [
        "update"
      ],
      "createdAt": "2026-10-21T16:19:07.188Z",
      "updatedAt": "2026-10-21T16:19:07.188Z"
    }
  ],
  "meta": {
    "total": 1,
    "page": 1,
    "pageSize": 1,
    "totalPages": 1,
    "hasNextPage": true,
    "hasPreviousPage": true
  }
}