on 07-04-2022 2:10 PM
Hi Experts,
My requirement needs to fetch the CPI MessageProcessingLogs every 15 minutes.
The API fetching 1000 records in call. I used $skiptoken=1000 to fetch the next 1000 records.
But this is working inconsistently as the API doesn't give the next set of 1000 records every time.
I would like to know is there any way we can fetch all the records.
Any leads will be really helpful.
Regards,
Pavan
Hi babruvahana
The "__next" field contains the URL that your program should invoke next if you want to extract more records. That said, that URL specifies a "$skiptoken" as a query parameter and if we look at the API documentation (screenshot below), there is no such query param. The correct query param is "$skip". Can you please try your request specifying "$skip" instead of "$skiptoken".
Example request:
curl --location --request GET 'https://antonio-maradiaga-free-tier-aaq3l49g.it-cpi018.cfapps.eu10-003.hana.ondemand.com/api/v1/MessageProcessingLogs?$filter=LogStart ge datetime'\''2022-07-01T00:00:00'\''&$inlinecount=allpages&$skip=10' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImprdSI6Imh0'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Pawan,
Looks like there some config in adapter that you did not mentioned here since 1000 max page size.
Pls try below options:
1.Make use of server side pagination at odata adapter instead client side pagination which is currently you are using ( $skip).
2.Use lookup process call with standard property(you can check property name with trace which will have value true or false) to end looping process call.
Hope this will be helpful to you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pavan,
Try to get data in batches -looping process call.
Regards,
Aditya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.