How to list all subscribed Public calendars using a SQL query
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.
*Except Fisheye and Crucible
Summary
This document shows how to list the Public calendars that users are subscribed to (i.e. a Google Calendar).
Solution
This SQL query retrieves information about calendar subscriptions in a Confluence instance that uses Team Calendars:
1
2
3
4
5
SELECT um.lower_username as creator, tc."NAME" as calendar_name, to_timestamp(CAST(tc."CREATED" AS bigint)/1000) as creation_date, s.spacename, s.spacekey
FROM "AO_950DC3_TC_SUBCALS" tc
JOIN user_mapping um ON um.user_key = tc."CREATOR"
JOIN SPACES s ON tc."SPACE_KEY"=s.spacekey
WHERE tc."STORE_KEY"='com.atlassian.confluence.extra.calendar3.calendarstore.SubscriptionCalendarDataStore';
The retrieved information includes the creator of the calendar, the calendar name, the calendar's creation date, the space name, and the space key associated with the calendar.
Was this helpful?