...
When Confluence User Export is installed on your Confluence server, it is possible to use the REST API and servlets for creating files with user information. With the REST API and servlets you do not have to use the Confluence user interface for exporting each time. You can automate the user export if needed. Use the Python scripts here for this automationfound on the Python scripts page for inspiration.
REST endpoints
URL | Description | HTTP Method | HTTP headers | HTTP Request payload | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<CONFLUENCE_BASE_URL>/rest/confluenceuserexport/1.0/search | This is the endpoint that can be used for searching Confluence users. | POST | Content-type: application/json Accept: application/json Authorization: Basic (<username:password>base64) | EXAMPLE 1The payload below get the 20 first users that are active or inactive starting from 0.
EXAMPLE 2The payload below get the 50 first users that are active or inactive starting from 0 where the user email contains @mail.com.
| ||||||||||
<CONFLUENCE_BASE_URL>/rest/confluenceuserexport/1.0/file/json | Converting Confluence users as JSON to a JSON file. | POST | Content-type: application/json Accept: application/json Authorization: Basic (<username:password>base64) | REQUEST:The payload below is a list of user objects that needs to be converted.
RESPONSE:The response from server with the name of the file created and the path to the file on Confluence server.
| ||||||||||
<CONFLUENCE_BASE_URL>/rest/confluenceuserexport/1.0/file/xml | Converting Confluence users as JSON to a XML file. | POST | Content-type: application/json Accept: application/json Authorization: Basic (<username:password>base64) | REQUEST:The payload below is a list of user objects that needs to be converted.
RESPONSE:The response from server with the name of the file created and the path to the file on Confluence server.
| ||||||||||
<CONFLUENCE_BASE_URL>/rest/confluenceuserexport/1.0/file/csv | Converting Confluence users as JSON to a CSV file. | POST | Content-type: application/json Accept: application/json Authorization: Basic (<username:password>base64) | REQUEST:The payload below is a list of user objects that needs to be converted.
RESPONSE:The response from server with the name of the file created and the path to the file on Confluence server.
| ||||||||||
<CONFLUENCE_BASE_URL>/rest/confluenceuserexport/1.0/file/xlsx | Converting Confluence users as JSON to a XLSX file. | POST | Content-type: application/json Accept: application/json Authorization: Basic (<username:password>base64) | REQUEST:The payload below is a list of user objects that needs to be converted.
RESPONSE:The response from server with the name of the file created and the path to the file on Confluence server.
|
...