Application Programming Interface Guide > REST API > TDV Server REST APIs > Session
 
Session
The session operations that can be performed are:
GET /session
PUT /session
DELETE /session
GET /session
This API is used to get information about the currently open session. This may include updates to a user's rights.
Parameters
None
Example to get session information
curl -X GET -u admin:admin "https://localhost:9400/rest/session"
Example to get session information as ldap user
curl -X GET -u user@ldapDomain:password "https://localhost:9400/ rest/session"
PUT /session
This API is used to initiate a long running session with the TDV server. Returns information about the current session including a session token and the current user object. The session token should be used for all following Rest API calls and be placed within the session HTTP cookie.
Parameters
None
Request Body
Example Value - Schema
{
“user”: {
“name”: “string”,
“domainName”: “string”,
“id”: 0,
“annotation”: “string”,
“memberReferences”: [
{
“memberName”: “string”
“domainName”: “string”
}
],
“rights”: 0,
“effectiveRights”: 0,
“inheritedRights”: 0,
“attributes”: {
“empty”: true
},
“locked”: true
},
“sessionToken”: “string”,
“autoCloseMode”: true
}
Example to begin a new session
curl -X PUT -u admin:admin "https://localhost:9400/rest/session"
Example to begin a new session as ldap user
curl -X PUT -u user@ldapDomain:password "https://localhost:9400/ rest/session"
DELETE /session
This API is used to end the current session and invalidate the session token that was previously returned when creating the session.
Parameters
None
Example to end new session
curl -X DELETE -u admin:admin "https://localhost:9400/rest/session"
Example to end new session as ldap user
curl -X DELETE -u user@ldapDomain:password "https://localhost:9400/ rest/session"