QueryIAM2LdapBinding

API Request

URLs
GET zstack/v1/iam2/ldap/bindings
GET zstack/v1/iam2/ldap/bindings/{uuid}
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/iam2/ldap/bindings?q=accountUuid=bb452952218931cdb9c058085748dc8a
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/iam2/ldap/bindings/c757b80ef90f37dba57f180ac1b52269

Queryable Fields

You can check all queryable fields and resource names that can be queried across tables by using zstack-cli, entering QueryIAM2LdapBinding, and pressing the Tab key.

API Response

Sample Response
{
  "inventories": [
    {
      "uuid": "5e66b22cb6d33a87802d12b4ee280f64",
      "ldapUid": "ou\u003dEmployee,uid\u003dtest",
      "ldapServerUuid": "03f1ff7e314232ebbb365c7fc62878f3",
      "resourceUuid": "3946f8a48c6d320fbddd0e6c0c30c281"
    }
  ]
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 3.5.1
inventories List See inventories. 3.5.1
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 3.5.1
description String The brief description of the error. 3.5.1
details String The details about the error. 3.5.1
elaboration String The reserved field. Default value: null. 3.5.1
opaque LinkedHashMap The reserved field. Default value: null. 3.5.1
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 3.5.1
#inventories
Name Type Description Starting Version
uuid String The resource UUID. 3.5.1
ldapUid String The AD/LDAP entry UUID. 3.5.1
ldapServerUuid String The AD/LDAP server UUID. 3.5.1
resourceUuid String The UUID of the associated resource. 3.5.1
createDate Timestamp The creation date. 3.5.1
lastOpDate Timestamp The last operation date. 3.5.1

SDK Sample

Java SDK
QueryIAM2LdapBindingAction action = new QueryIAM2LdapBindingAction();
action.conditions = asList("accountUuid=cf0b19d0309c31e2bf9d2f9e50a3a013");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryIAM2LdapBindingAction.Result res = action.call();
Python SDK
QueryIAM2LdapBindingAction action = QueryIAM2LdapBindingAction()
action.conditions = ["accountUuid=5f37176baf4b35479f25bf375879c83d"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryIAM2LdapBindingAction.Result res = action.call()