jira.js
    Preparing search index...

    Function pollEvents

    • 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.

      Authorization scopes required: read:events:admin

      Parameters

      • client: Client
      • parameters: {
            cursor?: string;
            from?: string;
            limit?: number;
            orgId: string;
            sortOrder?: "desc" | string & {} | "asc";
            to?: string;
        }
        • Optionalcursor?: 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.

        • Optionalfrom?: string

          The earliest date and time of the event represented as a UNIX epoch time in milliseconds.

        • Optionallimit?: number

          The maximum number of events to return per page.

        • orgId: string

          Your organization has a unique ID. Find this ID in your Atlassian Administration URL or when you create your API key.

        • OptionalsortOrder?: "desc" | string & {} | "asc"

          The order used to sort events by processing time. Defaults to ascending.

        • Optionalto?: string

          The latest date and time of the event represented as a UNIX epoch time in milliseconds.

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              data?: {
                  attributes: {
                      action: string;
                      actor: {
                          app?: {
                              attributes?: Record<(...), (...)>;
                              id: string;
                              type?: string;
                              [key: string]: unknown;
                          };
                          auth?: {
                              authType: | (...) & (...)
                              | "container-token"
                              | "api-token"
                              | "connect-token"
                              | "auth-token-for-2LO"
                              | "auth-token-for-3LO";
                              tokenId?: string;
                              tokenLabel?: string;
                              [key: string]: unknown;
                          };
                          email?: string;
                          id: string;
                          links?: { self: string
                          | null; [key: string]: unknown };
                          name?: string;
                          onBehalfOf?: {
                              email?: string;
                              id: string;
                              name?: string;
                              [key: string]: unknown;
                          };
                          [key: string]: unknown;
                      };
                      container?: {
                          attributes?: Record<(...), (...)>;
                          id: string;
                          links?:
                              | { alt?: ...; self?: ...; [key: ...]: ... }
                              | { alt: ...; [key: ...]: ... };
                          type?: string;
                          [key: string]: unknown;
                      }[];
                      context: {
                          attributes?: Record<string, any>;
                          id: string;
                          links?:
                              | {
                                  alt?: (...)
                                  | (...);
                                  self?: (...) | (...) | (...);
                                  [key: string]: unknown;
                              }
                              | { alt: string; [key: string]: unknown };
                          type?: string;
                          [key: string]: unknown;
                      }[];
                      location?: {
                          city?: string;
                          countryName?: string;
                          geo?: string;
                          ip?: string;
                          regionName?: string;
                          [key: string]: unknown;
                      };
                      processedAt: Date;
                      time: Date;
                      [key: string]: unknown;
                  };
                  id: string;
                  links: { self: string
                  | null; [key: string]: unknown };
                  message?: { content?: string; format?: string; [key: string]: unknown };
                  type: string & {} | "events";
                  [key: string]: unknown;
              }[];
              links?: {
                  next?: string
                  | null;
                  prev?: string | null;
                  self?: string | null;
                  [key: string]: unknown;
              };
              meta?: { next?: string; page_size?: number; [key: string]: unknown };
              [key: string]: unknown;
          },
      >