Get Two-Factor Authentication State

GET/zstack/v1/twofactorauthentication/state

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" -X GET http://localhost:8080/zstack/v1/twofactorauthentication/state

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
systemTags (Optional)Listquery  2.6.0
userTags (Optional)Listquery  2.6.0

API Response

Response example

{
  "state": "Disable"
}
NameTypeDescriptionStarting Version
stateString 2.6.0
errorErrorCodeError code. If not null, the operation failed. This field is null on success. For details, see error2.6.0

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, e.g., SYS.1000, HOST.10012.6.0
descriptionStringA brief description of the error2.6.0
detailsStringDetailed information about the error2.6.0
elaborationStringReserved field. Default is null2.6.0
opaqueLinkedHashMapReserved field. Default is null2.6.0
causeErrorCodeThe root error that caused the current error. This field is null if there is no root cause2.6.0

SDK Examples

Java SDK

GetTwoFactorAuthenticationStateAction action = new GetTwoFactorAuthenticationStateAction();
GetTwoFactorAuthenticationStateAction.Result res = action.call();

Python SDK

GetTwoFactorAuthenticationStateAction action = GetTwoFactorAuthenticationStateAction()
GetTwoFactorAuthenticationStateAction.Result res = action.call()