NHI Policies

List NHI policies

Changed on

List the NHI policies and the incident mode the workspace chose for each one.

The incident mode sets what the breaches of a policy produce:

  • hidden: the breaches are not shown.
  • tag_only: the breaches show as a tag on the identity. This is the default.
  • creates_incidents: the breaches also create secret incidents, once NHI incident promotion is active for the workspace.

A policy with is_incident_mode_fixed: true always uses the incident mode shown, and its incident mode cannot be changed.

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.

get/v1/nhi/policies

Request

  • Base URL
    https://api.gitguardian.com
  • URL
    https://api.gitguardian.com/v1/nhi/policies
  • Auth
    HTTP bearer

Response

The NHI policies, sorted by name.

namestring 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_fixedboolean required

Whether the incident mode of this policy is fixed and cannot be changed.

Example response

[
  {
    "name": "long_lived_secret"
  }
]

Changes