I would like gather usage information about our Azure DevOps wiki pages. How often they are edited, visited, etc. Afaik there is no built in capability for this just an API.
Is there a solution for this or I need to write my own app to iterate through all the wiki pages and call the page stats api (https://learn.microsoft.com/en-us/rest/api/azure/devops/wiki/page-stats?view=azure-devops-rest-6.0)?
Hi and welcome to Stack Overflow! :)
There is no built-in capability to gather this information, and furthermore the endpoint you are referring to only exposes page views in the last 30 days.
Unfortunately Microsoft Azure Dev Ops and Azure Dev Ops Server only provide this endpoint to access the page statistic, and furthermore only allows you to query the page views for the last 30 days.
This appears to be undocumented on the Microsoft Docs Page but a quick test with our own Azure Dev Ops Server with values larger than that resulted in the following response:
{
"$id": "1",
"innerException": null,
"message": "The value 365 is out of range of valid values for parameter pageViewsForDays. Valid values must be between 1 and 30.\r\nParameter name: pageViewsForDays",
"typeName": "System.ArgumentOutOfRangeException, mscorlib",
"typeKey": "ArgumentOutOfRangeException",
"errorCode": 0,
"eventId": 0
}
You can find the documentation for this endpoint, the response objects and the optional query parameters here:
Statistics other than page views in up to the last 30 days are not available.