Time to Live (TTL)¶
For client applications that use session-based authentication upon initial login, an API endpoint that extends (if possible) and reports the session lifetime is available. This endpoint is typically used for client-side session management, for example to display a pop up to warn the user to extend the session before it expires (as in the case of for example self-service).
POST <hostname>/api/session/keep_alive/
The request returns a payload in JSON format with details:
max_age: The number of seconds remaining for the session.
expiry: The date at which the session will expire.
extendable: Boolean indicating if the client can extend the length of the session by triggering an API request.
An example response:
{
max_age: 86296
extendable: false
expiry: "2015-03-18T10:24:53.059Z"
}