Skip to main content
GET
/
vpn_sessions
Go (SDK)
package main

import(
	"context"
	"os"
	latitudeshgosdk "github.com/latitudesh/latitudesh-go-sdk"
	"github.com/latitudesh/latitudesh-go-sdk/models/operations"
	"log"
)

func main() {
    ctx := context.Background()

    s := latitudeshgosdk.New(
        latitudeshgosdk.WithSecurity(os.Getenv("LATITUDESH_BEARER")),
    )

    res, err := s.VpnSessions.List(ctx, operations.FilterLocationSao.ToPointer())
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
{
  "data": [
    {
      "id": "vpn_zGr47qlMDAg0m",
      "type": "vpn_sessions",
      "attributes": {
        "user_name": "Delana",
        "port": "8443",
        "host": "fw04-mh1.maxi.host",
        "region": {
          "city": "São Paulo",
          "country": "Australia",
          "site": {
            "id": "loc_W6Q2D9YEDKLpr",
            "name": "São Paulo",
            "slug": "SAO",
            "facility": "São Paulo"
          }
        },
        "expires_at": "2025-07-16T18:46:43+00:00",
        "created_at": "2025-07-16T18:45:43+00:00",
        "updated_at": "2025-07-16T18:45:43+00:00"
      }
    }
  ],
  "meta": {}
}

Authorizations

Authorization
string
header
required

Query Parameters

filter[location]
enum<string>
Available options:
ASH,
BGT,
BUE,
CHI,
DAL,
FRA,
LAX,
LON,
MEX,
MEX2,
MIA,
MIA2,
NYC,
SAN,
SAO,
SAO2,
SYD,
TYO,
TYO2

Response

200 - application/vnd.api+json

Success

data
object[]
meta
object