Skip to Content
APINetworksSecurity GroupsList Security Groups

List security groups

Retrieve security groups and their rules.

Security groups control inbound and outbound traffic to your instances.


Endpoint

GET /v1/security_groups

Example

curl https://api.redu.cloud/v1/security_groups \ -H "x-api-key: YOUR_API_KEY"

Successful response

An array of your security groups, each with its rules.

[ { "id": "1c62ad45-128d-45d9-b164-6cefdf5e8739", "name": "web", "description": "Public website", "security_group_rules": [ { "id": "8f0e6a52-1c7b-4c1d-9a51-2b7e0c1d4f10", "security_group_id": "1c62ad45-128d-45d9-b164-6cefdf5e8739", "direction": "ingress", "protocol": "tcp", "port_range_min": 443, "port_range_max": 443, "remote_ip_prefix": "0.0.0.0/0", "remote_group_id": null, "ethertype": "IPv4", "description": "", "created_at": "2026-11-09T21:00:00Z" }, { "id": "a3d9c0e1-5b2f-4a7e-8c61-0d9e8f7a6b5c", "security_group_id": "1c62ad45-128d-45d9-b164-6cefdf5e8739", "direction": "egress", "protocol": null, "port_range_min": null, "port_range_max": null, "remote_ip_prefix": null, "remote_group_id": null, "ethertype": "IPv4", "description": "", "created_at": "2026-11-09T21:00:00Z" } ], "created_at": "2026-11-09T21:00:00Z", "updated_at": "2026-11-09T21:00:00Z" } ]

Fields

Security group

FieldTypeDescription
idstringSecurity group ID
namestringName, unique in your account by convention (instances get their groups by name)
descriptionstringDescription
security_group_rulesarrayThe group’s rules
created_atstringWhen it was created
updated_atstringWhen it last changed

Rule

FieldTypeDescription
idstringRule ID
security_group_idstringThe group the rule belongs to
directionstringingress (traffic coming in) or egress (traffic going out)
protocolstring or nulltcp, udp, icmp, or null for any protocol
port_range_minnumber or nullFirst port, null for every port
port_range_maxnumber or nullLast port (the same as port_range_min for one port)
remote_ip_prefixstring or nullThe other side as an address range; null with no remote_group_id means anywhere
remote_group_idstring or nullThe other side as another of your security groups: only its instances
ethertypestringIPv4 or IPv6
descriptionstringA note on the rule
created_atstringWhen it was created

Manage groups with create, rename and delete, rules with add and delete, and an instance’s groups with set an instance’s groups.


Errors

401 Unauthorized

{ "error": { "code": "unauthorized", "message": "Invalid API key" } }

403 Forbidden

The API key does not have access to the requested resource.

Last updated on