LDAPProviders
Authorizes the LDAP provider by slug and returns an authorization token.
The slug of the resource.
obj_slugUsername to authorize
john.doePassword for the given username
password123Authorization successful, returns the token.
Required field(s) are missing, data is invalid, or the action is not allowed.
Forbidden
The given resource or object was not found or does not exist.
POST /api/v1/ldap/{slug}/authorize/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 48
{
"username": "john.doe",
"password": "password123"
}{
"key": "foo"
}Retrieve details for a specific LDAP provider by slug.
The slug of the resource.
obj_slugLDAP provider details
The given resource or object was not found or does not exist.
Server Error
GET /api/v1/ldap/{slug}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
"id": 1,
"name": "Active Directory",
"slug": "active_directory",
"icon": "binary",
"host": "ldap://ldap.example.com",
"port": 389,
"use_ssl": true,
"bind_dn": "cn=admin,dc=example,dc=com",
"bind_password": "secure_password",
"base_dn": "dc=example,dc=com",
"attribute_map": {
"uid": "username",
"mail": "email"
},
"is_active": true
}Update an existing LDAP provider. Only superusers can perform this action.
The slug of the resource.
obj_slugLDAP Provider ID
Name of the LDAP provider.
Active DirectoryUnique slug for the LDAP provider.
active_directoryIcon for the LDAP provider.
Host URL for the LDAP provider.
ldap://ldap.example.comPort number to connect to the LDAP server.
389Indicates whether SSL is used for the LDAP connection.
trueThe distinguished name (DN) for binding to the LDAP server.
cn=admin,dc=example,dc=comPassword for the LDAP bind user.
secure_passwordThe base distinguished name (DN) for LDAP searches.
dc=example,dc=comA mapping of LDAP attributes to system fields.
{"uid":"username","mail":"email"}Indicates if the LDAP provider is active.
trueLDAP provider updated successfully
Required field(s) are missing, data is invalid, or the action is not allowed.
Forbidden
Server Error
PUT /api/v1/ldap/{slug}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 305
{
"id": 1,
"name": "Active Directory",
"slug": "active_directory",
"icon": "binary",
"host": "ldap://ldap.example.com",
"port": 389,
"use_ssl": true,
"bind_dn": "cn=admin,dc=example,dc=com",
"bind_password": "secure_password",
"base_dn": "dc=example,dc=com",
"attribute_map": {
"uid": "username",
"mail": "email"
},
"is_active": true
}{
"id": 1,
"name": "Active Directory",
"slug": "active_directory",
"icon": "binary",
"host": "ldap://ldap.example.com",
"port": 389,
"use_ssl": true,
"bind_dn": "cn=admin,dc=example,dc=com",
"bind_password": "secure_password",
"base_dn": "dc=example,dc=com",
"attribute_map": {
"uid": "username",
"mail": "email"
},
"is_active": true
}Delete an existing LDAP provider. Only superusers can perform this action.
The slug of the resource.
obj_slugNo content
Forbidden
The given resource or object was not found or does not exist.
Server Error
DELETE /api/v1/ldap/{slug}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
No content
Retrieve a list of all LDAP providers. Non-superusers only can see active providers.
List of LDAP providers
Server Error
GET /api/v1/ldap/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
[
{
"id": 1,
"name": "Active Directory",
"slug": "active_directory",
"icon": "binary",
"host": "ldap://ldap.example.com",
"port": 389,
"use_ssl": true,
"bind_dn": "cn=admin,dc=example,dc=com",
"bind_password": "secure_password",
"base_dn": "dc=example,dc=com",
"attribute_map": {
"uid": "username",
"mail": "email"
},
"is_active": true
}
]Create a new LDAP provider. Only superusers can perform this action.
LDAP Provider ID
Name of the LDAP provider.
Active DirectoryUnique slug for the LDAP provider.
active_directoryIcon for the LDAP provider.
Host URL for the LDAP provider.
ldap://ldap.example.comPort number to connect to the LDAP server.
389Indicates whether SSL is used for the LDAP connection.
trueThe distinguished name (DN) for binding to the LDAP server.
cn=admin,dc=example,dc=comPassword for the LDAP bind user.
secure_passwordThe base distinguished name (DN) for LDAP searches.
dc=example,dc=comA mapping of LDAP attributes to system fields.
{"uid":"username","mail":"email"}Indicates if the LDAP provider is active.
trueLDAP provider created successfully
Required field(s) are missing, data is invalid, or the action is not allowed.
Forbidden
Server Error
POST /api/v1/ldap/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 305
{
"id": 1,
"name": "Active Directory",
"slug": "active_directory",
"icon": "binary",
"host": "ldap://ldap.example.com",
"port": 389,
"use_ssl": true,
"bind_dn": "cn=admin,dc=example,dc=com",
"bind_password": "secure_password",
"base_dn": "dc=example,dc=com",
"attribute_map": {
"uid": "username",
"mail": "email"
},
"is_active": true
}{
"id": 1,
"name": "Active Directory",
"slug": "active_directory",
"icon": "binary",
"host": "ldap://ldap.example.com",
"port": 389,
"use_ssl": true,
"bind_dn": "cn=admin,dc=example,dc=com",
"bind_password": "secure_password",
"base_dn": "dc=example,dc=com",
"attribute_map": {
"uid": "username",
"mail": "email"
},
"is_active": true
}Was this helpful?

