I'm working on a Java-Application that integrates with SharePoint. The different SharePoint services are currently requested via the SOAP API. I am now working on an abstraction layer to also integrate with SharePoint 2013 over the REST API. At the moment I have some Problems understanding the differences in querying fields via REST or SOAP (using GetListItems of lists.asmx).
What I learned until now:
/_api/web/lists(guid)/items?$select=ID,FileRefI can directly select specific fields
- Fields of relationships can be selected with
- In the REST Version, I have to prefix fields that begin with an underscore by OData_, e.g.
- The internal name of SharePoint fields is encoded: File Size => File_x0020_Size
What I don't understand:
- Why can't I perform a request with
$select=File_x0020_Size? When I try it like this, I get the error "The field or property 'File_x0020_Size' does not exist". But when I go to
/_api/web/lists(guid)/fields, the field is clearly available. With the SOAP service, this scenario works without problems.
- Relationships can be expanded (see 2.) in the REST API. How can this be done in the SOAP API? When I add
<FieldRef Name="Author" />to my request, I get something like
ows_Author="12;#Username"in the result. But how can I select a specific property, e.g. EMail?
I hope my description of the problem is understandable and that someone can help bring some light into my understanding of SharePoint.