Snapservice. Sessions Get

Snapservice. Sessions Get

Returns information about the current session. This operation expects a valid session token to be supplied.

A side effect of invoking this operation may be a change to the session's last accessed time to the current time if this is supported by the session implementation. Invoking any other operation in the API will also update the session's last accessed time.

This API is meant to serve the needs of various front end projects that may want to display the name of the user. Examples of this include various web based user interfaces and logging facilities.

This operation was added in vSphere API 9.0.0.0.

Request
URI
GET
https://{host}/api/snapservice/sessions
COPY
Authentication
This operation uses the following authentication methods.
Responses
200

Information about the session.

Returns Snapservice.Sessions.Info of type(s) application/json
"Snapservice.Sessions.Info Object"

401

if the session id is missing from the request or the corresponding session object cannot be found.

Returns Vapi.Std.Errors.Unauthenticated of type(s) application/json
"Vapi.Std.Errors.Unauthenticated Object"

503

if session retrieval fails due to server specific issues e.g. connection to back end component is failing. Due to the security nature of this API further details will not be disclosed in the error. Please refer to component health information, administrative logs and product specific documentation for possible causes.

Returns Vapi.Std.Errors.ServiceUnavailable of type(s) application/json
"Vapi.Std.Errors.ServiceUnavailable Object"

Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/api/snapservice/sessions