---
title: "Retrieve an NHI policy"
method: GET
path: "/v1/nhi/policies/{policy_name}"
tags: ["NHI Policies"]
---

# Retrieve an NHI policy

`GET /v1/nhi/policies/{policy_name}`

## Request

- Base URL: `https://api.gitguardian.com`
- URL: `https://api.gitguardian.com/v1/nhi/policies/{policy_name}`
- Auth: HTTP bearer

Retrieve one NHI policy and its incident mode.

The workspace must have full NHI governance activation.
The API token must have the Manager access level or above, or be a service account token.

## Path parameters

- `policy_name` string, required

## Response `200`

The policy.

- object
  - `name` string, required
  - `incident_mode` 'hidden' | 'tag_only' | 'creates_incidents', required: - `hidden`: the breaches are not shown. - `tag_only`: the breaches show as a tag on the identity. - `creates_incidents`: the breaches also create secret incidents.
  - `is_incident_mode_fixed` boolean, required: Whether the incident mode of this policy is fixed and cannot be changed.

## Other responses

- `401`: Invalid API key
- `403`: Permission denied
- `404`: Policy not found
- `503`: API under maintenance

## Changes

- **2026-10-27** `13e7ff1b964d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gitguardian/apis/gitguardian-api/changes/v1/nhi/policies/:policy_name/get.md)

---

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