- listEntries - List audit log entries
Get a list of all audit log entries. The query parameters let you restrict the results that return by date ranges, resource specifiers, or a full-text search query.
LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read About the resource specifier syntax.
import { LaunchDarkly } from "@launchdarkly/mcp-server";
const launchDarkly = new LaunchDarkly({
apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
});
async function run() {
const result = await launchDarkly.auditLog.listEntries({});
console.log(result);
}
run();The standalone function version of this method:
import { LaunchDarklyCore } from "@launchdarkly/mcp-server/core.js";
import { auditLogListEntries } from "@launchdarkly/mcp-server/funcs/auditLogListEntries.js";
// Use `LaunchDarklyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const launchDarkly = new LaunchDarklyCore({
apiKey: process.env["LAUNCHDARKLY_API_KEY"] ?? "",
});
async function run() {
const res = await auditLogListEntries(launchDarkly, {});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("auditLogListEntries failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.GetAuditLogEntriesRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<components.AuditLogEntryListingRepCollection>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.InvalidRequestErrorRep | 400 | application/json |
| errors.UnauthorizedErrorRep | 401 | application/json |
| errors.ForbiddenErrorRep | 403 | application/json |
| errors.RateLimitedErrorRep | 429 | application/json |
| errors.APIError | 4XX, 5XX | */* |