How to write table of Jira/Confluence Users (with specific data) into a table on Confluence page?

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 19, 2023

Dear community,

I have a very specific requirement:

For accounting reasons users have been grouped into user groups per department (Jira as well as Confluence). Now there should be a evaluation/list of those groups and users with several more specific data like the following:

department group | userName | fullName | email | createDate | permissions per application (Jira: each project the user has a role, Confluence: each space the user has permission in)

 

Scriptrunner is available in both applications (Jira & Confluence). Some questions/thougths that came to my mind:

1. I was thinking about getting all these data with scriptrunner natively but I could not figure out how to fetch "createDate" in Confluence (in Jira there is a method for this. unfortunately not in confluence)

2. I´m pretty sure all this information is stored in the DBs. I just don´t know how to figure out the query for that (could at least find a good overview for Jira DB here:
https://developer.atlassian.com/server/jira/platform/database-user-and-group-tables/

Does anyone know something similar for Confluence?
Furthermore: Could anyone help with the query? I know how to fetch user information but not how to get Space/Project permissions.

3. After fetching all data: what would be the best way to store it an bring it into a table on a confluence page? RestAPI ? 
I furthermore have "Advanced tables" plugin in confluence that could create tables from a JSON so I was thinking about a scriptrunner endpoint that can then be called by the plugin. Unfortunatelly I´m not that familiar with creating an endpoint (and also would need point 2 for that).

 

Hope anyone can help or at least give helpful hints that might lead to a solution.

 

Thanks in advance.

Best
Stefan

2 answers

1 accepted

0 votes
Answer accepted
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 23, 2023

At least I could figure out point 3 by myself and create an endpoint that delivers a JSON that can be fetched and displayed as a table by "advanced tables" in confluence.

I will try to find out the rest by "try and error" =D 

Best
Stefan

0 votes
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 19, 2023

Hi @Stefan Salzl 

Would this documentation from Atlassian help you on your way?

On point 3, I can't provide you guidance at this point.

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 19, 2023

@Marc - Devoteam 

No, not really.

I could find the one you mentioned but it´s way less than the one for Jira,

I would need more details regarding the columns of the tables.

Best
Stefan

Like Marc - Devoteam likes this
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 23, 2023

Hi @Stefan Salzl 

I would raise a request at Atlassian Support.

At least I can't find or know about more detailed information related the Confluence DB.

Like Stefan Salzl likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events