Baselines for Confluence

Getting app usage statistics

The main function of Baselines for Confluence is creating baselines in document spaces and allowing users to access those baselines as a set of documents. 

Confluence admins who want to know about the use of Baselines for Confluence will probably want to know "how many baselines are present on their system" and "how often are they accessed".

Unfortunately, there is no way to see which user displayed which baseline when, but if you have access to the database, you can get a list of all baselines in all spaces using the following SQL query. These queries return a list of all baselines in the system together with their related space names.

For Confluence 10 and later, use:

SQL
SELECT s.spacename, p.*
FROM plugin_setting p
LEFT OUTER JOIN spaces s ON s.spacekey = p.namespace
WHERE p.setting_key LIKE '%baseline-%';

The setting_value column in the result set contains a JSON string. This JSON structure includes details such as the baseline creation date and the user who created the baseline.

For versions earlier than Confluence 10, use:

SQL
SELECT s.spacename, b.*
FROM bandana b 
LEFT OUTER JOIN spaces s ON s.spacekey = b.bandanacontext
WHERE b.bandanakey LIKE '%baseline-%'

The bandanavalue column in the result set is an XML string. One of the first tags in the XML structure contains the createDate of the baseline and the user who created the baseline.

Please note that, based on the total number of baselines on your Confluence and the average size of those baselines, this query can be really expensive for the database. 

We recommend running them during off-hours.

It is also recommended to first add a clause that limits the number of rows returned.