Session API

Use the Session API to extend a user’s session timeout period.

You can use PUT /v3/organizations/<org_id> to modify an organization’s session timeout period.

The Session API lets you:

  • Extend a user token’s session timeout period.
  • View session information for a token.

Resources

PUT /v1/session/

Extend Session

Requires administrator privileges. Authenticate as an Apperian administrator.

Extends a token’s expiration time by setting the timeout period to the value specified for the organization.

For example, if your organization’s session timeout is set to 5 minutes, and the session begins at 12:00, the session expires at 12:05. If you call this endpoint between 12:00 and 12:05, say at 12:03, the session is refreshed and now expires at 12:08.

This action updates the expiration time for the token in the database and in the cache. The user must be logged in and the token must be valid. The response returns the new token expiration time in seconds.

URLs

Environment URL
North America https://na01ws.apperian.com/v1/session/
Europe https://eu01ws.apperian.eu/v1/session/

URL Parameters

None

Header Parameters

X-TOKEN
(Required) API token or User token (POST /users/authenticate). For more information, see Authentication.

Data Parameters

None

Example Request

curl -X PUT http://localhost:5000/session/ -H "Content-Type: application/json" \
     --header "X-TOKEN:eTg8ktZXRqKIBJTHunwP6A"

Example Response

{
    "ttl_in_seconds": 60
}
GET /v1/session/

Return Session Info

Requires administrator privileges. Authenticate as an Apperian administrator.

View the session expiration date and time for a token. The user must be logged in and the token must be valid.

URLs

Environment URL
North America https://na01ws.apperian.com/v1/session/
Europe https://eu01ws.apperian.eu/v1/session/

URL Parameters

None

Header Parameters

X-TOKEN
(Required) API token or User token (POST /users/authenticate). For more information, see Authentication.

Data Parameters

None

Example Request

curl -X GET http://localhost:5000/session/ -H "Content-Type: application/json" \
     --header "X-TOKEN:eTg8ktZXRqKIBJTHunwP6A"

Example Response

{
    "session": {
        "token": "eTg8ktZXRqKIBJTHunwP6A",
        "prune": "2017-07-21T13:01:09.404066+00:00"
        }
}