Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
106 lines (87 loc) · 3.03 KB

File metadata and controls

106 lines (87 loc) · 3.03 KB

LDAP Sync

Syncs your LDAP data based on the data sync configurations.

{% hint style="info" %}

HTTP MethodURLRequires Auth
POST/api/v1/ldap.syncNowyes

Example Call

curl --location --request POST 'http://localhost:3000/api/v1/ldap.syncNow' \
--header 'x-auth-token: 0ueGH0dyW5ewtemsyiBlrC8pU4yBbRUtReXiglvisoZ' \
--header 'x-user-id: 2tTEqR7ZNMJ4HGGNa' \
--header 'x-2fa-code: 773917'

Example Response

Success

{
    "message": "Sync_in_progress",
    "success": true
}

Error

Any of the following errors can occur:

  • Authorization: Requires an authentication token for the request to be made.
  • No Permission: This occurs when the authenticated user doesn't have the sync-auth-services-users permission.
  • LDAP Disabled: This occurs when the LDAP connection is disabled.
  • TOTP Required: Requires two-factor authentication for the request to be made.
  • Invalid TOTP: Requires a valid two-factor authentication code.

{% tabs %} {% tab title="Authorization" %}

{
    "status": "error",
    "message": "You must be logged in to do this."
}

{% endtab %}

{% tab title="No Permission" %}

{
    "success": false,
    "error": "error-not-authorized"
}

{% endtab %}

{% tab title="LDAP Disabled" %}

{
    "success": false,
    "error": "LDAP_disabled"
}

{% endtab %}

{% tab title="TOTP Required" %}

{
    "success": false,
    "error": "TOTP Required [totp-required]",
    "errorType": "totp-required",
    "details": {
        "method": "totp",
        "codeGenerated": false,
        "availableMethods": [
            "totp"
        ]
    }
}

{% endtab %}

{% tab title="Invalid TOTP" %}

{
    "success": false,
    "error": "TOTP Invalid [totp-invalid]",
    "errorType": "totp-invalid",
    "details": {
        "method": "totp",
        "codeGenerated": false
    }
}

{% endtab %} {% endtabs %}

Change Log

VersionDescription
4.0.0Added
5.2.0Include syncAvatars on ldap.syncNow