Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to go through a series of records to be able to fetch all the data.
Today I do this by looping through all records, but since I received the user guide I see that this could be solved through pagination.
However I fail when I try to implement this.
The URL is setup like this:
http://aaa.bbb.local:8020/api/platform/person/v1/persons/?_offset=0
The parameter is "?_offset"
The call retrieves 1000 rows.
To get 1000->2000 I enter
http://aaa.bbb.local:8020/api/platform/person/v1/persons/?_offset=1000
If I enter this into chrome Rest Api Client I get the following:
- "page": [1000]
0:
"id": "2335AA2-212-2AA"
"civicNo": "1234567"
"firstName": "Carl"
"lastName": "Smith"
"modifiedTime": 1428919220291
}
1:
{
"id": "2325FG2-222-313"
"civicNo": "1234321"
"firstName": "Marco"
"lastName": "Polo"
"modifiedTime": 1429004337935
}
"queryTotal": 3502
"pageSize": 1000
}
page: [1000] means that there are 1000 posts fetched
queryTotal means that there are 3502 rows in total
pageSize is unclear. Both page and pageSize are always set to 1000.
If I enter the URL in QLIK I get:
RestConnectorMasterTable:
SQL SELECT
"id",
"civicNo",
"firstName",
"lastName",
"modifiedTime"
FROM JSON (wrap off) "page";
[page]:
LOAD
[id],
[civicNo],
[firstName],
[lastName],
[modifiedTime]
RESIDENT RestConnectorMasterTable;
DROP TABLE RestConnectorMasterTable;
So my question is:
How do I set up the pagination to be able to fetch the following 3502 rows, which means that it should iterate 4 times to fetch all?
Kind regards, Jonathan