curl --request GET \
--url https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_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.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_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: <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://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}"
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://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}")
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{
"allowed_address_pairs": [
{
"ip_address": "192.168.123.20"
}
],
"attached_to": {
"resource_id": "a1b2c3d4-e5f6-4000-8000-000000000001",
"resource_type": "instance",
"trunk": {
"role": "parent"
}
},
"capabilities": {
"allowed_address_pairs": true,
"port_security": true,
"security_groups": true
},
"created_at": "2024-01-15T10:30:00Z",
"id": "1f0ca628-a73b-42c0-bdac-7b10d023e097",
"ip_assignments": [
{
"ip_address": "192.168.123.20",
"subnet_id": "351b0dd7-ca09-431c-be53-935db3785067"
}
],
"mac_address": "fa:16:3e:f2:87:16",
"managed_by": "user",
"network_id": "bc688791-f1b0-44eb-97d4-07697294b1e1",
"port_security_enabled": true,
"security_group_ids": [
"bc688791-f1b0-44eb-97d4-07697294b1e1"
],
"system_tags": {
"image_name": "ubuntu-22.04",
"os_type": "linux"
},
"tags": {
"env": "prod",
"team": "platform"
},
"updated_at": "2025-11-18T10:22:00Z"
}Get port
Returns detailed information about a specific port, including computed fields
(managed_by, capabilities).
curl --request GET \
--url https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id} \
--header 'Authorization: <api-key>'import requests
url = "https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_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.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_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: <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://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}"
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://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id}/{port_id}")
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{
"allowed_address_pairs": [
{
"ip_address": "192.168.123.20"
}
],
"attached_to": {
"resource_id": "a1b2c3d4-e5f6-4000-8000-000000000001",
"resource_type": "instance",
"trunk": {
"role": "parent"
}
},
"capabilities": {
"allowed_address_pairs": true,
"port_security": true,
"security_groups": true
},
"created_at": "2024-01-15T10:30:00Z",
"id": "1f0ca628-a73b-42c0-bdac-7b10d023e097",
"ip_assignments": [
{
"ip_address": "192.168.123.20",
"subnet_id": "351b0dd7-ca09-431c-be53-935db3785067"
}
],
"mac_address": "fa:16:3e:f2:87:16",
"managed_by": "user",
"network_id": "bc688791-f1b0-44eb-97d4-07697294b1e1",
"port_security_enabled": true,
"security_group_ids": [
"bc688791-f1b0-44eb-97d4-07697294b1e1"
],
"system_tags": {
"image_name": "ubuntu-22.04",
"os_type": "linux"
},
"tags": {
"env": "prod",
"team": "platform"
},
"updated_at": "2025-11-18T10:22:00Z"
}Authorizations
API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234_abcdef
Path Parameters
Project ID
1
Region ID
1
Port ID
"1f0ca628-a73b-42c0-bdac-7b10d023e097"
Response
OK
List of allowed address pairs. Sorted by ip_address for stable client refreshes.
Show child attributes
Show child attributes
The compute resource this port is attached to, including trunk role for trunk parents and sub-ports. null when the port is standalone (unattached).
Show child attributes
Show child attributes
What the driver enforces. null when the port is unattached (driver unknown).
Show child attributes
Show child attributes
Datetime when the port was created.
"2024-01-15T10:30:00Z"
Port ID
"1f0ca628-a73b-42c0-bdac-7b10d023e097"
List of IP addresses assigned to the port.
Show child attributes
Show child attributes
MAC address of the port
"fa:16:3e:f2:87:16"
Who manages this port: 'user' (full CRUD allowed) or 'system' (read-only)
system, user "user"
ID of the network the port belongs to
"bc688791-f1b0-44eb-97d4-07697294b1e1"
When true, the driver enforces port security on this port (anti-spoofing checks and security-group filtering apply). When false, all traffic is allowed and security groups are not applied.
true
List of security group IDs applied to the port. Sorted lexicographically for stable client refreshes.
["bc688791-f1b0-44eb-97d4-07697294b1e1"]
Read-only key-value tags on the port, set by the platform and not modifiable by the user
Show child attributes
Show child attributes
{ "image_name": "ubuntu-22.04", "os_type": "linux" }
Key-value tags on the port
Show child attributes
Show child attributes
{ "env": "prod", "team": "platform" }
Datetime when the port was last updated.
"2025-11-18T10:22:00Z"
Was this page helpful?