getting a RESO style atom service document from SharePoint Online


In a office 365-hosted sharepoint subsite, called bi, we store an excel file in the documents folder.

 

image

The pwdoc resource is simply an excel file, uploaded.

image

The sharepoint infrastructure has a nice feature – that any “table” within an uploaded excel file becomes an odata feed:

Our first table, with columns mlsid and payment, is known as PW and becomes the “PW” feed

 

image

https://netmagic.sharepoint.com/bi/_vti_bin/ExcelRest.aspx/Shared%20Documents/pwdoc.xlsx/OData/PW

The second table is known as NRDS:

image

https://netmagic.sharepoint.com/bi/_vti_bin/ExcelRest.aspx/Shared%20Documents/pwdoc.xlsx/OData/NRDS

we can use Excel’s power query tool chain to visit the

 

image

https://netmagic.sharepoint.com/bi/_vti_bin/ExcelRest.aspx/Shared%20Documents/pwdoc.xlsx/OData

 

which produces

 

image

 

Comments on the RESO spec, at http://members.reso.org/display/API/2.3.2+URI+Stem, has an example

image

In the example, an optional convention for addressing service documents by URI is, for our domain name, https://netmagic.sharepoint.com/RESO/OData/ .

 

In fiddler, the client’s proxy, we add a rule:

urlreplace /RESO/OData/ /bi/_vti_bin/ExcelRest.aspx/Shared%20Documents/pwdoc.xlsx/OData

 

image

note how the address bar no longer matches with the xml base.

 

Another solution is to do a formal redirect, so that the atom document has a base that aligns with the browser:

image

using a redirect (in fiddler, rather than a true load balancer setup)

image

Advertisements

About home_pw@msn.com

Computer Programmer who often does network administration with focus on security servers. Very strong in Microsoft Azure cloud!
This entry was posted in odata. Bookmark the permalink.