Binding to an LDAP Server
Function
This API is used to bind to an LDAP server.
Constraints
base_dn and url cannot be left empty. This API is only supported for NFS file systems.
URI
POST /v1/{project_id}/sfs-turbo/shares/{share_id}/fs/ldap
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
The project ID. |
|
share_id |
Yes |
String |
The file system ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
The account token. |
|
Content-Type |
Yes |
String |
The MIME type. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
url |
Yes |
String |
The URL of the LDAP server. The format is ldap://{ip_address}:{port_number} or ldaps://{ip_address}:{port_number}, for example, ldap://192.168.xx.xx:60000. |
|
base_dn |
Yes |
String |
The base DN. |
|
user_dn |
No |
String |
The bind DN. |
|
password |
No |
String |
The LDAP authentication password. |
|
vpc_id |
No |
String |
The ID of the VPC that the specified LDAP server can connect to. This parameter is only required when the SFS Turbo file system is used across VPCs. |
|
filter_condition |
No |
String |
The search filters. This is a reserved field and is not supported currently. |
|
backup_url |
No |
String |
The URL of the standby LDAP server. The format is ldap://{ip_address}:{port_number} or ldaps://{ip_address}:{port_number}, for example, ldap://192.168.xx.xx:60000. |
|
schema |
No |
String |
The LDAP schema. If not specified, RFC2307 will be used. |
|
search_timeout |
No |
Integer |
The LDAP search timeout interval, in seconds. If not specified, 3 seconds will be used. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
X-request-id |
String |
The request ID. |
|
Parameter |
Type |
Description |
|---|---|---|
|
jobId |
String |
The ID of an asynchronous LDAP task. You can query the task execution status by calling the API for querying details about a task. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
X-request-id |
String |
The request ID. |
|
Parameter |
Type |
Description |
|---|---|---|
|
errCode |
String |
The error code. |
|
errMsg |
String |
The error message. |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
X-request-id |
String |
The request ID. |
|
Parameter |
Type |
Description |
|---|---|---|
|
errCode |
String |
The error code. |
|
errMsg |
String |
The error message. |
Example Requests
Creating and binding to an LDAP server
{
"url" : "ldap://192.168.xx.xx:60000",
"base_dn" : "dc=example,dc=com",
"user_dn" : "cn=admin,dc=example,dc=com",
"password" : "pwdxxxxxx",
"backup_url" : "ldap://192.168.xx.xx:60000",
"schema" : "RFC2307",
"search_timeout" : 10
}
Example Responses
Status code: 200
Request accepted
{
"jobId" : "72362dxxxxa04d419dbd5e6d9fe5xxxx"
}
Status code: 400
Client error
{
"errCode" : "SFS.TURBO.0001",
"errMsg" : "Invalid rule id"
}
Status code: 500
Internal error
{
"errCode" : "SFS.TURBO.0005",
"errMsg" : "Internal server error"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Request accepted |
|
400 |
Client error |
|
500 |
Internal error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.