TipOfTheDay – Easy Track changes in dataverse table via dataverse API

This post has been republished via RSS; it originally appeared at: New blog articles in Microsoft Tech Community.

Note: I am using PostMan in my example. 

1. First  - use "GET" http request  to get details of dataverse table "Accounts": 

 

 

{{webapiurl}}/accounts?$select=name,accountnumber,telephone1,websiteurl

 

 

{{webapiurl}} - variable from the postman, contains a link to your environment API.


Accounts table data retrieved: (image 1)

ValerasNarbutas_0-1633418328122.png2. Now add a new header in postman call:

 

"Prefer odata.track-changes"

 

 http request call will return additional information:
deltalink with deltatoken in body area (image 2)

ValerasNarbutas_0-1633418806793.png

 

3. Use delta token in as GET request (image 3 )

ValerasNarbutas_1-1633418877623.pngWere are no changes that happen last time we did request to accounts table, this is why under "value" it shows empty array
If I do changes like: add new details, edit and delete in accounts  table I would get result: (image 4)

ValerasNarbutas_2-1633419038732.png

 

Now "value" contain 3 additional results for new, edit, and delete records.


Such updates checking method would be very useful when implementing solutions to synchronize data with external systems using Logic Apps or Power Automate or any other tool or approach you are most comfortable with.

Hope this is useful :) have a great day

#dataverse #dataverseAPI #tip #postman #tipoftheday

REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

This site uses Akismet to reduce spam. Learn how your comment data is processed.