Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Info

Available since v. 2.19.0

General information

Available ONLY for Confluence administrators


Get all user directories

Method type - 

Status
colourGreen
titleGET

URL: {CONFLUENCE_URL}/rest/extender/1.0/userDirectories/all

Response format - 

Status
titleJSON

Example response:

Code Block
languagejson
{
    "userDirectories": [
        {
            "lastSyncStartDate": 1560411989302,
            "lastSyncStatusKey": "directory.caching.sync.completed.FULL",
            "lastSyncDuration": 40026,
            "name": "LDAP Accounts",
            "description": null,
            "active": true,
            "position": 1,
            "id": 10100
        },
        {
            "name": "Confluence Internal Directory",
            "description": "Confluence Internal Directory",
            "active": true,
            "position": 2,
            "id": 1
        },
        {
            "lastSyncStartDate": 1552660659493,
            "lastSyncStatusKey": null,
            "lastSyncDuration": 37692,
            "name": "Other LDAP Accounts",
            "description": null,
            "active": false,
            "position": 3,
            "id": 10200
        }
    ],
    "results": "3"
}


Synchronize user directories

Method type - 

Status
colourYellow
titlePOST

URL: {CONFLUENCE_URL}/rest/extender/1.0/userDirectories/{DIRECTORY_ID}/synchronize

  • where {DIRECTORY_ID} is a directory id, like 10100

Example URL:

  • {CONFLUENCE_URL}/rest/extender/1.0/userDirectories/10100/synchronize

  • {CONFLUENCE_URL}/rest/extender/1.0/userDirectories/10100/synchronize?fullSynchronisation=true&runInBackground=true

Response format - 

Status
titleJSON

Example response:

Code Block
languagejson
{
    "message": "synchronization request for directory '1' has been sent"
}
Code Block
languagejson
{
    "message": "directory '10100' has been synchronized"
}

Code Block
languagejson
{
    "message": "directory '10100' is now synchronising"
}

Parameters

  • fullSynchronisation - optional - (true or empty) - if you need run full synchronization set to true, otherwise synchronization is incremental

  • FULL - Synchronise with the entire user base from remote directory

  • INCREMENTAL - Synchronise the changes since the last synchronization

You can check the configuration of your user directory in the settings, go to User Directories -> Edit -> Advanced Settings -> Enable Incremental Synchronization

  • runInBackground - optional - (true or empty) - if set to true, synchronization run in background mode, otherwise the request will wait at the end of synchronization