Get Login Captcha

GET/zstack/v1/login/control/captcha

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" -X GET http://localhost:8080/zstack/v1/login/control/captcha?resourceName=admin&loginType=Test

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
resourceNameStringqueryResource name 2.6.0
loginTypeStringqueryLogin type 2.6.0
captchaUuid (optional)Stringquery  0.6
systemTags (optional)ListquerySystem tags 2.6.0
userTags (optional)ListqueryUser tags 2.6.0

API Response

Response example

{
  "captchaUuid": "ff0c9fd9ea99333aa9f47cf61b5f0900",
  "captcha": "test"
}
NameTypeDescriptionStarting Version
captchaUuidStringUnique identifier of the captcha2.6.0
captchaStringBase64-encoded captcha image2.6.0
successboolean 2.6.0
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. 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
detailsStringThe detailed error information2.6.0
elaborationStringReserved field. Defaults to null2.6.0
opaqueLinkedHashMapReserved field. Defaults to null2.6.0
causeErrorCodeThe root error, the cause of the current error. This field is null if there is no root error2.6.0

SDK Examples

Java SDK

GetLoginCaptchaAction action = new GetLoginCaptchaAction();
action.resourceName = "admin";
action.loginType = "Test";
GetLoginCaptchaAction.Result res = action.call();

Python SDK

action = GetLoginCaptchaAction()
action.resourceName = "admin"
action.loginType = "Test"
res = action.call()