LDAPProviders
Authorizes the LDAP provider by slug and returns an authorization token.
The slug of the resource.
obj_slug
Username to authorize
john.doe
Password for the given username
password123
Authorization 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_slug
LDAP 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_slug
LDAP Provider ID
Name of the LDAP provider.
Active Directory
Unique slug for the LDAP provider.
active_directory
Icon for the LDAP provider.
Host URL for the LDAP provider.
ldap://ldap.example.com
Port number to connect to the LDAP server.
389
Indicates whether SSL is used for the LDAP connection.
true
The distinguished name (DN) for binding to the LDAP server.
cn=admin,dc=example,dc=com
Password for the LDAP bind user.
secure_password
The base distinguished name (DN) for LDAP searches.
dc=example,dc=com
A mapping of LDAP attributes to system fields.
{"uid":"username","mail":"email"}
Indicates if the LDAP provider is active.
true
LDAP 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_slug
No content
No 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 Directory
Unique slug for the LDAP provider.
active_directory
Icon for the LDAP provider.
Host URL for the LDAP provider.
ldap://ldap.example.com
Port number to connect to the LDAP server.
389
Indicates whether SSL is used for the LDAP connection.
true
The distinguished name (DN) for binding to the LDAP server.
cn=admin,dc=example,dc=com
Password for the LDAP bind user.
secure_password
The base distinguished name (DN) for LDAP searches.
dc=example,dc=com
A mapping of LDAP attributes to system fields.
{"uid":"username","mail":"email"}
Indicates if the LDAP provider is active.
true
LDAP 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?