0

I want to show all Created BY and Modified BY users of all items of all content types within a site collection. Currently I'm using the

_api/search/query?querytext=''&refiners='owstaxidmetadataalltagsinfo'&selectproperties='CreatedBy,ModifiedBy*'

it is not returning all results. Is there any API to get all items of all content types ?

Thanks in advance.

1 Answer 1

0

You could try this:

(Moved the * to the beginning and added contenttype as selected property)

https://Yourtenant.sharepoint.com/Search/_api/search/query?querytext='*'&refiners='owstaxidmetadataalltagsinfo'&selectproperties='CreatedBy,ModifiedBy,Contenttype'

This is an extremely wide query. What do you mean by "All Items" exactly? You need all items in your tenant or only from a single site?

4
  • Thanks for the response. like for example we can use document library and list items content types "ContentClass:STS_ListItem+ContentClass:STS_ListItem_DocumentLibrary". So is there any way to get all content types instead of mentioned everything in the query. ?
    – Vijay
    Apr 10, 2018 at 7:06
  • So your goal is to retrieve all content types and not all items for them? Apr 10, 2018 at 7:20
  • Not exactly, using these all content types i have to retrieve items ( content ) 'Created BY' and 'Modified By' user names. Just i want to display who is the top participant in that particular site collection. Like whole involved more in creating and modifying items
    – Vijay
    Apr 10, 2018 at 8:19
  • Ok, scoped by Sitecollection. I don't think search might be the right tool then. The I would check the audit log or the site changes during a certain duration for that. There is no reason to filter by CT first I guess Apr 10, 2018 at 8:59

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.