TypeScript
import { Latitudesh } from "latitudesh-typescript-sdk"; const latitudesh = new Latitudesh({ bearer: process.env["LATITUDESH_BEARER"] ?? "", }); async function run() { const result = await latitudesh.privateNetworks.listAssignments({}); for await (const page of result) { console.log(page); } } run();
{ "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.
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 >= 1
Page number to return (starts at 1)
Success
Show child attributes
Was this page helpful?