Query IP Access Control Rule

GET/zstack/v1/login-control/access-control/rules

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/login-control/access-control/rules?q=uuid=4f41ad1c52ac3ba690282ede3d1ebb2a

Queryable Fields

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

API Response

Response Example

{
  "inventories": [
    {
      "rule": "192.168.10.0/24"
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. See error3.5.1
inventoriesListSee inventories3.5.1

error

NameTypeDescriptionStarting Version
codeStringError code number. A globally unique identifier for the error, e.g., SYS.1000, HOST.10013.5.1
descriptionStringBrief description of the error3.5.1
detailsStringDetailed error information3.5.1
elaborationStringReserved field. Defaults to null3.5.1
opaqueLinkedHashMapReserved field. Defaults to null3.5.1
causeErrorCodeRoot error. The source error that caused this error. Null if no root cause exists3.5.1

inventories

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource. Uniquely identifies the resource3.5.1
nameStringResource name3.5.1
descriptionStringDetailed description of the resource3.5.1
ruleString 3.5.1
createDateTimestampCreation time3.5.1
lastOpDateTimestampLast modification time3.5.1
strategyControlStrategySee strategy3.5.1

strategy

NameTypeDescriptionStarting Version
ACCEPTControlStrategy 3.5.1
REJECTControlStrategy 3.5.1

SDK Examples

Java SDK

QueryAccessControlRuleAction action = new QueryAccessControlRuleAction();
action.conditions = asList("uuid=b4cae0f6a9ac3cd686ba36c81291d197");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryAccessControlRuleAction.Result res = action.call();

Python SDK

QueryAccessControlRuleAction action = QueryAccessControlRuleAction()
action.conditions = ["uuid=4b3f7d2f1fda3f1d8089b4d037364bf9"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryAccessControlRuleAction.Result res = action.call()