Get VPC by ID
curl --request GET \
--url https://api.cloud.onidel.com/network/vpcs/{vpc_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cloud.onidel.com/network/vpcs/{vpc_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cloud.onidel.com/network/vpcs/{vpc_id}', 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.cloud.onidel.com/network/vpcs/{vpc_id}",
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.cloud.onidel.com/network/vpcs/{vpc_id}"
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.cloud.onidel.com/network/vpcs/{vpc_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloud.onidel.com/network/vpcs/{vpc_id}")
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{
"vpc": {
"id": "f5a3e2d8-9876-4abc-1234-543210fedcba",
"name": "Production VPC",
"description": "VPC for production environment",
"date_created": "2024-01-15T10:30:00Z",
"status": "active",
"location": "sydney",
"v4_subnet": "10.0.0.0",
"v4_subnet_mask": "24",
"owner_team": {
"id": "c1d45377-b2a9-4407-ab8d-6909c34dfaac",
"name": "IT Development"
},
"teams": [
{
"id": "c1d45377-b2a9-4407-ab8d-6909c34dfaac",
"name": "IT Development"
}
],
"attached_vms_count": 5,
"attached_vms": [
{
"id": "a1b2c3d4-5678-9abc-def0-123456789abc",
"name": "web-server-01",
"power_status": "running",
"owner_team": {
"id": "c1d45377-b2a9-4407-ab8d-6909c34dfaac",
"name": "IT Development"
},
"mac": "52:54:00:12:34:56",
"vpc_id": "f5a3e2d8-9876-4abc-1234-543210fedcba",
"vpc_name": "Production VPC",
"address": "10.0.0.10"
}
]
}
}VPC
Get VPC by ID
Retrieve a specific VPC by its UUID
GET
/
network
/
vpcs
/
{vpc_id}
Get VPC by ID
curl --request GET \
--url https://api.cloud.onidel.com/network/vpcs/{vpc_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cloud.onidel.com/network/vpcs/{vpc_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cloud.onidel.com/network/vpcs/{vpc_id}', 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.cloud.onidel.com/network/vpcs/{vpc_id}",
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.cloud.onidel.com/network/vpcs/{vpc_id}"
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.cloud.onidel.com/network/vpcs/{vpc_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloud.onidel.com/network/vpcs/{vpc_id}")
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{
"vpc": {
"id": "f5a3e2d8-9876-4abc-1234-543210fedcba",
"name": "Production VPC",
"description": "VPC for production environment",
"date_created": "2024-01-15T10:30:00Z",
"status": "active",
"location": "sydney",
"v4_subnet": "10.0.0.0",
"v4_subnet_mask": "24",
"owner_team": {
"id": "c1d45377-b2a9-4407-ab8d-6909c34dfaac",
"name": "IT Development"
},
"teams": [
{
"id": "c1d45377-b2a9-4407-ab8d-6909c34dfaac",
"name": "IT Development"
}
],
"attached_vms_count": 5,
"attached_vms": [
{
"id": "a1b2c3d4-5678-9abc-def0-123456789abc",
"name": "web-server-01",
"power_status": "running",
"owner_team": {
"id": "c1d45377-b2a9-4407-ab8d-6909c34dfaac",
"name": "IT Development"
},
"mac": "52:54:00:12:34:56",
"vpc_id": "f5a3e2d8-9876-4abc-1234-543210fedcba",
"vpc_name": "Production VPC",
"address": "10.0.0.10"
}
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
VPC UUID
Query Parameters
Team ID. Default team will be used if not provided.
Response
Successful operation
Show child attributes
Show child attributes
⌘I