Getting a list of sessions

REST API Reference Guide for Virtual Storage Platform 5000, Virtual Storage Platform E Series, and Virtual Storage Platform G/F Series

Version
93-07-0x
90-09-0x
88-08-10
Audience
anonymous
Part Number
MK-98RD9014-17
The following request gets a list of valid sessions on the REST API server. Only a user who belongs to the Administrator user group (built-in user group) can perform this operation.

Execution permission

Administrator user group (built-in user group)

Request line

GET base-URL/v1/objects/sessions

Request message

Object ID

None.

Query parameters

None.

Body

None.

Response message

Body
{
  "data": [
    {
      "sessionId": 8,
      "userId": "rest-user",
      "ipAddress": "192.0.2.100",
      "createdTime": "2015-09-14T01:02:24Z",
      "lastAccessedTime": "2015-09-14T01:02:24Z"
    },
    {
      "sessionId": 6,
      "userId": "api-user",
      "ipAddress": "192.0.2.100",
      "createdTime": "2015-09-14T00:59:58Z",
      "lastAccessedTime": "2015-09-14T00:59:58Z"
    },
    {
      "sessionId": 5,
      "userId": "admin-user",
      "ipAddress": "192.0.2.100",
      "createdTime": "2015-09-14T00:59:53Z",
      "lastAccessedTime": "2015-09-14T00:59:53Z"
    }
  ]
}

Attribute

Type

Description

sessionId

int

Session ID

userId

string

User ID that was used to generate the session

ipAddress

string

IP address of the REST API client that was used to generate the session

If the REST API client accesses the REST API server via another server, a character string consisting of the concatenated IP addresses of the client and of the server used to access the REST API server (the content of the X-Forwarded-For header received by the REST API server) will be output.

createdTime

ISO8601string

Time the session was generated

lastAccessedTime

ISO8601string

Time the session was last used

Status codes

For details on the status codes of the request for this operation, see the description on HTTP status codes.

Coding example

curl -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session d7b673af189048468c5af9bcf3bbbb6f" -X GET https://192.0.2.100/ConfigurationManager/v1/objects/sessions/