---
title: "Retrieve all Network Security Groups"
method: GET
path: "/v2/org/{org}/nico/network-security-group"
tags: ["Network Security Group"]
---

# Retrieve all Network Security Groups

`GET /v2/org/{org}/nico/network-security-group`

Get all Network Security Groups for Tenant

Org must have a Tenant entity. User must have authorization role with `TENANT_ADMIN` suffix.

## Query parameters

- `siteId` string, uuid
- `status` string
- `query` string
- `includeRelation` 'Tenant' | 'Site'
- `pageNumber` integer
- `pageSize` integer
- `orderBy` 'NAME_ASC' | 'NAME_DESC' | 'STATUS_ASC' | 'STATUS_DESC' | 'CREATED_ASC' | 'CREATED_DESC' | 'UPDATED_ASC' | 'UPDATED_DESC'
- `includeAttachmentStats` boolean

## Response `200`

OK

- NetworkSecurityGroup[]
  - `id` string — Unique UUID v4 identifier for the Network Security Group
  - `name` string — Name of the Network Security Group
  - `description` string, nullable — Description of the Network Security Group
  - `siteId` string, uuid — ID of the Site
  - `tenantId` string, uuid — ID of the Tenant
  - `status` 'Pending' | 'Provisioning' | 'Ready' | 'Deleting' | 'Error' — Status values for Network Security Group objects
  - `statusHistory` StatusDetail[] — Chronological status history for the Network Security Group
    - `status` string — State of the associated entity at a particular time
    - `message` string, nullable — Description of the state and cause/remedy in case of error
    - `created` string, date-time — Date/time when the associated entity assumed the status
    - `updated` string, date-time — Date/time when the associated entity was last observed with this status
  - `statefulEgress` boolean — StatefulEgress defines whether a Network Security Group's egress rules will be automatically stateful
  - `rules` NetworkSecurityGroupRule[] — Rules that belong to the Network Security Group
    - `name` string, nullable — Name of the Network Security Group rule
    - `direction` 'INGRESS' | 'EGRESS', required — Traffic direction the rule applies to
    - `sourcePortRange` string, nullable — Source port or port range matched by the rule
    - `destinationPortRange` string, nullable — Destination port or port range matched by the rule
    - `protocol` 'TCP' | 'UDP' | 'ICMP' | 'ICMP6' | 'ANY', required — Network protocol matched by the rule
    - `action` 'PERMIT' | 'DENY', required — Action applied when traffic matches the rule
    - `priority` integer — Rule priority used to order evaluation
    - `sourcePrefix` string, required — Source CIDR prefix matched by the rule
    - `destinationPrefix` string, required — Destination CIDR prefix matched by the rule
  - `ruleCount` integer — Number of rules in the Network Security Group
  - `attachmentStats` NetworkSecurityGroupStats — Detailed attachment statistics for a Network Security Group
    - `inUse` boolean — Whether the Network Security Group is directly attached to at least one object
    - `directVpcAttachmentCount` integer — Number of VPCs that directly attach this Network Security Group
    - `directInstanceAttachmentCount` integer — Number of Instances that directly attach this Network Security Group
    - `totalDirectAttachmentCount` integer — Total number of objects that directly attach this Network Security Group
  - `labels` Labels
  - `created` string, date-time — Date/time when the Network Security Group was created
  - `updated` string, date-time — Date/time when the Network Security Group was last updated

## Other responses

- `400` — Error response when request data cannot be validated
- `403` — Error response when user is not authorized to call an endpoint or retrieve/modify objects
- `412` — Precondition Failed
- `500` — Response when the API handler encounters an unexpected error
- `501` — Response when the API handler encounters an unexpected error

---

[API](https://skmtc.net/nvidia/apis/nvidia-infra-controller-rest-api.md) · [All operations](https://skmtc.net/nvidia/apis/nvidia-infra-controller-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nvidia/nvidia-infra-controller-rest-api/versions/69e00804e732/schema)
