1

Is it possible to access site collection usage information via web services?

We are looking to get information on last time a site was used so this can be added into a report. I thought that this information could automatically be populated into a list via a workflow by leveraging web services, but I can't seem to find site usage information.

1 Answer 1

0

You could consume SiteData.GetSite Method from Sites Web Service to return site metadata, information about the subsites in the current site collection.

Example

var srvSiteData = new SiteDataService.SiteData();
srvSiteData.Credentials = System.Net.CredentialCache.DefaultCredentials;

SiteDataService._sSiteMetadata siteMData;
SiteDataService._sWebWithTime[] siteTime;

string users;
string groups;
string[] arrGroups;
srvSiteData.GetSite(out siteMData, out siteTime, out users, out groups, out arrGroups);

Console.WriteLine(siteMData.LastModified); //print Last Modified Date for a site
2
  • can be this done via powershell? Mar 26, 2018 at 15:08
  • @CodeAbaddon, surely! Mar 26, 2018 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.