Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

API call that will retrieve the number of library views in an online SharePoint library?

Posted on by 9
I'm trying to create a Power Automate flow that will check total number of views of a document library. Using a Send an HTTP request to SharePoint - GET method with a Uri of _api/web/lists/getbytitle('LibraryName')/views I receive no errors but I also don't get the information I need. Are library views possible?
  • Gopala_Krishna Profile Picture
    Gopala_Krishna 1,425 on at
    API call that will retrieve the number of library views in an online SharePoint library?
    I do not think there is a direct REST API endpoint that provides the view count of documents or document libraries. One way you can do is by following the shared steps
     

    Using SharePoint Search API (Workaround)

    Although it won’t directly provide view counts, you can query for documents with certain metadata that may indicate how many times a document has been interacted with.

    • SharePoint Search REST API:

      https://<your-sharepoint-site-url>/_api/search/query?querytext='ContentType:Document'
    This can give you results on documents within the library, and you may have to filter or use metadata to infer activity, but it still won't directly give you the number of views.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,297

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,890

Leaderboard