/nhi/api/v1/.
Permissions
Inside TRUSTIVAN, the Owner, Admin, Member and Viewer roles can all read the three screens, and only Owners and Admins can ingest. See Limitations.
Authentication for ingestion
NHI Security has no API keys. The ingestion routes are authenticated the same way the console is: by a signed-in session. Like every request that changes something, an ingestion request must carry three things:- the session cookie of a signed-in user who holds the ingest permission
- an
Origin(orReferer) header naming an origin your deployment allows - the session’s anti-forgery token in the
x-csrf-tokenheader
403. The runtime bearer credential described in Runtime gate does not reach these routes. In practice this makes ingestion an integration to design around a person’s session, not a header to set in a scheduler. See Limitations.
Activity
The Activity screen
Activity lists observed actions, newest first, fromGET /api/v1/activity. Three tiles sit above the list: Events collected, Unattributed and Failed actions.
Read the state of the screen before you read a count:
The distinction comes from
GET /api/v1/activity/summary, whose hasCollected field is true once any ingestion run has finished succeeded or partial. It is taken from the ingestion runs, never from the number of events.
You can filter by an action prefix or an exact actor identifier, attribution, outcome, kind and provider. The API also accepts
identityId, credentialId, resourceId, from and until, and sorts by occurredAt or recordedAt.
Choosing a row opens the event (GET /api/v1/activity/{eventId}): who NHI Security believes acted and how that was matched, what was done, the provenance and the record’s own identifier, when it happened and when it was stored, the source address, region and user agent, and the stored payload. Activity is never edited or deleted. Only the attribution of an existing record can improve, when the same record is sent again after discovery has caught up.
How an event is attributed
A record names its actor the way the provider did, inactorHint. NHI Security looks for that exact string among the provider identifiers of the identities it has discovered. There is no fuzzy matching and no matching by name.
credentialHint, resourceHint and toolHint are matched the same way against credentials, resources and tools, and are attached when exactly one matches, even if the actor did not resolve. Every hint is kept as sent, whether or not it matched.
Send activity
There is no field for an identity, credential, resource or organization ID. A caller cannot attach a record to something by naming it.
Limits. At most 200 records per request; a larger batch is refused whole with
422. Each string is at most 2,048 characters (sourceIp 64). A body that fails validation, including one with a field the route does not define, is refused whole with 400.
Rejections are per record. A record that passes validation can still be refused, and the rest of the batch is stored:
Nothing is repaired. A bad time is dropped, never moved to now.
Deduplication. A record’s identity is its provider, scope and
sourceEventId. Without a sourceEventId, it is the provider, scope, occurredAt, actorHint, rawAction, resourceHint and outcome together, so two distinct actions that agree on all of those collapse into one. Sending a record again does not create a second event; it is counted in duplicatesIgnored.
What a submission records. The response carries run, the ingestion run this request created, and rejections, a list of reason, explanation and count. The run has source (ingestion_api), status (succeeded, or partial when any record was rejected), eventsRead, eventsStored, duplicatesIgnored, eventsRejected, eventsResolved and eventsUnresolved. The audit trail records one activity.ingested entry per request with those counts, and one activity.rejected entry when anything was refused.
GET /api/v1/activity/ingestions lists every ingestion run, newest first, with activity:read. The console has no screen for it.
Ingesting does not run an evaluation. Findings from the activity policies appear after the next evaluation: Policies → Run evaluation, or the evaluation that follows a synchronization.
Exposures
An exposure is a report that credential material was found where it should not be: a repository, a build log, a container image. It is not a property of a credential, because most reports cannot be matched to one.What an exposure contains
An exposure never contains the material: not the value and not a prefix of it. No field exists that could hold one. A report whose fields carry something shaped like a secret is rejected at ingestion. That check recognises common published formats (a PEM header, GitHub, GitLab, Slack and Vault token prefixes,
sk- keys, JSON Web Tokens); it is not a general secret detector, so keep values out of what you send.
status is an observation from the source, not a triage decision. unknown is not remediated: a scanner that lost access to a repository has not removed a secret. An exposure counts as live until its status is remediated. Triage, acceptance and history belong to the credential_exposed finding an evaluation raises for each live exposure, described in Findings and risk.
How an exposure is matched to a credential
A report may carry acredentialHint: the identifier the source published, such as an access key ID. NHI Security looks for a credential in your inventory with exactly that provider identifier. One match gives resolved, with the credential and its identity attached. More than one gives ambiguous, and none, or no hint, gives unresolved. An unmatched exposure is kept and shown, never attached on a guess. When the same report is sent again after discovery has found the credential, the existing exposure becomes matched.
The Exposures screen
Secrets → Exposures lists exposures by when the source last confirmed them, fromGET /api/v1/exposures. It opens filtered to live exposures, shown as the Still live filter; remove that filter, or choose a status, to see the ones a source reported removed. Three tiles count Still live, Unidentified (live and not matched to a credential) and In a repository.
GET /api/v1/exposures/summary returns live, byLocation, byStatus, unattributed, hasCollected and lastCollectedAt. Here hasCollected is true as soon as one exposure record exists.
The columns are Status, What was found, Where, Credential, Confidence, Source and Last confirmed. You can filter by a path prefix or secret type, location, status and whether a credential was matched. The API also accepts credentialId, provider and liveOnly=true.
An exposure’s page (GET /api/v1/exposures/{exposureId}) shows what to do, where the material was found, which credential it was matched to and how, what the source says, and the open findings against it. An exposure in a source repository carries a standing instruction: treat the credential as compromised and revoke it at the provider before you remove the file, because history keeps the value. A matched credential’s own page lists its exposures too; see Credentials and rotation.
Send exposure reports
secretTypeHint and credentialHint are optional; every other field is required. provider, location, status and confidence take the values listed above. sourceRef is the source’s own identifier for the alert.
- Limits. At most 200 reports per request, refused whole with
422beyond that. - Rejections. A report is dropped when a time is unreadable, more than 5 minutes in the future or more than 10 years old, when
lastSeenAtis beforefirstSeenAt, or when a field is shaped like credential material. The response gives only arejectedcount, with no reason per report. - Deduplication. An exposure’s identity is its
provider,locationandsourceRef. Sending the same alert again updates what the source currently reports (detail, status, confidence, last seen) and the match.firstSeenAtanddetectedAtdo not move. - Removal time. You cannot send one. When a report’s status is
remediated, NHI Security records the time the report arrived. - Response.
stored,updated,resolved,unresolvedandrejected.
exposure.observed entry to the audit trail with its counts. As with activity, the credential_exposed finding appears after the next evaluation, not at ingestion.
Synchronizations
Integrations → Synchronizations lists every connector synchronization in your organization, newest first, fromGET /api/v1/sync-runs. It is NHI Security’s record of its own collection. Activity ingestion runs are not shown here.
Filter by outcome on the screen; the API also accepts
connectorId. Scope is the column to check before you trust Gone: only a succeeded run that read its whole scope may conclude that something has disappeared. What each outcome means, how retries work and how disappearance is decided are in Discovery and synchronization.
What these screens do not do
- No connector fills Activity or Exposures. Without a pipeline of your own, both stay empty and say so.
- The console has no screen to send records and none to list ingestion runs.
- An exposure cannot be closed, dismissed or edited by hand. Its status changes only when the source reports again.
- Nothing here acts at a provider. An exposure tells you to revoke a credential; it does not revoke it.
Next steps
Findings and risk
The activity and exposure policies, and how their findings are triaged.
Credentials and rotation
What to do with a credential an exposure names.
Discovery and synchronization
Run outcomes, retries and how NHI Security decides something is gone.
Limitations
What is not collected, and what session-only authentication means for a pipeline.