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
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
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
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
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.
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
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?