cancel
Showing results for 
Search instead for 
Did you mean: 

CPI: MessageProcessingLogs API Query Issue

babruvahana
Contributor
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

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'

S0023888701
Explorer
0 Kudos

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.

AdityaMani
Participant
0 Kudos

Hi Pavan,

Try to get data in batches -looping process call.

Regards,

Aditya