Pagination problem (current index page ignored) - REST API

Hi,

I'm using nuxeo (ver. 5.9.5) via its REST API, and I'm currently experiencing a problem I don't seem to be able to overcome.

The thing is, I'm requesting all the children under 'asset-library', with the following GET request:

http://localhost:8080/nuxeo/api/v1/path/asset-library/@children?orderBy=dc:title&pageSize=0&page=0

Among others, Nuxeo gives the following parameters back:

resultsCount = 143 currentPageIndex = 0 pageCount = 1 entries = Array with 100 elements.

The problem is: when trying to retrieve the second page, with the following URL: http://localhost:8080/nuxeo/api/v1/path/asset-library/@children?orderBy=dc:title&pageSize=0&page=1

The result is exactly the same as when using page=0. That is, I'm not able to retrieve any results from the second page on. I've also tried using the variable 'currentPageIndex', but the results are the same. Extrangely enough, when specifying pageSize=10&page=0, the reply from Nuxeo says “resultsCount = -2”.

Do you have any hint?

Thanks a lot.

0 votes

1 answers

1233 views

ANSWER



After some attempts, I've found an alternative way for getting the data I was looking for. Instead of the above mentioned URL, I've used the following one:

http://localhost:8080/nuxeo/api/v1/path/@search?fullText=Picture|Video&orderBy=dc:title&pageSize=100&currentPageIndex=1

This way does pagination work.

Thanks anyway!

0 votes