Tuesday, October 5, 2021

TipOfTheDay - Easy Track changes in dataverse table via dataverse API

Note: I am using PostMan in my example. 

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






{{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)



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)



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

Posted at https://sl.advdat.com/3lb5ith