Validate Session
Curl Example
curl -H "Content-Type: application/json;charset=UTF-8" \
-X GET http://localhost:8080/zstack/v1/accounts/sessions/525912127c633468b4fe142528ee3f3b/validParameter List
| Name | Type | Location | Description | Allowed Values | Starting Version |
|---|---|---|---|---|---|
| sessionUuid | String | url | Session UUID | 0.6 | |
| systemTags (Optional) | List | query | System tags | 0.6 | |
| userTags (Optional) | List | query | User tags | 0.6 |
API Response
Response example
{
"validSession": true
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| success | boolean | 0.6 | |
| valid | boolean | Whether the session is valid | 0.6 |
| error | ErrorCode | Error code. If not null, the operation failed. This field is null on success. For details, see error | 0.6 |
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 | 0.6 |
| description | String | A brief description of the error | 0.6 |
| details | String | Detailed information about the error | 0.6 |
| elaboration | String | Reserved field. Default is null | 0.6 |
| opaque | LinkedHashMap | Reserved field. Default is null | 0.6 |
| cause | ErrorCode | The root error that caused the current error. This field is null if there is no root cause | 0.6 |
SDK Examples
Java SDK
ValidateSessionAction action = new ValidateSessionAction();
action.sessionUuid = "525912127c633468b4fe142528ee3f3b";
ValidateSessionAction.Result res = action.call();
Python SDK
ValidateSessionAction action = ValidateSessionAction()
action.sessionUuid = "525912127c633468b4fe142528ee3f3b"
ValidateSessionAction.Result res = action.call()