code: def _fetch_activities(self):
          
          activities = []
          # Prepare url of the first page
          url = '{0}/organizations/{1}/activity/'.format(
              self.url, self.organization)
          while url:
              # Fetch one page of activities
              try:
                  log.debug('Fetching activity data: {0}'.format(url))
                  response = requests.get(url, headers=self.headers)
                  if not response.ok:
                      log.error(response.text)
                      raise ReportError('Failed to fetch Sentry activities.')
                  data = response.json()
                  log.data("Response headers:\n{0}".format(
                      pretty(response.headers)))
                  log.debug("Fetched {0}.".format(listed(len(data), 'activity')))
                  log.data(pretty(data))
                  for activity in [Activity(item) for item in data]:
                      # We've reached the last page, older records not relevant
                      if activity.created < self.stats.options.since.date:
                          return activities
                      # Store only relevant activites (before until date)
                      if activity.created < self.stats.options.until.date:
                          log.details("Activity: {0}".format(activity))
                          activities.append(activity)
              except requests.RequestException as error:
                  log.debug(error)
                  raise ReportError(
                      'Failed to fetch Sentry activities from {0}'.format(url))
              # Check for possible next page
              try:
                  url = NEXT_PAGE.search(response.headers['Link']).groups()[0]
              except AttributeError:
                  url = None
          return activities
docs: Get organization activity, handle pagination