NHI Policies

Retrieve an NHI policy

Changed on

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.

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

Path parameters

policy_namestring required

The name of the NHI policy, for example long_lived_secret.

Response

The policy.

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