Cis Session get

Cis Session 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.

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

Information about the session.

Returns Cis Session Info of type(s) application/json
{
    "user": "string",
    "created_time": "string",
    "last_accessed_time": "string"
}
string
user
Required

Fully qualified name of the end user that created the session, for example [email protected]. A typical use case for this information is in Graphical User Interfaces (GUI) or logging systems to visualize the identity of the current user.

string As date-time As date-time
created_time
Required

Time when the session was created.

string As date-time As date-time
last_accessed_time
Required

Last time this session was used by passing the session token for invoking an API.


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
This response body class contains all of the following: InlineVapi Std Errors Unauthenticated0
"Vapi Std Errors Unauthenticated Object"
string
challenge
Optional

Indicates the authentication challenges applicable to the target API provider. It can be used by a client to discover the correct authentication scheme to use. The exact syntax of the value is defined by the specific provider, the protocol and authentication schemes used.

For example, a provider using REST may adhere to the WWW-Authenticate HTTP header specification, RFC7235, section 4.1. In this case an example challenge value may be: SIGN realm="27da1358-2ba4-11e9-b210-d663bd873d93",sts="http://vcenter/sso?vsphere.local", Basic realm="vCenter"

This property was added in vSphere API 7.0.0.0.

This property is optional because it was added in a newer version than its parent node.


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
This response body class contains all of the following: InlineVapi Std Errors ServiceUnavailable0
"Vapi Std Errors ServiceUnavailable Object"

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