Skip to main content
GET
/
virtual_networks
Typescript (SDK)
import { Latitudesh } from "latitudesh-typescript-sdk";

const latitudesh = new Latitudesh({
  bearer: process.env["LATITUDESH_BEARER"] ?? "",
});

async function run() {
  const result = await latitudesh.privateNetworks.list({
    filterTags: "tag_BZWAJKePr2Fx9kRyyaARImQlXmW,tag_X8yMgb8AZPFrX72lQgrwhBVnPN2",
  });

  for await (const page of result) {
    console.log(page);
  }
}

run();
{
  "data": [
    {
      "id": "vlan_AW6Q2D9lqKLpr",
      "type": "virtual_networks",
      "attributes": {
        "tags": [
          {
            "id": "tag_rNk62XV5ewSV52K5oAv5FbENl1R",
            "name": "tag1",
            "description": "Quia quia natus numquam.",
            "color": "#ead6ea"
          }
        ],
        "vid": 2040,
        "description": "Consequatur quo aut quia.",
        "created_at": null,
        "region": {
          "city": "Sydney 243",
          "country": "Australia 253",
          "site": {
            "id": "loc_1ZJrdxnWDg4LV",
            "name": "Sydney 243",
            "slug": "SYD204",
            "facility": "Sydney 243"
          }
        },
        "project": {
          "id": "proj_W6Q2D9ordKLpr",
          "name": "Sleek Leather Hat",
          "slug": "sleek-leather-hat",
          "description": "Enormous Copper Lamp",
          "billing_type": "Normal",
          "billing_method": "Normal",
          "bandwidth_alert": false,
          "environment": null,
          "billing": {
            "subscription_id": null,
            "type": "Normal",
            "method": "Normal"
          },
          "stats": {
            "databases": 0,
            "ip_addresses": 2,
            "prefixes": 0,
            "servers": 1,
            "storages": 0,
            "virtual_machines": 0,
            "vlans": 2
          }
        },
        "assignments_count": 1
      }
    }
  ],
  "meta": {}
}

Authorizations

Authorization
string
header
required

Query Parameters

filter[location]
string

The location slug to filter by

filter[project]
string

The project id or slug to filter by

filter[tags]
string

The tags ids to filter by, separated by comma, e.g. filter[tags]=tag_1,tag_2will return ssh keys with tag_1 AND tag_2

page[size]
integer
default:20

Number of items to return per page

Required range: x >= 1
page[number]
integer
default:1

Page number to return (starts at 1)

Required range: x >= 1

Response

200 - application/vnd.api+json

Success

data
object[]
meta
object