Validate Session

GET/zstack/v1/accounts/sessions/{sessionUuid}/valid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-X GET http://localhost:8080/zstack/v1/accounts/sessions/525912127c633468b4fe142528ee3f3b/valid

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
sessionUuidStringurlSession UUID 0.6
systemTags (Optional)ListquerySystem tags 0.6
userTags (Optional)ListqueryUser tags 0.6

API Response

Response example

{
  "validSession": true
}
NameTypeDescriptionStarting Version
successboolean 0.6
validbooleanWhether the session is valid0.6
errorErrorCodeError code. If not null, the operation failed. This field is null on success. For details, see error0.6

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, e.g., SYS.1000, HOST.10010.6
descriptionStringA brief description of the error0.6
detailsStringDetailed information about the error0.6
elaborationStringReserved field. Default is null0.6
opaqueLinkedHashMapReserved field. Default is null0.6
causeErrorCodeThe root error that caused the current error. This field is null if there is no root cause0.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()