Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I add user to group by rest API(confluence 7.4.8)

志华 西西 July 24, 2023

HI, I want to add user to group by this rest api?

PUT /rest/api/user/{username}/group/{groupName}

put xxx/rest/api/user/test1/group/lead1

However, it shows 404 error.

for uri: xxx/rest/api/user/test1/group/lead1/</message>

Can you give me an example for this api?

This document has not detail information.

Thanks.

api/user/{username}/group/{groupName}Expand all methods

REST API for managing {@link User} to {@link Group} membership.

UpdatePUT /rest/api/user/{username}/group/{groupName}

Add the given {@link User} identified by username to the given {@link Group} identified by groupName. This method is idempotent i.e. if the membership already exists then no action will be taken.

1 answer

1 accepted

1 vote
Answer accepted
Tansu Akdeniz
Community Champion
July 25, 2023

Hi @志华 西西 

Which Confluence version do you use?

The link you shared belongs to 8.4.0 version. However, that method doesn't exist in 7.4.8. 

Check 7.4.8 Rest Api page: https://docs.atlassian.com/ConfluenceServer/rest/7.4.8/

志华 西西 July 25, 2023

Thanks, Akdenize. After I use 8.4 version, this api works.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events