from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.private_networks.list_assignments(filter_server="217", filter_vid="8", page_size=20, page_number=1)
while res is not None:
# Handle items
res = res.next(){
"data": [
{
"id": "vnasg_6VE1Wd37dXnZJ",
"type": "virtual_network_assignment",
"attributes": {
"virtual_network_id": "vlan_7vYAZqGBdMQ94",
"vid": 1,
"description": "West Inc",
"status": "connected",
"server": {
"id": "sv_GnzRD5BYOM5yw",
"hostname": "db",
"label": "BRC01",
"locked": false,
"status": "unknown"
}
}
},
{
"id": "vnasg_VaNmodjeObE8W",
"type": "virtual_network_assignment",
"attributes": {
"virtual_network_id": "vlan_r0MK4O4kDa95w",
"vid": 2,
"description": "Reynolds-Steuber",
"status": "connecting",
"server": {
"id": "sv_KXgRdRLKDv9k5",
"hostname": "api",
"label": "BRC02",
"locked": false,
"status": "unknown"
}
}
}
],
"meta": {}
}Returns a list of all servers assigned to virtual networks.
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.private_networks.list_assignments(filter_server="217", filter_vid="8", page_size=20, page_number=1)
while res is not None:
# Handle items
res = res.next(){
"data": [
{
"id": "vnasg_6VE1Wd37dXnZJ",
"type": "virtual_network_assignment",
"attributes": {
"virtual_network_id": "vlan_7vYAZqGBdMQ94",
"vid": 1,
"description": "West Inc",
"status": "connected",
"server": {
"id": "sv_GnzRD5BYOM5yw",
"hostname": "db",
"label": "BRC01",
"locked": false,
"status": "unknown"
}
}
},
{
"id": "vnasg_VaNmodjeObE8W",
"type": "virtual_network_assignment",
"attributes": {
"virtual_network_id": "vlan_r0MK4O4kDa95w",
"vid": 2,
"description": "Reynolds-Steuber",
"status": "connecting",
"server": {
"id": "sv_KXgRdRLKDv9k5",
"hostname": "api",
"label": "BRC02",
"locked": false,
"status": "unknown"
}
}
}
],
"meta": {}
}Documentation Index
Fetch the complete documentation index at: https://www.latitude.sh/docs/llms.txt
Use this file to discover all available pages before exploring further.
The server ID to filter by
The vlan ID to filter by
The virtual network ID to filter by
Number of items to return per page
x >= 1Page number to return (starts at 1)
x >= 1Was this page helpful?