Sessions Controller Resource

The API allows you to login, logout, view user session and check api connection status.

GET /session

Check api connection status by http status code. Api connection status is OK when http status code is equal 204 (No Content).

Response Body
media type data type description
application/json string (JSON) no content

Example

Request
GET /session
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
...
                
              

POST /session/login

Login user.

Request Body
media type data type description
application/json LoginRequest (JSON) specify details to login as user
Response Body
media type data type description
application/json SessionInfoResponse (JSON) details about user session

Example

Request
POST /session/login
Content-Type: application/json
Accept: application/json

                
{
  "login" : "...",
  "password" : "..."
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "requester" : {
    "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
    "name" : "Entity name"
  },
  "infoTourEnabled" : true,
  "lastFailedLoginIp" : "...",
  "language" : "PL",
  "appUserSettings" : {
    "pageSize" : 12345,
    "timeFormat" : 12345
  },
  "privileges" : [ "APP_INSTANCE_EXPORT_TASK_REGISTER", "APP_CMD_EXEC_CONFIG_WRITE" ],
  "endpointsTokens" : {
    "endpointsServerManagerToken" : "...",
    "endpointsServerManagerWarning" : "...",
    "endpointsOrganizationAdminToken" : "...",
    "endpointsOrganizationAdminWarning" : "..."
  },
  "uiConsoleMode" : "WORKFLOW",
  "lastSuccessfulLogin" : 1451677502000,
  "lastFailedLogin" : 1451649601000,
  "uiTimeZone" : "UTC"
}
                
              

POST /session/login-with-token

Request Body
media type data type
application/json LoginWithTokenRequest (JSON)
Response Body
media type data type description
application/json SessionInfoResponse (JSON)

Example

Request
POST /session/login-with-token
Content-Type: application/json
Accept: application/json

                
{
  "token" : "..."
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "requester" : {
    "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
    "name" : "Entity name"
  },
  "infoTourEnabled" : true,
  "lastFailedLoginIp" : "...",
  "language" : "DE",
  "appUserSettings" : {
    "pageSize" : 12345,
    "timeFormat" : 12345
  },
  "privileges" : [ "STORAGE_SNAPSHOT_SLA_READ", "STORAGE_INFRASTRUCTURE_READ" ],
  "endpointsTokens" : {
    "endpointsServerManagerToken" : "...",
    "endpointsServerManagerWarning" : "...",
    "endpointsOrganizationAdminToken" : "...",
    "endpointsOrganizationAdminWarning" : "..."
  },
  "uiConsoleMode" : "WORKFLOW",
  "lastSuccessfulLogin" : 1451677502000,
  "lastFailedLogin" : 1451649601000,
  "uiTimeZone" : "UTC"
}
                
              

POST /session/logout

Logout current user.

Example

Request
POST /session/logout
Content-Type: */*

                
...
                
              
Response
HTTP/1.1 201 Created

              

POST /session/refresh-endpoints-tokens

Refresh Endpoints tokens.

Response Body
media type data type description
application/json SessionInfoResponse (JSON) endpoint tokens

Example

Request
POST /session/refresh-endpoints-tokens
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "requester" : {
    "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
    "name" : "Entity name"
  },
  "infoTourEnabled" : true,
  "lastFailedLoginIp" : "...",
  "language" : "DE",
  "appUserSettings" : {
    "pageSize" : 12345,
    "timeFormat" : 12345
  },
  "privileges" : [ "STORAGE_INSTANCE_SNAPSHOT_TASK_REGISTER", "OS_CREDENTIAL_WRITE" ],
  "endpointsTokens" : {
    "endpointsServerManagerToken" : "...",
    "endpointsServerManagerWarning" : "...",
    "endpointsOrganizationAdminToken" : "...",
    "endpointsOrganizationAdminWarning" : "..."
  },
  "uiConsoleMode" : "WORKFLOW",
  "lastSuccessfulLogin" : 1451677502000,
  "lastFailedLogin" : 1451649601000,
  "uiTimeZone" : "UTC"
}
                
              

GET /session/user

Get user session info.

Response Body
media type data type description
application/json SessionInfoResponse (JSON) details about user session

Example

Request
GET /session/user
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "requester" : {
    "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
    "name" : "Entity name"
  },
  "infoTourEnabled" : true,
  "lastFailedLoginIp" : "...",
  "language" : "PL",
  "appUserSettings" : {
    "pageSize" : 12345,
    "timeFormat" : 12345
  },
  "privileges" : [ "VE_BACKUP_SLA_WRITE", "NODE_WRITE" ],
  "endpointsTokens" : {
    "endpointsServerManagerToken" : "...",
    "endpointsServerManagerWarning" : "...",
    "endpointsOrganizationAdminToken" : "...",
    "endpointsOrganizationAdminWarning" : "..."
  },
  "uiConsoleMode" : "TASK",
  "lastSuccessfulLogin" : 1451677502000,
  "lastFailedLogin" : 1451649601000,
  "uiTimeZone" : "UTC"
}
                
              

POST /session/node/login

Login for node.

Request Body
media type data type description
application/json NodeLoginRequest (JSON) specify details to login as node
Response Body
media type data type description
application/json SessionInfoResponse (JSON) details about node session

Example

Request
POST /session/node/login
Content-Type: application/json
Accept: application/json

                
{
  "login" : "...",
  "password" : "...",
  "version" : "..."
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "requester" : {
    "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
    "name" : "Entity name"
  },
  "infoTourEnabled" : true,
  "lastFailedLoginIp" : "...",
  "language" : "FR",
  "appUserSettings" : {
    "pageSize" : 12345,
    "timeFormat" : 12345
  },
  "privileges" : [ "VE_INSTANCE_UNMOUNT_TASK_REGISTER", "OS_CREDENTIAL_WRITE" ],
  "endpointsTokens" : {
    "endpointsServerManagerToken" : "...",
    "endpointsServerManagerWarning" : "...",
    "endpointsOrganizationAdminToken" : "...",
    "endpointsOrganizationAdminWarning" : "..."
  },
  "uiConsoleMode" : "WORKFLOW",
  "lastSuccessfulLogin" : 1451677502000,
  "lastFailedLogin" : 1451649601000,
  "uiTimeZone" : "UTC"
}
                
              

GET /session/user/details

Get current user details.

Response Body
media type data type description
application/json AppUserDetails (JSON) user details

Example

Request
GET /session/user/details
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "login" : "...",
  "firstName" : "...",
  "lastName" : "...",
  "lastFailedLoginIp" : "...",
  "source" : "LDAP",
  "language" : "PL",
  "active" : true,
  "infoTourEnabled" : true,
  "endpointsOrganization" : {
    "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
    "name" : "Entity name"
  },
  "groups" : [ {
    "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
    "name" : "Entity name"
  }, {
    "guid" : "...",
    "name" : "..."
  } ],
  "appUserSettings" : {
    "pageSize" : 12345,
    "timeFormat" : 12345
  },
  "externalId" : "...",
  "thirdPartyRestriction" : "NO_RESTRICTION",
  "guid" : "f8f73bf9-2445-4bce-a7dd-753be3b40a67",
  "lastSuccessfulLogin" : 1451649601000,
  "lastFailedLogin" : 1451677502000,
  "uiTimeZone" : "UTC"
}