Query Single Sign-On User Source Bindings

GET/zstack/v1/account-import/bindings

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/account-import/bindings?q=accountUuid=bcfc6b1c7aaf3a43a39ab4edf8b9107d

Queryable Fields

Run the CLI command line tool, enter QueryThirdPartyAccountSourceBinding and press the Tab key to view all queryable fields and cross-table queryable resource names.

API Response

Response Example

{
  "inventories": [
    {
      "id": 1,
      "credentials": "ou=Employee,uid=test",
      "accountSourceUuid": "617cef7cda233b559d134245cf8211d5",
      "accountUuid": "f29adf4e230831f3b34f4d4bf7cfa1dc"
    }
  ]
}
NameTypeDescriptionStarting Version
successbooleanWhether the API call is successful4.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
inventoriesListFor details, see inventories4.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

inventories

NameTypeDescriptionStarting Version
idLongUniquely identifies the relationship4.3.0
credentialsStringUnique identifier of the user from the import source. For example, for users imported from an LDAP source, this is the UID used for login.4.3.0
accountSourceUuidStringImport source server UUID4.3.0
accountUuidStringAccount UUID4.3.0
createDateTimestampCreation time4.3.0
lastOpDateTimestampLast modification time4.3.0

SDK Examples

Java SDK

QueryThirdPartyAccountSourceBindingAction action = new QueryThirdPartyAccountSourceBindingAction();
action.conditions = asList("accountUuid=5ec5476a24423683ad3f51da0891682e");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryThirdPartyAccountSourceBindingAction.Result res = action.call();

Python SDK

QueryThirdPartyAccountSourceBindingAction action = QueryThirdPartyAccountSourceBindingAction()
action.conditions = ["accountUuid=c02ff535be723284947cad9f679cc1b9"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryThirdPartyAccountSourceBindingAction.Result res = action.call()