cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

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

0 Likes
View Entire Topic
ajmaradiaga
Developer Advocate
Developer Advocate

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'