human-readable key name
a promise resolving to an object containing the log api key and secret
Creates a stateful, deduped consumer of tail() -- everything a caller
doing a live polling loop (e.g. an interactive follow-style view) needs
without reimplementing cookie-tracking or dedup itself.
log source(s) to tail
a stream object with a poll() method and the rateLimit of the latest answer
PingOne AIC's own tail-endpoint documentation is explicit that each
subsequent call's range "starts from the last returned log entry in
the previous result (inclusive)" -- the boundary event is
documented to repeat by design, and the endpoint returns no unique
event id at all to tell repeats apart with (confirmed live: unlike
fetch(), whose results do carry _id). A real live poll loop against
am-authentication also showed tail() redeliver a whole earlier
batch verbatim -- sometimes even within one poll's own result array,
not just across a cookie boundary -- so this dedupes broadly by event
content, not merely by skipping one known boundary event.
rateLimit of the stream is the state of the Log API limit as the latest answer reported it, and a poll that
the API rejects for the rate limit fails like tail() (code LOG_API_RATE_LIMITED) without losing the
position of the stream; the caller decides when to poll again.
Delete log api key
key id
a promise resolving to an object containing the log api key
Delete all log api keys
a promise resolving to an array of log api key objects
Fetch logs
log source(s) to tail
start timestamp
end timestamp
paged results cookie
transaction id
query filter
promise resolving to paged log event result; rateLimit holds the rate limit state that the answer reported (limit, remaining requests, reset time), if it carried the headers
The Log API throttles the requests of an environment, and the limit is shared by everything that reads its
logs. A request that the API rejects for that reason is sent once more after the end of the window, when the
answer says when that is (Retry-After or X-RateLimit-Reset). Otherwise, and when the second request is
rejected too, the call ends with a FrodoError that has the code LOG_API_RATE_LIMITED and, if the answer
carried the X-RateLimit-* headers, rateLimit.
Get default noise filter
array of default event types and loggers to be filtered out
Get log api key
key id
promise resolving to a LogApiKey objects
Get available log sources
promise resolving to an array of available log sources
Validate log api key and secret
log api key id
log api secret
a promise resolving to true if the key is valid, false otherwise
Resolve log level to an array of effective log levels
string or numeric log level: 'FATAL', 'ERROR', 'WARN', 'INFO', 'DEBUG', 'TRACE', 'ALL', 0, 1, 2, 3, 4
array of effective log levels
Search audit events by event name(s) and/or principal, across the full time range (auto-paginating), with client-side dedup by transaction id.
log source(s) to search, e.g. am-authentication
start timestamp
end timestamp
OptionaleventNames: string[]
optional event names to match (OR'd together server-side)
Optionalprincipal: string
optional principal substring to match against payload.userId (co)
OptionalmaxEvents: number
safety cap on total events fetched across pages
OptionaldedupeByTransactionId: boolean
collapse multiple events sharing a transaction id (e.g. a failed-then-successful retry) down to the last one seen; default true
OptionalrateLimitShare: number
the share of the requests per window that the Log API allows (as the API reports it) that the search may use, greater than 0 and at most 1; default 0.5. The rest is left to other readers of the logs of the environment, such as a running tail.
promise resolving to the matched (and optionally deduped) events
Tail logs
log source(s) to tail
paged results cookie
promise resolving to paged log event result; rateLimit holds the rate limit state that the answer reported (limit, remaining requests, reset time), if it carried the headers
The Log API throttles the requests of an environment, and the limit is shared by everything that reads its
logs. A request that the API rejects for that reason is not waited for here: it ends with a FrodoError that
has the code LOG_API_RATE_LIMITED and, if the answer carried the X-RateLimit-* headers, rateLimit, whose
resetAt is when the window resets. The caller that polls owns the waiting.
Create log api key