Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
alexeyrv
Contributor II
Contributor II

With REST how to set correct Total Field Path from XML ?

Hello!

I use REST connector with custom pagination because I can't use Offset way.

I did it about 1.5 years ago but now it doesn't works.

For Custom pagination it works but I can't undersant how get total records in Custom pagination.

Also I didn't find solution for Offset way.

I saw different examples how work with other paginations but not with Offset.

Both ways Custom and Offset are welome if it possible to get Total from REST request and use it to load data.

How to get from XML correct Total value and then use it in Total Field Path?

Thanks in advance.

Example is below.

Curl request: http://api.worldbank.org/v2/countries?page=1&per_page=2

For this case values for Total Field Path "root/total" or "total" don't work.

Result:

<?xml version="1.0" encoding="utf-8" ?>

<wb:countries page="1" pages="152" per_page="2" total="304">

<wb:country id="ABW">
<wb:iso2Code>
AW

</wb:iso2Code>

<wb:name>

Aruba

</wb:name>

<wb:region id="LCN" iso2code="ZJ">

Latin America & Caribbean

</wb:region>

<wb:adminregion id="" iso2code="" />

<wb:incomeLevel id="HIC" iso2code="XD">

High income

</wb:incomeLevel>

<wb:lendingType id="LNX" iso2code="XX">

Not classified

</wb:lendingType>

<wb:capitalCity>

Oranjestad

</wb:capitalCity>

<wb:longitude>

-70.0167

</wb:longitude>

<wb:latitude>

12.5167

</wb:latitude>
</wb:country>

<wb:country id="AFG">

...

</wb:country>
</wb:countries>
3 Replies
lucienorrin
Creator
Creator

Did you ever figure this out?

I get this error:

Error: QVX_UNEXPECTED_END_OF_DATA: Field containing total pages in the current source was not found. Please provide path to the correct field in the Pagination parameter 'Total field path.'

I don't have a pagination parameter "Total field path' on the REST connector though.

tal-cloudinary
Contributor II
Contributor II

I also have this issue - anyone could help address this?

melissa4
Contributor II
Contributor II

I also have this issue!