none
_api/$metadata or _vti_bin/client.svc/$metadata no longer working in Office365 Preview

    Question

  • Since a couple of days I've noticed that in some Office365 Preview sites OData V3 endpoints e.g. sitename/_api/$metadata or sitename/_vti_bin/client.svc/$metadata doesn't return any longer the MetaData document.

    Instead an error is returned:

      <m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
        <m:code>-1, Microsoft.SharePoint.Client.ResourceNotFoundException</m:code>
        <m:message xml:lang="en-US">Cannot find resource for the request $metadata.</m:message>  </m:error>


    In http://www.odata.org/media/30002/OData.html#metadatarequests it states that

    <quote>

    OData services MUST expose a Metadata Document which defines all data exposed by the service. The Metadata Document URL SHOULD be the root URL of the service with “/$metadata” appended. To retrieve this document a client issues a GET request to the Metadata Document URL.

    </quote>

    Does anybody know if this is only a temporary glitch or if the syntax how to access the metadata changed during some internal upgrade?

    Thanks,

    Rainer

    Tuesday, October 30, 2012 10:15 AM

Answers

  • Hi All,

    Sorry for delay with reply to this question. _api/$metadata is not supported in SharePoint 2013. In Beta version _api/$metadata was not complete and was removed from final version of the product. It will be added back in future updates to the product. It is fully functional in other regards. listdata.svc/$metadata is still supported in 2013 version.

    Best regards,

    Maxim

    Thursday, December 06, 2012 10:02 PM
    Answerer
  • Update: 

    SharePoint Online 2013 will have the update shortly (as the farms are upgraded to the branch that has the code checked in). 

    On-Premise SharePoint 2013 will have it added back via an upcoming cumulative update.

    Thank you for your patience.

    • Proposed as answer by GadgetGirlJen Wednesday, April 03, 2013 4:48 PM
    • Marked as answer by Rainer Wittmann Wednesday, April 03, 2013 5:11 PM
    Wednesday, April 03, 2013 4:33 PM

All replies

  • My understanding is that this page has been pulled and that we should not be writing code that uses it.
    Thursday, November 01, 2012 11:29 PM
  • Hmh...

    _api was introduced with SP2013 (http://msdn.microsoft.com/en-us/library/jj164060(v=office.15).aspx) and  listdata.svc is part of SP2010. I'm wondering why $metadata should have been pulled out. Both pages are OData service end points and and therefore MUST provide Metadata information according to the specs (http://www.odata.org/media/30002/OData.html#metadatarequests).

    Please note that both services are working they just don't provide $metadata information in some of my site colletions (they still do in other).

    The only services that I saw deprecated in 2013 are some older *.asmx web services (http://technet.microsoft.com/en-us/library/ff607742(v=office.15).aspx) in favour of CSOM and REST (_api).

    Regards,

    Rainer

    Friday, November 02, 2012 8:41 AM
  • Hi All,

    Sorry for delay with reply to this question. _api/$metadata is not supported in SharePoint 2013. In Beta version _api/$metadata was not complete and was removed from final version of the product. It will be added back in future updates to the product. It is fully functional in other regards. listdata.svc/$metadata is still supported in 2013 version.

    Best regards,

    Maxim

    Thursday, December 06, 2012 10:02 PM
    Answerer
  • Thanks Maxim for the confirmation that _api/$metadata is gone, at least for now.

    In the preview $metadata had a size of roughly 1 MegaByte. Way too much to retrieve it for each site in multiple site/web solution, especially as only the SP.Data EntityContainer seemed to be unique per site.

    So while working on the final implementation consider adding something like queryable metadata  http://www.odata.org/blog/2010/4/22/queryable-odata-metadata to the service. That would be very helpfull in dynamic scenarios.

    Kind regards,

    Rainer

    Friday, December 07, 2012 8:33 AM
  • I can confirm that it's missing on an on-premises installation of SharePoint 2013 as well.
    Tuesday, December 18, 2012 2:03 PM
  • Hi All,

    Sorry for delay with reply to this question. _api/$metadata is not supported in SharePoint 2013. In Beta version _api/$metadata was not complete and was removed from final version of the product. It will be added back in future updates to the product. It is fully functional in other regards. listdata.svc/$metadata is still supported in 2013 version.

    Best regards,

    Maxim

    Hello Maxim,

    Do you know when this update will be available? OData is not a OData without $metadata.

    Thanks.

    • Proposed as answer by GadgetGirlJen Wednesday, April 03, 2013 4:48 PM
    Monday, January 07, 2013 4:44 PM
  • Update: 

    SharePoint Online 2013 will have the update shortly (as the farms are upgraded to the branch that has the code checked in). 

    On-Premise SharePoint 2013 will have it added back via an upcoming cumulative update.

    Thank you for your patience.

    • Proposed as answer by GadgetGirlJen Wednesday, April 03, 2013 4:48 PM
    • Marked as answer by Rainer Wittmann Wednesday, April 03, 2013 5:11 PM
    Wednesday, April 03, 2013 4:33 PM
  • great! Thanks for the update
    Wednesday, April 03, 2013 4:38 PM
  • Hi Jen,

    Thanks for the update. Looking forward to it.

    Rainer

    Wednesday, April 03, 2013 4:42 PM
  • Does anyone know if this has been release yet for OnPremise installations?  If not, will it be in Service Pack 1 (http://blogs.office.com/2013/11/20/service-pack-1-is-coming/)?

    Thanks.

    Keith


    • Edited by KBarlow Tuesday, February 18, 2014 8:33 PM
    Tuesday, February 18, 2014 8:30 PM
  • Update: 

    SharePoint Online 2013 will have the update shortly (as the farms are upgraded to the branch that has the code checked in). 

    On-Premise SharePoint 2013 will have it added back via an upcoming cumulative update.

    Thank you for your patience.

    Well, it has been two years and still not there.  Depressing since there is already an announcement for SP2016.
    Monday, August 24, 2015 5:29 PM