繁体   English   中英

如何使用 Microsoft Graph 或 SharePoint API 获取每个 SharePoint 站点的大小?

[英]How to get the size of each SharePoint site using Microsoft Graph or SharePoint API?

I tried using graph API for reports https://docs.microsoft.com/en-us/graph/api/reportroot-getsharepointsiteusagestorage?view=graph-rest-1.0 this returns the required output but in CSV.

GET /reports/getSharePointSiteUsageStorage(period='{period_value}')

Output fields in the CSV are Report Refresh Date,Site Id,Site URL,Owner Display Name,Is Deleted,Last Activity Date,File Count,Active File Count,Page View Count,Visited Page Count,Storage Used (Byte),Storage Allocated (Byte),Root Web Template,Owner Principal Name,Report Period

我只关心站点 ID、使用的存储(字节)、分配的存储(字节)字段。 有没有办法将这些信息作为 JSON output 获取? 或者有没有办法使用其他一些 API 来获取这些信息?

您可以通过以下方式获取站点使用信息:

https://<siteUrl>/_api/site/usage

参考: https://sharepoint.stackexchange.com/questions/91599/retrieve-site-collection-quota-and-used-storage-from-rest-or-jsom

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM