List security groups
Retrieve security groups and their rules.
Security groups control inbound and outbound traffic to your instances.
Endpoint
GET /v1/security_groupsExample
cURL
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
| Field | Type | Description |
|---|---|---|
| id | string | Security group ID |
| name | string | Name, unique in your account by convention (instances get their groups by name) |
| description | string | Description |
| security_group_rules | array | The group’s rules |
| created_at | string | When it was created |
| updated_at | string | When it last changed |
Rule
| Field | Type | Description |
|---|---|---|
| id | string | Rule ID |
| security_group_id | string | The group the rule belongs to |
| direction | string | ingress (traffic coming in) or egress (traffic going out) |
| protocol | string or null | tcp, udp, icmp, or null for any protocol |
| port_range_min | number or null | First port, null for every port |
| port_range_max | number or null | Last port (the same as port_range_min for one port) |
| remote_ip_prefix | string or null | The other side as an address range; null with no remote_group_id means anywhere |
| remote_group_id | string or null | The other side as another of your security groups: only its instances |
| ethertype | string | IPv4 or IPv6 |
| description | string | A note on the rule |
| created_at | string | When 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