This chapter describes the operations in the Session Manager interface of the RESTful facade provided in Oracle Communications Services Gatekeeper.
Applications use the RESTful Session Manager interface to get a unique session ID. Each application then adds this session ID to the header of all its requests. Services Gatekeeper uses this value to keep track of all the traffic that an application sends for the duration of the session, and to destroy a session.
The GeneralException
error will be thrown when any operation in the RESTful Session Manager interface fails.
When the Administration Server for your Services Gatekeeper domain is in the running state, the REST service descriptions of these operations can be found at
http://host:port/rest/session_manager/index.html
where host and port are the host name and port of the system on which Services Gatekeeper is installed.
The Get Session operation creates a session with an ID.
If the Get Session operation is successful, the response body will contain the session ID. This string value is used by the application in the X-Session-ID header of all subsequent traffic requests.
http://host:port/rest/session_manager/sessions
where host and port are the hostname and port of the system on which Services Gatekeeper is installed.
Standard header fields. If the request fails, the Status-Line header field will contain the status code and the reason for the failure. See "Understanding RESTful Errors and Exceptions".
The Get Session Remaining Lifetime operation retrieves the time remaining in this session, in milliseconds.
The Request-URI for the GET method contains the session ID.
If the Get Session Remaining Lifetime operation is successful, the response body will contain the time remaining in this session, in milliseconds.
http://host:port/rest/session_manager/session/${sessionId}
where:
host and port are the host name and port of the system on which Services Gatekeeper is installed.
${sessionID} is the session ID obtained from the response to the Get Session request.
Standard header fields. If the request fails, the Status-Line header field will contain the status code and the reason for the failure. See "Understanding RESTful Errors and Exceptions".
The Destroy Session operation destroys this session.
To destroy a session, provide the appropriate session in the Request-URI for this operation. This identifier should have been obtained by the initial setup for this session.
There is no request or response body for Destroy Session. If the request fails, the body of the error response will contain the call identifier and the type of exception.
http://host:port/rest/session_manager/session/${sessionId}
where:
host and port are the host name and port of the system on which Services Gatekeeper is installed.
sessionId is the session ID obtained from the response to the Get Session request.