Get members of a user group

Andreas Eckhardt April 4, 2024

Hi,
Confluence allows user groups with names like
SW_Integrator/Tester
The URL to get the members would be something like
https://<confluence-server>/rest/api/group/SW_Integrator/Tester/member
which will fail because of the slash in the group name.
How can I retrieve the content by using the atlassian_python_api?

1 answer

0 votes
Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2024

@Andreas Eckhardt ,

Have you tried doing a special character replace?

Normally "/" should translate to %2F

So making your url:

 

https://<confluence-server>/rest/api/group/SW_Integrator%2FTester/member

 

Andreas Eckhardt April 4, 2024

I tried it, but ended up in:

HTTP Status 400 – Bad Request


Type Status Report

Message Invalid URI: [The encoded slash character is not allowed]

Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).

Dirk Ronsmans
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 4, 2024

I found some documentation related to Bamboo but I think it's fair to assume the same would be valid for Confluence since they use the same Tomcat

https://confluence.atlassian.com/bamkb/if-there-is-a-slash-or-character-in-the-group-or-username-in-bamboo-permission-assignment-fails-1116295484.html

There is an option to add an argument but that's not adviced due to security.

Seems the advice is "don't use group names with a /"

You can always try and raise a support call with Atlassian to see if they have any other advice but i wouldn't hold my breath.

https://support.atlassian.com/contact

 

 

 

Andreas Eckhardt April 4, 2024

Danke @Dirk Ronsmans für die guten Argumente. Jetzt versuche ich damit meiner IT zu zeigen, dass wir besser solche Namen verbieten. Wenn die Alternative ein Securityrisiko ist, sollte klappen ;-)

Andreas Eckhardt July 5, 2024

Thanks to your support @Dirk Ronsmans I was able to convince my IT to forbidd member group names with slashes inside. So I could keep my scripts as they are. :-)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events