[Engine-devel] java SDK question

Michael Pasternak mpastern at redhat.com
Sat Feb 2 17:48:52 UTC 2013


On 02/01/2013 03:17 PM, Moti Asayag wrote:
> On 02/01/2013 12:56 PM, navin p wrote:
>> Hi,
>>  When i do the api call for events from , i only get 100 events. Can
>> someone tell me how to get all the events ?
>>
> 
> There are 2 options:
> 1. Use the overloaded Event.list method and specify the amount of result
> you wish to get. In the next example you'll get 1000 entries.
> 
> Events events = api.getEvents();
> events.list("", false, "", 1000);
> 
> You can use this method to retrieve events by extents.
> 
> 2. Increase the value of the configuration value 'SearchResultsLimit' to
> the desired reasonable value.

There is a third option, you can use pagination via engine search interface,
just append to your query string "page N".

> 
>> List<Event> evlst=api.getEvents().list();
>> for(Event obj:evlst) {
>> System.out.println(obj.getDescription() + ":" +obj.getSeverity()
>> +":"+obj.getTime().toString()+":"+k.toString());
>> }
>>
>> Regards,
>> Navin
>>
>>
>> _______________________________________________
>> Engine-devel mailing list
>> Engine-devel at ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/engine-devel
>>
> 
> _______________________________________________
> Engine-devel mailing list
> Engine-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/engine-devel


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D



More information about the Devel mailing list