ITRS named a Visionary in the 2025 Gartner® Magic Quadrant™ for Digital Experience Monitoring.

  1. Support
  2. Knowledge base
  3. Uptrends' API
  4. API fields
  5. SelectedPeriod API field

SelectedPeriod API field

SelectedPeriod

The SelectedPeriod field lets you select a time range to filter API data. Instead of manually entering start and end dates, you can select options like Last7Days, CurrentMonth, PreviousQuarter, and others to easily determine what time period your data or report should cover.

Use cases

Use the SelectedPeriod field to:

  • Filter monitoring data without calculating exact dates.
  • Create scheduled reports that automatically cover relative time periods. For example, last month always shows the previous month’s data.
  • Retrieve data for common time periods like the current quarter or last 24 hours.

Available options

The following period options are available:

Current periods

These options cover the current, incomplete time period from the start of the period until now:

  • CurrentDay
  • CurrentWeek
  • CurrentMonth
  • CurrentQuarter
  • CurrentYear

Previous periods

These options cover the most recently completed full time period:

  • PreviousDay
  • PreviousWeek
  • PreviousMonth
  • PreviousQuarter
  • PreviousYear

Last X periods

These options cover a specific number of complete time periods, counting backwards from now. The current incomplete period is not included by default.

By hours:

  • Last2Hours
  • Last6Hours
  • Last12Hours
  • Last24Hours
  • Last48Hours

By days:

  • Last7Days
  • Last30Days
  • Last60Days
  • Last90Days
  • Last365Days

By months:

  • Last3Months
  • Last6Months
  • Last12Months
  • Last24Months

When you choose time ranges like last hours, last days, or last months, you can include the current period to make sure the report also covers the ongoing period.

For example, if you select Last2Hours, enabling Include current hour ensures that the data from the current hour is also included to get the most up-to-date information in your report.

By using the Uptrends website, you consent to the use of cookies in accordance with our Cookie Policy.