A few days ago I published SharePoint REST API Metadata Explorer. In this post I want to share a bit more information about it and share future plans as well.
SharePoint Rest API for long time was a hidden gem for me. I used CSOM or JSOM without issues and that was fine. Nowadays the power of SharePoint REST API increases. Today REST is a recommended way to interact with SharePoint. BTW for a browser there is a great library to manipulate SharePoint REST API using convenient fluent syntax – PnPjs. If you haven’t tried it yet, it’s time to try .
What is always difficult for me with REST API – to find good documentation for different REST API url along with good usage examples. Some information available at docs.microsoft.com, some in blogs and sharepoint.stackexchange site. However there are few issues with mentioned sources:
- they don’t fully cover REST API, there are still a lot of methods which are not yet covered
- in SharePoint Online every month REST API changes and new methods or method params appear
A few years ago I discovered that SharePoint REST API provides WCF $metadata endpoint. If you issue HTTP GET request to https://your_sharepoint.com/_api/$metadata, you will receive xml file, which describes all methods, params, entities, their relations and associations, properties for SharePoint REST API. You can use this file to find information about all available endpoints, parameters, etc. I used that file to check which SharePoint REST API urls available and which parameters they use. From the other side it’s very inconvenient to search inside that file. The file itself is too huge. This is why SharePoint REST API Metadata Explorer was created.
SharePoint REST API Metadata Explorer allows you to easily search for a method, explore full REST API hierarchy, explore types, properties, navigation properties, methods and their parameters. However Metadata Explorer is not a silver bullet. It has a number of limitation, which $metadata has in general:
- it doesn’t contain any examples on how to use particular method\endpoint
- it doesn’t provide information on which http method available for any particular endpoint (GET or POST)
- it can’t be used as “official” documentation
Be aware of these limitations. Anyway still it’s a good tool to explorer SharePoint REST API. Now what about the future?
I’m planning to add more functionality to SharePoint REST API Metadata Explorer. Including:
Types Explorer allows you to search and see all available types in SharePoint Online tenant. It differs from current REST API Explorer in a way it shows information. REST API Explorer shows REST hierarchy, Types Explorer shows all types flattened. You will be able to search and see properties and methods supported by types.
Custom $metadata file
If you have a change to take a look on How it works section, you know, that REST API Explorer uses latest snapshot from SharePoint Online tenant with Targeted Release enabled. Metadata for you SharePoint might be different, especially in case if you use on-premises SharePoint. You will be able to upload your own $metadata file and SharePoint REST API Metadata Explorer will do other job for you. As a result, you will see metadata related to your tenant.
SharePoint REST API changes explorer
As I mentioned previously, for SharePoint Online metadata changes every month. It might be really interesting to see, which methods were added, which types were updated, etc. Right now REST API Explorer gathers weekly and monthly information about $metadata. Later on I will add a page, to show what was change for any particular month.
That’s it! As usual, for ideas, proposals, or anything else welcome to issues or just use comments under this post