get last entries api