Skip to main content
GET
/
cloud
/
v1
/
ports
/
{project_id}
/
{region_id}
List ports
curl --request GET \
  --url https://api.gcore.com/cloud/v1/ports/{project_id}/{region_id} \
  --header 'Authorization: <api-key>'
{
  "count": 1,
  "results": [
    {
      "allowed_address_pairs": [
        {
          "ip_address": "192.168.123.20"
        }
      ],
      "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",
      "network_id": "bc688791-f1b0-44eb-97d4-07697294b1e1",
      "port_security_enabled": true,
      "security_group_ids": [
        "bc688791-f1b0-44eb-97d4-07697294b1e1"
      ],
      "tags": {
        "env": "prod",
        "team": "platform"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

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
integer
required

Project ID

Example:

1

region_id
integer
required

Region ID

Example:

1

Query Parameters

ids
string<uuid4>[]

Filter by port ID(s). Exact match.

ip_addresses
string<ipvanyaddress>[]

Filter by IP address(es). Exact match.

limit
integer
default:100

Optional. Limit the number of returned items

Required range: x <= 1000
Example:

100

network_ids
string<uuid4>[]

Filter by network ID(s). Exact match.

offset
integer
default:0

Optional. Offset value is used to exclude the first set of records from the result

Required range: x >= 0
Example:

0

order_by
enum<string>
default:created_at.desc

Sort field and direction, e.g. created_at.desc or network_id.asc

Available options:
created_at.asc,
created_at.desc,
network_id.asc,
network_id.desc
subnet_ids
string<uuid4>[]

Filter by subnet ID(s). Exact match.

Response

200 - application/json

OK

count
integer
required

Number of objects

Required range: x >= 0
Example:

1

results
PortDetailSerializer · object[]
required

Objects