RDNG Publish API and unrelaiable behaviour when accessing modules
When using RDNG Publish API I figured out really weird behaviour when I am accessing modules in a specific project. For some projects all modules are returned and for some only small subset.
Below two examples:
result:
This is working fine - 4 modules in project and 4 modules returned using publishing API
result:
Second example is not working at all, 49 modules in the project and only 3 returned.
Can anybody explain how to make it more reliable and how to get all the results ?
showing 5 of 6
show 1 more comments
|
Accepted answer
Hi,
A reportable REST service may support returning data across multiple pages. The REST service
determines the size of each page based on its internal implementation capabilities and performance
issues. When there are additional pages, attributes are added to the root XML element describing
how to get the next page of data.
If the REST service determines that the data requested by a URL needs to be broken up into multiple pages, it will set the attributes of the root XML element (in this case href is present in your second example).
Any element with a sequence of zero or more child elements in the document may be split into multiple pages. Callers check the root element for the paging attributes and continue to HTTP GET the next page
until there is no href attribute returned. The content returned across all pages is defined to
be the union of all elements in each page.
In your case, complete response total count += rrm:totalCount(each page)
Note that there is no requirement about the number of pages, the number of records per page, data
volume of each page, or the relative size of one page compared to the other. Whether or not data
is returned in multiple pages and what logic determine what is on each page is completely up to
the implementation of the REST service.
Bartosz Chrabski selected this answer as the correct answer
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.
Comments
I doubt that anybody can help you here unless someone happens to have seen the exact same issue before. How do we know that there are indeed 49 modules in the second project? I suggest you contact Support if the issue really bugs you.
We know exact number from RDNG UI
Hello Bartosz
What do you get when you request the URI that is in the href? https://server2:9443/rm/publish/modules?scoped=true&size=100&projectURI=_cnAsUCsgEeWKUsdTFNz7Cg&token=_H68S8ANvEeexwe7ftoMOEw&page=1%22
do you get 46 which is 49-3?
Rosa, I need to find this example on one of my VMs. As you see publish date is March 7th 2017 (a year ago). I can say my focused change a bit since than :).
Bartosz
There is no need to go through that trouble for me. If it comes up again, then we can revisit.
Thx!