Get Login 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=TestParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| resourceName | String | query | Resource name | 2.6.0 | |
| loginType | String | query | Login type | 2.6.0 | |
| captchaUuid (optional) | String | query | 0.6 | ||
| systemTags (optional) | List | query | System tags | 2.6.0 | |
| userTags (optional) | List | query | User tags | 2.6.0 |
API Response
Response example
{
"captchaUuid": "ff0c9fd9ea99333aa9f47cf61b5f0900",
"captcha": "test"
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| captchaUuid | String | Unique identifier of the captcha | 2.6.0 |
| captcha | String | Base64-encoded captcha image | 2.6.0 |
| success | boolean | 2.6.0 | |
| error | ErrorCode | Error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error | 2.6.0 |
error
| Name | Type | Description | Starting Version |
|---|---|---|---|
| code | String | The error code number, a globally unique identifier for the error, e.g., SYS.1000, HOST.1001 | 2.6.0 |
| description | String | A brief description of the error | 2.6.0 |
| details | String | The detailed error information | 2.6.0 |
| elaboration | String | Reserved field. Defaults to null | 2.6.0 |
| opaque | LinkedHashMap | Reserved field. Defaults to null | 2.6.0 |
| cause | ErrorCode | The root error, the cause of the current error. This field is null if there is no root error | 2.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()