---
title: "List security groups"
method: GET
path: "/api/v1/security-groups"
tags: ["Networking"]
---

# List security groups

`GET /api/v1/security-groups`

List the account's security groups. Pass `X-Project-ID` to scope to one project, or omit it to list across all accessible projects.

## Headers

- `X-Project-ID` string, uuid

## Response `200`

List of security groups

- object
  - `success` boolean
  - `data` SecurityGroup[]
    - `id` string, uuid, required — Security group ID.
    - `name` string, required
    - `description` string
    - `rules` SecurityGroupRule[], required
      - `protocol` 'TCP' | 'UDP' | 'ICMP' | 'ICMPV6' | 'IPSEC' | 'ALL', required — Network protocol.
      - `rule_type` 'INBOUND' | 'OUTBOUND', required — Direction of traffic.
      - `range` string — Port or port range. Single port (`80`) or range (`8000:9000`). Empty for ICMP/ALL.
      - `ip` string — Source/destination IP for the rule. Empty means any.
      - `size` integer — CIDR block size (e.g. `24` for /24). Used with `ip` to allow a network range.
      - `icmp_type` integer — ICMP message type (only for ICMP/ICMPV6 protocols).
    - `vm_count` integer — Number of VM NICs currently using this security group.
    - `project_id` string, uuid
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `401` — Authentication required

## Changes

- **2026-05-06** `9e13a6e23934` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/rafftechnologies/apis/raff-api/changes/api/v1/security-groups/get.md)

---

[API](https://skmtc.dev/rafftechnologies/apis/raff-api.md) · [All operations](https://skmtc.dev/rafftechnologies/apis/raff-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rafftechnologies/raff-api/revisions/9e13a6e23934/schema)
