# of records for API request

3 views
Skip to first unread message

Raghvendra Saboo

unread,
Jul 2, 2011, 2:23:42 PM7/2/11
to power...@googlegroups.com
Manish, Ajay,
Is there a limit on the # of records sent by Ushahidi for a GET request to Ushahidi api ?

The Ushahidi Android app & Manish's J2ME app is also giving only 20 records.

Any idea how to get all the records ?  

Ajay Kumar

unread,
Jul 2, 2011, 2:25:16 PM7/2/11
to power...@googlegroups.com
On 02-07-2011 23:53, Raghvendra Saboo wrote:
> Any idea how to get all the records ?
All records at once? There is a limit yes.
But if I allow all records at once, that'd add load on the server. Isnt
there a way to loop and get subsequent records in a batch of 20 each?

--
Thanks& Regards,

Ajay Kumar
http://aju.bz/me

Raghvendra Saboo

unread,
Jul 2, 2011, 2:38:26 PM7/2/11
to power...@googlegroups.com
The limit can be set by app (default) & can be modified by the user. I have kept this value as 20. Yes, there can be pagination. But how ? I don't see anything for that in api docs http://wiki.ushahidi.com/doku.php?id=ushahidi_api

For now, I'd want all records. I can impose a max limit (say 100 ) in the app.
The map view makes sense only when there are good # of records.


--
Discussion list for http://PowerCuts.IN



--
-Raghu

selectFilter.png
newfilter.png

Ajay Kumar

unread,
Jul 3, 2011, 2:02:42 AM7/3/11
to power...@googlegroups.com


On 3 July 2011 00:08, Raghvendra Saboo <raghvend...@gmail.com> wrote:
The limit can be set by app (default) & can be modified by the user. I have kept this value as 20. Yes, there can be pagination. But how ? I don't see anything for that in api docs http://wiki.ushahidi.com/doku.php?id=ushahidi_api
 
I wil be engaged with family stuff so might be able to respond to emails much. If I were you, I'd get online on the Ushahidi developer chat on Skype and try to ask around. They are slow, and due to time zone differences, if you ask specific questions you will get replies :)
 
If you can share you Skype ID i can add you to the channel.


--
Best Regards,

Ajay Kumar

http://aju.bz/me

Raghvendra Saboo

unread,
Jul 3, 2011, 11:01:36 PM7/3/11
to power...@googlegroups.com
Bhai, I'll ask them once I know we have not set this limit (purposefully or accidentally).
"But if I allow all records at once, that'd add load on the server." Have we ??

--
Discussion list for http://PowerCuts.IN

Ajay Kumar

unread,
Jul 4, 2011, 1:58:55 PM7/4/11
to power...@googlegroups.com
On 04-07-2011 08:31, Raghvendra Saboo wrote:
> Bhai, I'll ask them once I know we have not set this limit
> (purposefully or accidentally).
This limit is Ushahidi default. I can block all API requests. However we
are running Ushahidi default settings so far. And I am not available for
two weeks.

--
Thanks& Regards,

Ajay Kumar
http://aju.bz/me

Ajay Kumar

unread,
Jul 4, 2011, 2:04:44 PM7/4/11
to power...@googlegroups.com


On 4 July 2011 23:28, Ajay Kumar <ma...@ajuonline.net> wrote:
Bhai, I'll ask them once I know we have not set this limit (purposefully or accidentally).

So any limit, is set by default. Ushahidi settings. 

--
Best Regards,

Ajay Kumar

http://aju.bz/me

Raghvendra Saboo

unread,
Jul 4, 2011, 11:31:31 PM7/4/11
to power...@googlegroups.com
Thanks.



Ajay Kumar

http://aju.bz/me

--
Discussion list for http://PowerCuts.IN



--
-Raghu

Ajay Kumar

unread,
Jul 21, 2011, 1:54:18 AM7/21/11
to power...@googlegroups.com


On 5 July 2011 09:01, Raghvendra Saboo <raghvend...@gmail.com> wrote:
Thanks.

I noticed there was a way to increase this limit in Admin-Settings. I set it to 500 per day per API call.

Can you try modifying your app to pull records from the TEST site and confirm if it serves your purpose?

Raghvendra Saboo

unread,
Jul 21, 2011, 3:57:29 AM7/21/11
to power...@googlegroups.com
Thanks Ajay.
It did get more than 20 records. I sent param for 500 but I am getting only 68. Need to check my code too if I had some unintended filter.

Btw, just be clear, 500 per day per API call, means unlimited API calls per day which would return max. 500 records, right ?
Can't limit the # of API calls per days, as many users would then be starved.

In retrospect, I think you can set the max records returned to 30. More than that isn't scaling well, at least on my device. No one would see those many in any case. There is website afterall !

i'll keep using test.powercuts.in even a few days after production, so that we can easily filter the playing around by enthusiatic folks. I see that we can bulk download & upload data from test to prod. instance, which we would after initial excitement dies.

The app is few days away from being ready. This time real few days :-)

--
Discussion list for http://PowerCuts.IN
device-2011-07-21-131715.png
Reply all
Reply to author
Forward
0 new messages