Can I perform operation like create users, add users into groups etc in Confluence using APIs?

Sudhanshu Singh Rathore April 21, 2021

I am trying to create user, delete user, add user into groups, remove users from groups, create group and delete group using APIs available for Confluence. But I am not able to find any API for these operation in the official documentation of Atlassian. Please suggest me an option to perform these operations in Confluence. Also, please answer why Atlassian is not providing APIs for these operations in Confluence?

 

1 answer

0 votes
Phill Fox
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 21, 2021

@Sudhanshu Singh Rathore 

Welcome to the Atlassian community

You will find the documentation for the actions around groups and users at

Cloud

Groups https://developer.atlassian.com/cloud/confluence/rest/api-group-group/#api-api-group-get

Users https://developer.atlassian.com/cloud/confluence/rest/api-group-users/#api-group-users

On Premise

Groups https://docs.atlassian.com/ConfluenceServer/rest/7.9.1/#api/group

Users https://docs.atlassian.com/ConfluenceServer/rest/7.9.1/#api/user

 

However as you will see there are differences between what is offered in Cloud and On Premise. 

You may also want to look at Atlassian Crowd for your user management for on premise which gives you much greater control of your accounts and a full set of APIs. 
https://docs.atlassian.com/atlassian-crowd/4.2.0/REST/

 

You can also add your voice by voting for https://jira.atlassian.com/browse/CONFSERVER-56205

Sudhanshu Singh Rathore April 21, 2021

@Phill Fox 

Thanks for the guidance.

The specified document does not contain any API for the operations mentioned in the question for On Premise.

Also, we don't have Atlassian Crowd in place for the application. Only JIRA instance is installed. Can I make use of JIRA instance to perform these operations on Confluence?

Phill Fox
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 21, 2021

As you say you have Jira and that does have the required APIs

Groups https://docs.atlassian.com/software/jira/docs/api/REST/8.13.6/#api/2/group
Users https://docs.atlassian.com/software/jira/docs/api/REST/8.13.6/#api/2/user

 

So if you use the user management in Jira and connect Confluence to it then you are certainly able to manage it that way. 

Sudhanshu Singh Rathore April 21, 2021

Please confirm if the process described in "Connecting Confluence to Jira applications for User Management" section in the link given below is the correct way to connect these two applications.

https://confluence.atlassian.com/doc/connecting-to-crowd-or-jira-for-user-management-229838465.html

Phill Fox
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 21, 2021

@Sudhanshu Singh Rathore 

Yes those are the right instructions. Make sure you select the correct version in the select list in the top-right corner in case there are any differences between versions. 

Sudhanshu Singh Rathore April 23, 2021

Thanks Phill. That is working for user management.

Do you have any idea about adding a user or group into space? I am not able to find any REST API for that.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events