Skip to main content

General Information

Connection Type

UI Documentation

Endpoints

List Connections

Get Connection

Create Connection

Update Connection

Delete Connection


List Connections

Endpoint

Request

Headers

Path Parameters

Note: The type query parameter is required to filter connections by type.

cURL Example


Get Connection

Endpoint

Request

Headers

Path Parameters

Response

Success Response (200 OK)

Note: Password is masked in get operations.

cURL Example


Create Connection

Endpoint

Request

Headers

Path Parameters

Request Body

Full JSON Body Example - Basic LDAP Connection
Full JSON Body Example - LDAP with SSL
Full JSON Body Example - Active Directory
Full JSON Body Example - LDAP with Certificate Validation
Request Body Fields
Common Fields
LDAP-Specific Fields

EnumLdapRequireCertificateType (requireCertificateType)

  • NOT_REQUIRED - No certificate validation (default)
  • REQUIRED_CN - Certificate Common Name (CN) must match server hostname
  • REQUIRED_AN_PN - Certificate Alternative Name or Principal Name must match

EnumSearchScope (searchScope)

  • OBJECT - Search only the base object itself
  • ONE_LEVEL - Search immediate children of base object
  • SUBTREE - Search base object and all descendants (default, most common)

Server Address Format

  • LDAP: ldap://hostname:389 (standard port 389)
  • LDAPS: ldaps://hostname:636 (secure port 636)
  • Can include additional connection parameters

LDAP Filter Examples

  • (uid={0}) - Search by UID attribute (OpenLDAP)
  • (sAMAccountName={0}) - Search by sAMAccountName (Active Directory)
  • (cn={0}) - Search by Common Name
  • (&(objectClass=person)(uid={0})) - Combined filter with object class

Notes

  • serverAddress, username, password, and baseDn are required.
  • serverAddress format: ldap://host:port or ldaps://host:port
  • username is the bind DN (Distinguished Name) for LDAP authentication.
  • password is the password for the bind DN.
  • customFilter uses {0} as placeholder for the username being searched.
  • searchScope defaults to SUBTREE (searches entire subtree).
  • useSsl: true enables SSL/TLS encryption (use ldaps:// in serverAddress).
  • certificateId is required if useSsl: true and certificate validation is enabled.
  • baseDn is the root DN for LDAP searches (e.g., dc=example,dc=com).

Response

Success Response (200 OK)

cURL Example


Update Connection

Endpoint

Request

Headers

Path Parameters

Request Body

Full JSON Body Example
Note: Request body structure is the same as Create Connection. All fields should be provided for update.

Response

Success Response (200 OK)


Delete Connection

Endpoint

Request

Headers

Path Parameters

Response

Success Response (200 OK)


Notes and Warnings

  • LDAP Protocol:
    • LDAP (Lightweight Directory Access Protocol) for directory services
    • Standard port: 389 (LDAP), 636 (LDAPS)
    • Supports both LDAP and LDAPS (LDAP over SSL/TLS)
  • Server Address:
    • Format: ldap://hostname:port or ldaps://hostname:port
    • Use ldaps:// for SSL/TLS encrypted connections
    • Standard ports: 389 (LDAP), 636 (LDAPS)
  • Authentication:
    • username is the bind DN (Distinguished Name) for LDAP authentication
    • password is the password for the bind DN
    • Bind DN format: cn=username,dc=example,dc=com
    • Use service account with appropriate permissions
  • Search Filter:
    • customFilter uses {0} as placeholder for username
    • Common filters:
      • OpenLDAP: (uid={0})
      • Active Directory: (sAMAccountName={0})
      • Generic: (cn={0})
  • Search Scope:
    • OBJECT - Search only base object
    • ONE_LEVEL - Search immediate children
    • SUBTREE - Search entire subtree (default, most common)
  • Base DN:
    • baseDn is the root DN for LDAP searches
    • Format: dc=example,dc=com or DC=example,DC=com
    • Should match your LDAP directory structure
  • SSL/TLS:
    • useSsl: true enables SSL/TLS encryption
    • Use ldaps:// in serverAddress when SSL is enabled
    • Certificate validation options:
      • NOT_REQUIRED - No validation (not recommended for production)
      • REQUIRED_CN - CN must match hostname
      • REQUIRED_AN_PN - Alternative Name or Principal Name must match
  • Certificate:
    • certificateId is required if certificate validation is enabled
    • Upload certificate to Apinizer certificate store first
    • certificateName is for reference only
  • Active Directory:
    • Use sAMAccountName filter for Active Directory
    • Bind DN format: CN=ServiceAccount,CN=Users,DC=example,DC=com
    • Base DN format: DC=example,DC=com
  • Performance:
    • Use appropriate search scope (SUBTREE is most flexible but slower)
    • Optimize custom filter for your directory structure
    • Consider connection pooling for high-throughput scenarios
  • Security:
    • Use SSL/TLS in production (ldaps://)
    • Enable certificate validation
    • Use strong passwords for bind DN
    • Restrict bind DN permissions
    • Consider using service accounts with minimal privileges
  • Deployment: Connection changes require deployment to take effect. Set deployToWorker: true or deploy manually.