Introduction
The /v2/session resource provides a list of valid vCenter sessions of the user making the request.
Resource | URI | Description | GET | POST | PUT | DELETE |
---|---|---|---|---|---|---|
Session | /session | Current user vCenter active sessions |
On this page:
OPTIONS HTTP method
Remember, you can also show what methods are allowed and method description, parameters, etc. by making a GET HTTP request to /v2/session.
http OPTIONS "https://vss-api.eis.utoronto.ca:8001/v2/session" curl -X OPTIONS "https://vss-api.eis.utoronto.ca:8001/v2/session"
List
Enumerating current user valid vCenter sessions can be done by making a GET request to /v2/session resource, which in case the user actually has at least one valid session, a list of JSON objects with the following attributes will be the result:
Attribute | Type | Description |
---|---|---|
key | string | vCenter session key |
username | string | Full username including domain associated with session |
_links | object | Contains reference to current session to display further information |
The following examples implements HTTPie and CURL to list valid vCenter sessions:
http -a $TK GET "https://vss-api.eis.utoronto.ca:8001/v2/session" curl -u $TK -X GET "https://vss-api.eis.utoronto.ca:8001/v2/session"
Getting additional information about specific session can be done appending the session key to the /v2/session URI as follows:
http -a $TK GET "https://vss-api.eis.utoronto.ca:8001/v2/session/521615fc-1b09-bee9-0350-2a79568f4ad0" curl -u $TK -X GET "https://vss-api.eis.utoronto.ca:8001/v2/session/521615fc-1b09-bee9-0350-2a79568f4ad0"
Additional attributes will be shown as a result and are described in the following table:
Attribute | Type | Description |
---|---|---|
domain | string | Authentication domain (usually VSKEY). |
ip | string | IP address of remote client. |
lastActiveTime | string | Timestamp of last active time |
lastActiveTimeDelta | string | Time delta of last active time to now. |
loginTime | string | Timestamp when login. |
loginTimeDelta | string | Time delta of login time to now. |
userAgent | string | What application is connected to vCenter.
|