Function: pollEvents()
ts
function pollEvents(
client,
parameters,
options?
): Promise<{
[key: string]: unknown;
data?: object[];
links?: {
[key: string]: unknown;
next?: string | null;
prev?: string | null;
self?: string | null;
};
meta?: {
[key: string]: unknown;
next?: string;
page_size?: number;
};
}>;Defined in: src/admin/api/events.ts:65
Returns a paginated list of audit logs events for an organization. Use this endpoint if you want to retrieve events in a simple, paginated manner with time-based filtering.
If you need more advanced filtering, refer to the /events endpoint.
Scopes
Authorization scopes required: read:events:admin
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { cursor?: string; from?: string; limit?: number; orgId: string; sortOrder?: "desc" | string & object | "asc"; to?: string; } | - |
parameters.cursor? | string | Sets the starting point for the page of results to return. Can be used when last page is reached to poll for new events. The sort order is maintained in the cursor across requests. |
parameters.from? | string | The earliest date and time of the event represented as a UNIX epoch time in milliseconds. |
parameters.limit? | number | The maximum number of events to return per page. |
parameters.orgId? | string | Your organization has a unique ID. Find this ID in your Atlassian Administration URL or when you create your API key. |
parameters.sortOrder? | "desc" | string & object | "asc" | The order used to sort events by processing time. Defaults to ascending. |
parameters.to? | string | The latest date and time of the event represented as a UNIX epoch time in milliseconds. |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; data?: object[]; links?: { [key: string]: unknown; next?: string | null; prev?: string | null; self?: string | null; }; meta?: { [key: string]: unknown; next?: string; page_size?: number; }; }>