---
title: "Retrieve Security Group details"
method: GET
path: "/security-group/{id}"
tags: ["security-group"]
---

# Retrieve Security Group details

`GET /security-group/{id}`

## Request

- Base URL: `https://api-ch-gva-2.exoscale.com/v2`
- URL: `https://api-ch-gva-2.exoscale.com/v2/security-group/{id}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/exoscale/apis/exoscale-api/docs/security-group/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` string, uuid, required

## Response `200`

200

- SecurityGroup: Security Group
  - `id` string, uuid: Security Group ID
  - `name` string: Security Group name
  - `description` string: Security Group description
  - `external-sources` string[]: Security Group external sources
  - `rules` SecurityGroupRule[]: Security Group rules
    - `description` string: Security Group rule description
    - `start-port` integer: Start port of the range
    - `protocol` 'tcp' | 'esp' | 'icmp' | 'udp' | 'gre' | 'ah' | 'ipip' | 'icmpv6': Network protocol
    - `icmp` object: ICMP details
      - `code` integer
      - `type` integer
    - `end-port` integer: End port of the range
    - `security-group` SecurityGroupResource: Security Group
      - `id` string, uuid: Security Group ID
      - `name` string: Security Group name
      - `visibility` 'private' | 'public': Whether this points to a public security group. This is only valid when in the context of a rule addition which uses a public security group as a source or destination.
    - `id` string, uuid: Security Group rule ID
    - `network` string: CIDR-formatted network allowed
    - `flow-direction` 'ingress' | 'egress': Network flow direction to match

## Changes

- **2023-06-06** `cf7b08181585`: 1 breaking
  - the `rules/items/description` response property's minLength was decreased from `1` to `0` for the response status `200`
- **2023-02-03** `6e9809fd1444`: 3 breaking, 1 info
  - the response property `rules/items/security-group/id` became optional for the status `200`
  - the `rules/items/icmp/code` response property's min was decreased from `0.00` to `-1.00` for the response status `200`
  - the `rules/items/icmp/type` response property's min was decreased from `0.00` to `-1.00` for the response status `200`
  - added the optional property `rules/items/security-group/visibility` to the response with the `200` status

[Operation history](https://skmtc.dev/exoscale/apis/exoscale-api/changes/security-group/:id/get.md)

---

[API](https://skmtc.dev/exoscale/apis/exoscale-api.md) - [All operations](https://skmtc.dev/exoscale/apis/exoscale-api/llms.txt) - [OpenAPI document](https://skmtc.dev/exoscale/apis/exoscale-api/revisions/63da6f74c845?raw)
