Is there a way to see all of the pages created by a user?

Specifically, created by myself.  I've created hundreds of pages and commented on thousands.  Yes, I am very aware of the normal answer to this existing question: https://answers.atlassian.com/questions/55182 which is to use the content-by-user macro.  That's nice, but it a) includes comments, blog posts, b) won't allow filtering by space, and most importantly cuts off way, way before the end of the list.

Things I've tried beyond that macro:

  • I've tried advanced searching, using myself as author, and space limiting, and limiting the search to pages, which would do what I want - except that I can't search for a word that might actually be in every page i created (eg:  "the" and "a" return no results), and if i try searching for nothing, my search parameters are not obeyed - I see content created by others (I suppose I am an "author" since I fixed spelling or updated a doc that has 200 revisions 150 revisions ago).   I only want to see pages I created.
  • looking at my profile page and selecting 'activity'.  This also fails to allow me to filter by space and limit only to pages that I created, rather than everything I've ever touched.  Also, having to click after every ~20 entries to get more gets tedious quickly when you have thousands of comments and edits.

I've written some cool stuff.  I want to run through it, after 3 years of writing, and look at it.  Is there no reasonable way to do this? I'd be happy to use an API if there were a way to achieve my aims exactly.

1 answer

Hi Chris!

Developer's approach smile ...

With API you can, https://developer.atlassian.com/confdev/plugin-cookbook/searching-using-the-v2-search-api

The code (quickly prototyped) is something like:

SearchQuery query = BooleanQuery.composeAndQuery(new CreatorQuery("admin"), new ContentTypeQuery(ContentTypeEnum.PAGE));
    SearchSort sort = new ModifiedSort(SearchSort.Order.DESCENDING); // latest modified content first
    SearchFilter securityFilter = SiteSearchPermissionsSearchFilter.getInstance();
    ResultFilter resultFilter = new SubsetResultFilter(2000); // how many you have approx? put larger number here
    Search search = new Search(query, sort, securityFilter, resultFilter);
    final SearchResults searchResults = searchManager.search(search);
    for (SearchResult result : searchResults) {
      String displayTitle = result.getDisplayTitle();
      // ... more result.get here
    }

Regards,

Sash

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,925 views 27 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you