Get a VPC
curl --request GET \
--url https://app.miget.com/api/v1/vpcs/{uuid} \
--header 'Authorization: <api-key>'import requests
url = "https://app.miget.com/api/v1/vpcs/{uuid}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.miget.com/api/v1/vpcs/{uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.miget.com/api/v1/vpcs/{uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.miget.com/api/v1/vpcs/{uuid}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.miget.com/api/v1/vpcs/{uuid}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.miget.com/api/v1/vpcs/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"uuid": "<string>",
"name": "<string>",
"label": "<string>",
"status": "<string>",
"region_code": "<string>",
"cidr_v4": "<string>",
"cidr_v6": "<string>",
"resolver_v4": "<string>",
"vpn_pool_v4": "<string>",
"subnet_count": 123,
"attachment_count": 123,
"created_at": "2023-11-07T05:31:56Z"
}VPCs
Get a VPC
Returns one private network, including the resolver address VPN clients and external resolvers need.
GET
/
api
/
v1
/
vpcs
/
{uuid}
Get a VPC
curl --request GET \
--url https://app.miget.com/api/v1/vpcs/{uuid} \
--header 'Authorization: <api-key>'import requests
url = "https://app.miget.com/api/v1/vpcs/{uuid}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.miget.com/api/v1/vpcs/{uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.miget.com/api/v1/vpcs/{uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.miget.com/api/v1/vpcs/{uuid}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.miget.com/api/v1/vpcs/{uuid}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.miget.com/api/v1/vpcs/{uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"uuid": "<string>",
"name": "<string>",
"label": "<string>",
"status": "<string>",
"region_code": "<string>",
"cidr_v4": "<string>",
"cidr_v6": "<string>",
"resolver_v4": "<string>",
"vpn_pool_v4": "<string>",
"subnet_count": 123,
"attachment_count": 123,
"created_at": "2023-11-07T05:31:56Z"
}Authorizations
Bearer token for authentication. Format: 'Bearer {token}'
Headers
Workspace ID (uses default workspace if not provided)
Path Parameters
VPC UUID
Response
Get a VPC
Api_V1_Entities_Vpc model
Unique VPC identifier
VPC name, unique per region
Display label
Current status (pending, active, failed, deleting)
Region the VPC lives in. A VPC cannot span regions.
IPv4 range the subnets are carved from
IPv6 range, derived when not supplied
Address of the VPC's DNS resolver, at the base of the range plus two
Range VPN clients are addressed from
Number of subnets
Number of attached workloads
Creation timestamp

