List rules for a security group
GET
/api/v1/security-group/{id}/rule
const url = 'https://console.cloudlogics.com/api/v1/security-group/8f14e45f-ceea-467a-9f2c-1b1d3a5e77c2/rule';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Security group ID
Responses
Section titled “Responses”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
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 }}