Added sorting, offset, limits, and time-based pagination to the API