How to get list of space and page watches for a user
目的
To get all the space and page watches of a user from the database.
ソリューション
The following queries have been tested in PostGreSQL
Get Page Watches - Replace <user_name> with actual username
SELECT c.contentid, c.title, s.spacekey
FROM CONTENT c
JOIN SPACES s
ON c.spaceid = s.spaceid
JOIN NOTIFICATIONS n
ON c.contentid = n.contentid
JOIN user_mapping um
ON n.username = um.user_key
WHERE um.username = '<user_name>';
Get Space Watches - Replace <user_name> with actual username
SELECT s.spaceid, s.spacekey, s.spacename
FROM SPACES s
JOIN NOTIFICATIONS n
ON s.spaceid = n.spaceid
JOIN user_mapping um
ON n.username = um.user_key
WHERE um.username = '<user_name>';
最終更新日 2019 年 6 月 14 日
Powered by Confluence and Scroll Viewport.