users API page_views per_page limit?

Jump to solution
Community Novice

Working with the users API and the page_views call.  I have used a page_views=2000 or some such number on other APIs, but this doesn't seem to work with the /users/xxxx/page_views?per_page=2000

I know I can use the pagination, but...   wondering why the per_page doesn't seem to work.


Labels (1)
1 Solution
Community Champion

per_page does work, but it most cases there's an upper limit of 100.

You can check the Link response header and see exactly what the limit is. For that particular call, it is 100.

When I call this

I get headers like this:


The cure to pagination is not to make the per_page excessively high -- that will fail at some point. It's to look at the link response header and get the next link. 

View solution in original post