How to Fetch Page Information Containing Pagename, Url, Creator, Lastmodifiedby From the Confluence Database
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
要約
This article will help you to retrieve detailed Page information from your Confluence database.
ソリューション
The below SQL queries will fetch the following Page information data:
- PageName
- 作成者
- CreationDate
- LastModified Date
- SpaceName
- LastModifier Username
- PageURL
Note: Please replace the http:localhost:6720/c6720 value with your own base url value.
Oracle Syntax
SELECT c.title as PageName,
u.username AS Creator,
c.creationdate,
c.lastmoddate,
s.Spacename,
um.username AS LastModifier,
CONCAT(CONCAT ('http:localhost:6720/c6720','/pages/viewpage.action?pageId='), c.contentid) AS "Page URL"
FROM content c
JOIN user_mapping u
ON c.creator = u.user_key
JOIN user_mapping um
ON c.lastmodifier = um.user_key
Join Spaces s
on c.SpaceID= s.SpaceID
WHERE c.prevver IS NULL
AND c.contenttype = 'PAGE'
AND c.content_status = 'current'
Order by s.spacename
;
MySQL and PostGres SQL syntax
SELECT c.title as PageName,
u.username AS Creator,
c.creationdate,
c.lastmoddate,
s.Spacename,
um.username AS LastModifier,
CONCAT ('http:localhost:6720/c6720','/pages/viewpage.action?pageId=', c.contentid) AS "Page URL"
FROM content c
JOIN user_mapping u
ON c.creator = u.user_key
JOIN user_mapping um
ON c.lastmodifier = um.user_key
Join Spaces s
on c.SpaceID= s.SpaceID
WHERE c.prevver IS NULL
AND c.contenttype = 'PAGE'
AND c.content_status = 'current'
Order by s.spacename;
最終更新日 2023 年 7 月 14 日
Powered by Confluence and Scroll Viewport.