Session management
The session management capabilities of the API allow application developers to manage sessions and includes the following REST calls:
logOn
|
Function |
Log in |
||
|
Description |
This request starts a session. |
||
|
Type |
POST |
||
|
URL Format |
|
||
|
Java API |
Method Name |
Class Name |
|
|
logOn |
|
||
|
Parameters |
Name |
Type |
Description |
|
|
string |
The op parameter allows you to specify which operation is to be performed. (Mandatory) |
|
|
|
string |
Users password (Mandatory). |
|
|
|
string |
If password is set to the super admin password, you can perform actions as a different user by supplying that user name here. (Optional) |
|
|
|
string |
Lets you pass the name of the computer from which you have logged in. (Optional) If this value is not provided then the machinename is set as localhost for this session. |
|
|
|
string |
Lets you pass the name of the application from which you have logged in. (Optional) If this value is not provided then the appname is set as Rest Client for this session. |
|
|
Returns |
Returns a |
||
|
Examples |
URL:
Result:
|
||
getSession
|
Function |
Get information about a specific session |
||
|
Description |
This request returns information about a specific session. |
||
|
Type |
GET |
||
|
URL Format |
|
||
|
Java API |
Method Name |
Class Name |
|
|
|
|
||
|
Parameters |
This request requires no input parameters |
||
|
Returns |
Returns a |
||
|
Examples |
URL:
Result:
|
||
getAllSessions
|
Function |
Get all sessions |
||
|
Description |
This request returns a list of all the active sessions. |
||
|
Type |
GET |
||
|
URL Format |
|
||
|
Java API |
Method Name |
Class Name |
|
|
|
|
||
|
Parameters |
This request requires no input parameters |
||
|
Returns |
Returns a |
||
|
Examples |
URL:
Result:
|
||
keepSessionAlive
|
Function |
Keep a specific session alive |
||
|
Description |
This request keeps the current session alive. The maximum idle time for a session is 60 seconds, which can be updated in the {qpp_home}/serverApp.properties file. |
||
|
Type |
GET |
||
|
URL Format |
|
||
|
Java API |
Method Name |
Class Name |
|
|
|
|
||
|
Parameters |
Name |
Type |
Description |
|
|
string |
The op parameter allows you to specify which operation is to be performed. (Mandatory) This operation will run only for a valid session id. |
|
|
Returns |
Returns a sessi |
||
|
Examples |
URL:
Result:
|
||
terminateSession
|
Function |
Delete a session |
||
|
Description |
This request terminates the session with the given sessionID. |
||
|
Type |
POST |
||
|
URL Format |
|
||
|
Java API |
Method Name |
Class Name |
|
|
|
|
||
|
Parameters |
Name |
Type |
Description |
|
|
string |
The op parameter allows you to specify which operation is to be performed. (Mandatory) This operation will run only for a valid session id. |
|
|
Returns |
A status of 200 is returned in response to a successful request execution. |
||
|
Examples |
URL:
|
||
getMaxIdleTime
|
Function |
Get the maximum idle time for all sessions |
||
|
Description |
This request returns the value for maximum idle time setting for all sessions in seconds.
User can update the value for the |
||
|
Type |
GET |
||
|
URL Format |
|
||
|
Java API |
Method Name |
Class Name |
|
|
|
|
||
|
Parameters |
Name |
Type |
Description |
|
|
string |
The op parameter allows you to specify which operation is to be performed. (Mandatory) |
|
|
Returns |
Returns the maximum idle time set for sessions (for example, 60 seconds (Default)). |
||
|
Examples |
URL:
Result:
|
||
validatePassword
|
Function |
Validate a password |
||
|
Description |
This request validates a password for a user. |
||
|
Type |
POST |
||
|
URL Format |
|
||
|
Java API |
Method Name |
Class Name |
|
|
|
|
||
|
Parameters |
Name |
Type |
Description |
|
|
string |
The op parameter allows you to specify which operation is to be performed. (Mandatory) |
|
|
|
string |
Password to be validated. (Mandatory) |
|
|
Returns |
Returns a string value of |
||
|
Examples |
URL:
Result:
|
||
logOff
|
Function |
Log out |
||
|
Description |
This request ends the session that you are currently logged into. |
||
|
Type |
POST |
||
|
URL Format |
|
||
|
Java API |
Method Name |
Class Name |
|
|
|
|
||
|
Parameters |
Name |
Type |
Description |
|
|
string |
The op parameter allows you to specify which operation is to be performed. (Mandatory)This operation will run only for a valid session id. |
|
|
Returns |
A status of 200 is returned in response to a successful request execution. |
||
|
Examples |
URL:
|
||
