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.

  • Can you give more context? – Akhoy Jun 15 '16 at 13:56
4

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://blogs.office.com/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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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