Get Candidate LDAP/AD Entries for Binding

GET/zstack/v1/ldap/entries/candidates

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/ldap/entries/candidates?ldapFilter=(cn=user_xxx)&limit=2500

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
ldapFilterStringqueryQuery filter 4.3.0
ldapServerUuid (Optional)StringqueryUUID of the LDAP server used for the query. If not specified, the system uses the UUID of the currently active LDAP server. 4.3.0
systemTags (Optional)ListquerySystem tags 4.3.0
userTags (Optional)ListqueryUser tags 4.3.0
limit (Optional)IntegerqueryMaximum number of records to return, similar to MySQL limit 4.3.0

API Response

Response Example

{
  "inventories": []
}
NameTypeDescriptionStarting Version
successboolean 4.3.0
inventoriesList 4.3.0
errorErrorCodeError code. If not null, the operation has failed. This field is null when the operation succeeds. For details, see error4.3.0

error

NameTypeDescriptionStarting Version
codeStringError code number. The globally unique identifier of the error, for example, SYS.1000 or HOST.1001.0.6
descriptionStringBrief description of the error0.6
detailsStringDetailed information about the error0.6
elaborationStringReserved field. Default is null.0.6
opaqueLinkedHashMapReserved field. Default is null.0.6
causeErrorCodeRoot error. The source error that caused the current error. This field is null if no root error exists.0.6

SDK Examples

Java SDK

GetCandidateLdapEntryForBindingAction action = new GetCandidateLdapEntryForBindingAction();
action.ldapFilter = "(cn=user_xxx)";
action.limit = 2500;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetCandidateLdapEntryForBindingAction.Result res = action.call();

Python SDK

GetCandidateLdapEntryForBindingAction action = GetCandidateLdapEntryForBindingAction()
action.ldapFilter = "(cn=user_xxx)"
action.limit = 2500
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetCandidateLdapEntryForBindingAction.Result res = action.call()