Returning the Number of Pages in a Space by Date Filter

Scenario

A simple use case for Reporting would be to find out how many pages there are exactly in a space.

This recipe allows you to get the number of pages within a space.

Result

 

Recipe

Apps

Reporting for Confluence Server & Data Center

Apps

Reporting for Confluence Server & Data Center

Level

Easy

Estimated time

5 minutes

Macros

Content Reporter, Date Filter, Report Block, Report Body, Report Header

Suppliers

Collection Supplier, Content Supplier, Report Supplier

Storage format

You can copy and paste this code into the Confluence Source Editor:

<p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="6d0ea707-4961-4bbe-a498-d12e19610c20" ac:name="report-block" ac:schema-version="1"> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="46e25167-bec1-402c-8a6a-fdfeeb05ec12" ac:name="content-reporter" ac:schema-version="1"> <ac:parameter ac:name="types">page</ac:parameter> <ac:parameter ac:name="spaces"> <ri:space ri:space-key="MYKEY"/> </ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="85c395fc-2618-44d1-8799-11cf08e1b72e" ac:name="date-filter" ac:schema-version="1"> <ac:parameter ac:name="minValue">-1m</ac:parameter> <ac:parameter ac:name="maxValue">+0d</ac:parameter> <ac:parameter ac:name="">content:modification date</ac:parameter> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="20ed82a2-dd99-4dd7-9d1f-20fc813f86a2" ac:name="report-header" ac:schema-version="1"> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="4071a3b8-4e62-4b94-b198-70a1ccbd54c9" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="">report:query&gt;collection:size</ac:parameter> </ac:structured-macro> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> <ac:structured-macro ac:macro-id="6a6babe3-a581-4433-88d6-061a96e9804c" ac:name="report-body" ac:schema-version="1"> <ac:rich-text-body> <p> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br/> </p>

 

Macro structure

You can recreate the example in the editor view:

 

Steps

  • N/A

Line-by-Line Explanation

  • N/A