0

Can anyone explain why is it that when I make a REST call to retrieve items from a custom list, sometimes the items array is grouped under "d/results" path and sometimes "value" path. The results are coming from the same custom results, but I am not able to put finger on what could be causing different behaviors. Any clarifications will be appreciated.

2
  • Can you give more context?
    – Akhoy
    Commented Jun 15, 2016 at 13:56
  • No true.. I use odata=nometadata in one filter query, still get d.results
    – MWAN001
    Commented Jan 27, 2022 at 14:41

1 Answer 1

5

I think I got it. The ACCEPT header parameter "odata = verbose" makes all the difference. Using it returns the "d/results" path. Not using it returns "value" path. I understand that there is no need to add it any more with new specs.

Further details here:
https://www.microsoft.com/en-us/microsoft-365/blog/2014/08/13/json-light-support-rest-sharepoint-api-released/

Edit: Also I noticed that if the call is made in SP 2010 style (_vti_bin/ListData.svc), then the result will be returned as "d/results" path regardless or not we use the "odata=verbose" paramater. I guess the "value" path is returned only when making the 2013 style calls (_api/web) and not using the verbose option or not using odata at all.

2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.