Authorizations
Body
Response
201 - application/vnd.api+json
Created
import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.vpn_sessions.create(data={
"attributes": {
"site": latitudesh_python_sdk.PostVpnSessionVpnSessionsSite.SAO,
"server_id": "sv_wg3ZDrKyO5QlP",
},
})
# Handle response
print(res)
{
"data": {
"id": "vpn_xkjQwdENqYNVP",
"type": "vpn_sessions",
"attributes": {
"user_name": "Winifred",
"password": "caL1dENKqEspX",
"port": "8443",
"host": "fw04-mh1.maxi.host",
"region": {
"city": "São Paulo",
"country": "Colombia",
"site": {
"id": "loc_w49QDBwKOagKb",
"name": "São Paulo",
"slug": "SAO",
"facility": "São Paulo"
}
},
"expires_at": "2025-07-16T18:38:18+00:00",
"created_at": "2025-07-16T18:37:18+00:00",
"updated_at": "2025-07-16T18:37:18+00:00"
}
},
"meta": {}
}
Creates a new VPN Session.
NOTE:
The VPN credentials are only listed ONCE upon creation. They can however be refreshed or deleted.
import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.vpn_sessions.create(data={
"attributes": {
"site": latitudesh_python_sdk.PostVpnSessionVpnSessionsSite.SAO,
"server_id": "sv_wg3ZDrKyO5QlP",
},
})
# Handle response
print(res)
{
"data": {
"id": "vpn_xkjQwdENqYNVP",
"type": "vpn_sessions",
"attributes": {
"user_name": "Winifred",
"password": "caL1dENKqEspX",
"port": "8443",
"host": "fw04-mh1.maxi.host",
"region": {
"city": "São Paulo",
"country": "Colombia",
"site": {
"id": "loc_w49QDBwKOagKb",
"name": "São Paulo",
"slug": "SAO",
"facility": "São Paulo"
}
},
"expires_at": "2025-07-16T18:38:18+00:00",
"created_at": "2025-07-16T18:37:18+00:00",
"updated_at": "2025-07-16T18:37:18+00:00"
}
},
"meta": {}
}
Show child attributes
Created
Show child attributes
Was this page helpful?