Skip to content

List rules for a security group

GET
/api/v1/security-group/{id}/rule
curl --request GET \
--url https://console.cloudlogics.com/api/v1/security-group/8f14e45f-ceea-467a-9f2c-1b1d3a5e77c2/rule \
--header 'Authorization: <Authorization>'

List rules attached to the given security group

id
required
string

Security group ID

Every rule in the group.

Media typeapplication/json
object
data
Array<object>

A rule as the API returns it. Several field names differ from the ones you send.

object
id
string
security_group_id
string
project_id
string
name

Null for rules created through the API.

string
direction
string
Allowed values: ingress egress
protocol
string
port_range_min

Integer, although you sent dst_port as a string.

integer
port_range_max
integer
ether_type

Underscored, although you sent ethertype.

string
remote_ip_prefix

The CIDR you sent as remote_ip.

string
normalized_cidr
string
remote_group_id
string
remote_address_group_id
string
belongs_to_default_sg
boolean
revision_number
integer
description
string
created_at
string
Example
{
"data": [
{
"id": "614eee70-0cc3-4d40-90aa-a023d77d7808",
"security_group_id": "8f14e45f-ceea-467a-9f2c-1b1d3a5e77c2",
"project_id": "739c7634e11841a18196db15428400aa",
"direction": "ingress",
"protocol": "tcp",
"port_range_min": 443,
"port_range_max": 443,
"ether_type": "IPv4",
"remote_ip_prefix": "0.0.0.0/0",
"normalized_cidr": "0.0.0.0/0",
"belongs_to_default_sg": false,
"revision_number": 0,
"description": "HTTPS from anywhere",
"created_at": "2026-09-08T20:26:02Z"
}
]
}

Invalid ID

Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{
"data": "example",
"error": {
"code": 1,
"message": "example"
},
"page": {
"next": "example",
"prev": "example",
"total_size": 1
}
}

Internal server error

Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{
"data": "example",
"error": {
"code": 1,
"message": "example"
},
"page": {
"next": "example",
"prev": "example",
"total_size": 1
}
}