List Networks
curl --request GET \
--url https://api.mkinf.io/v0.1/projects/{id}/vpc/networks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mkinf.io/v0.1/projects/{id}/vpc/networks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mkinf.io/v0.1/projects/{id}/vpc/networks', 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://api.mkinf.io/v0.1/projects/{id}/vpc/networks",
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: Bearer <token>"
],
]);
$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://api.mkinf.io/v0.1/projects/{id}/vpc/networks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mkinf.io/v0.1/projects/{id}/vpc/networks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mkinf.io/v0.1/projects/{id}/vpc/networks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "695b751c-2eaa-4e8b-8eb2-84cb367a69fe",
"name": "default-vpc-network",
"subnets": [
"7ceecd34-2631-4857-ad82-ceb9dfd09425",
"1f264f8a-a753-462a-8fa8-bfe7bdb90891",
"778aaeef-5edd-4fc6-868f-b6cdd17795b7"
],
"gateway": "898c4316-49d5-48c7-919c-4b7c71f006dc",
"cidr": "172.27.0.0/16"
}
]
}Networking
List Networks
Retrieve details about all VPC networks
GET
/
projects
/
{id}
/
vpc
/
networks
List Networks
curl --request GET \
--url https://api.mkinf.io/v0.1/projects/{id}/vpc/networks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mkinf.io/v0.1/projects/{id}/vpc/networks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mkinf.io/v0.1/projects/{id}/vpc/networks', 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://api.mkinf.io/v0.1/projects/{id}/vpc/networks",
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: Bearer <token>"
],
]);
$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://api.mkinf.io/v0.1/projects/{id}/vpc/networks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.mkinf.io/v0.1/projects/{id}/vpc/networks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mkinf.io/v0.1/projects/{id}/vpc/networks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": "695b751c-2eaa-4e8b-8eb2-84cb367a69fe",
"name": "default-vpc-network",
"subnets": [
"7ceecd34-2631-4857-ad82-ceb9dfd09425",
"1f264f8a-a753-462a-8fa8-bfe7bdb90891",
"778aaeef-5edd-4fc6-868f-b6cdd17795b7"
],
"gateway": "898c4316-49d5-48c7-919c-4b7c71f006dc",
"cidr": "172.27.0.0/16"
}
]
}List all VPC networks in a project. Returns information about each network including subnets, gateway, and CIDR range.
⌘I