Page parameter on usage

37 views
Skip to first unread message

Jan Joris De Dobbeleer

unread,
Sep 24, 2013, 5:23:57 AM9/24/13
to mobile-vikin...@googlegroups.com
I'm currently writing a usage overview page and whatever I try, I can't seem to get more than 1 page of information.

This is my querystring: usage.json?msisdn=cellphonenumber&from_date=2013-09-17T11:15:38&page_size=50&until_date=2013-09-24T11:15:38&page=1
which returns a nice JSON containing all the information starting form the 17th (Also, any value higher than 50 for page_size does not work, is that correct?)

But when requesting the second page (usage.json?msisdn=cellphonenumber&from_date=2013-09-17T11:15:38&page_size=50&until_date=2013-09-24T11:15:38&page=2) I get an empty array.

What am I missing here?

Niels Van Och

unread,
Sep 25, 2013, 7:49:08 AM9/25/13
to mobile-vikin...@googlegroups.com
Hi,

unfortunately, the page parameter was broken. You could pass it, but it was not working correctly, and as you said did not return any results for pages beyond the first.

Fortunately, we've just updated the usage code, allowing us to quickly patch this as well. For now, the page and page_size parameters are completely ignored, and you will always simply get all results of your query. If this should prove to be too much load for the system, we might have to revert to a paged solution (but one that actually works of course).

Let us know if you have any further questions!

Niels

Jan Joris De Dobbeleer

unread,
Sep 25, 2013, 8:15:39 AM9/25/13
to mobile-vikin...@googlegroups.com
Hey, that might actually work :-)
For now I only allow to return one day queries so I'll have to adjust and see what would be acceptable.

Thanks!

Vriendelijke groet

Jan Joris De Dobbeleer



--
You received this message because you are subscribed to a topic in the Google Groups "Mobile Vikings API users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobile-vikings-api-users/f3pYxRiQTYc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mobile-vikings-api...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Niels Van Och

unread,
Oct 2, 2013, 9:53:07 AM10/2/13
to mobile-vikin...@googlegroups.com
Hi,

unfortunately there was an unexpected side-effect to this change: since we disabled the paging, we were getting a lot more requests on the usage-call. The problem is as follows: an app requests the first page of a numbers usage and gets some results. It will then get the second page, and if results keep coming, it will keep requesting more pages. In the old scenario it would stop at the second page (because the paging was broken), but now that we ignore pages, it would just keep getting the same results, and therefore keep requesting further pages - not realising it was not actually doing any paging.

So we've reinstated the paging, but actually made it work. So you can now request your results with a page-parameter and a pagesize-parameter (they default to 1 and 100 respectively).

Hopefully this will fix the load issues.

Niels
To unsubscribe from this group and all its topics, send an email to mobile-vikings-api-users+unsub...@googlegroups.com.

Jan Joris De Dobbeleer

unread,
Oct 16, 2013, 7:42:48 AM10/16/13
to mobile-vikin...@googlegroups.com
Fixed everything.
Is the pagination on sim_info also working?
It would take a long time user to figure out if this works or not, so I'd thought I just go out and ask :-)
Reply all
Reply to author
Forward
0 new messages