Announcements
Hi All, I am new to dynamics api, please help with the following"
I want to retrieve all dynamics records data in json format within a view in an entity. I obtained the viewId from the URL in browser, assume it's viewId-bla-bla
I used "https://[rootblabla]/api/data/v9.0?savedquery=viewId-bla-bla" on a URL in browser, but the json reponse rendered seems like metdata, i.e, not the records information in that view.
{
"@odata.context": "https://[root]/api/data/v9.0/$metadata",
"value": [
{"name": "accountleadscollection","kind": "EntitySet","url": "accountleadscollection"},
{"name": "accounts","kind": "EntitySet","url": "accounts"},
{"name": "aciviewmappers","kind": "EntitySet","url": "aciviewmappers"},
......
]
}
What should I use as the retrieve URL, so that I can have the returned response containing the records within that view please?
Thank you very much.
*This post is locked for comments
Any time! Here to help :-)
Thank you Michel. I used https://[root]/api/data/v9.0/[entityname]?savedQuery=[viewId] and it worked.
Hello,
I will also go with Michel van den Brink answer.
Hope it will work for you!
Hello suehh,
The URL of the API call isn't quite correct. You are missing the entity name and the Q in 'savedQuery' needs to be a capital (crazy detail)
Try this URL:
https://organizationname.crm.dynamics.com/api/data/v9.0/accounts?savedQuery=00000000-0000-0000-00AA-000010001002
Make sure to replace the organization name, entity name and the guid of the view with your own :-)
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156