Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

OData with odata.track-changes - without fetching data

gurmukhd
Discoverer
0 Kudos

Hi

I am doing a RestAPI call to SAP Odata service passing the token "odata.track-changes" in the header. But, the issue is that in addition to initializing the delta token it is also sending the data.

We do not want it to send data, only Initialise the delta and later we will use that delta token to fetch data.

Can we do this? any help will be appreciated.

There are 3 options:

1. InitDelta Only without fetching data

2. InitDelta with Data

3. Full Load

I am after option 1, using OData RestAPI call

  • SAP Managed Tags:
3 REPLIES 3

AlexGourdet
Community Manager
Community Manager
0 Kudos

Thank you for visiting SAP Community to get answers to your questions.

As you're looking to get most out of your community membership, please consider include a profile picture to increase user engagement & additional resources to your reference that can really benefit you:

I hope you find this advice useful, and we're happy to have you as part of SAP Community!

All the best,

Alex

  • SAP Managed Tags:

evanireland
Advisor
Advisor
0 Kudos

Since the initial deltaLink is part of the payload, you might experience difficulty getting it without the initial data.

Perhaps including $top=1 in the initial query will help, but some servers don't like serving delta responses when $top is used. Still it's worth a try.

Failing that, build a proxy server which can drop the initial response and just return the deltaLink. This will help if the proxy server is "closer" to the real backend server (network-wise) and will avoid sending the large initial response over (possibly) slow network to the client.

  • SAP Managed Tags:

gurmukhd
Discoverer
0 Kudos

Thanks, @Evan Ireland

I tried with both skip and top=0 and 1, it does not set delta token if I use top or skip.

At the moment, I am able to remove data from the delta when making a call to the OData using python pop, but the issue is that with 1 billion records on that particular extractor, it will generate a load on the SAP server, even if I drop that data and only take just the delta.

I am trying to replicate the behavior BW Hana provides, where we tick a check box and it lets SAP system know, that just do Init and do not pull data.

I am looking for that magic that "Tickbox" does at the backend.

  • SAP Managed Tags: