Sessions (sessions)
The sessions endpoint provides information about the application’s HTTP sessions that are managed by Spring Session.
Retrieving Sessions
To retrieve the sessions, make a GET request to /actuator/sessions, as shown in the following curl-based example:
$ curl 'http://localhost:8080/actuator/sessions?username=alice' -i -X GET
The preceding examples retrieves all of the sessions for the user whose username is alice.
The resulting response is similar to the following:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 789
{
"sessions" : [ {
"attributeNames" : [ ],
"creationTime" : "2026-01-22T00:43:52.704389937Z",
"expired" : false,
"id" : "4d1c7ff1-473f-4ba1-bb51-458ee68d5642",
"lastAccessedTime" : "2026-01-22T12:43:07.704397250Z",
"maxInactiveInterval" : 1800
}, {
"attributeNames" : [ ],
"creationTime" : "2026-01-22T07:43:52.710111964Z",
"expired" : false,
"id" : "4db5efcc-99cb-4d05-a52c-b49acfbb7ea9",
"lastAccessedTime" : "2026-01-22T12:43:15.710115300Z",
"maxInactiveInterval" : 1800
}, {
"attributeNames" : [ ],
"creationTime" : "2026-01-22T10:43:52.710118035Z",
"expired" : false,
"id" : "e00f2b82-dc2d-4dd2-b5b5-a6f8e3cad632",
"lastAccessedTime" : "2026-01-22T12:43:40.710118486Z",
"maxInactiveInterval" : 1800
} ]
}
Query Parameters
The endpoint uses query parameters to limit the sessions that it returns. The following table shows the single required query parameter:
| Parameter | Description |
|---|---|
|
Name of the user. |
Response Structure
The response contains details of the matching sessions. The following table describes the structure of the response:
| Path | Type | Description |
|---|---|---|
|
|
Sessions for the given username. |
|
|
ID of the session. |
|
|
Names of the attributes stored in the session. |
|
|
Timestamp of when the session was created. |
|
|
Timestamp of when the session was last accessed. |
|
|
Maximum permitted period of inactivity, in seconds, before the session will expire. |
|
|
Whether the session has expired. |
Retrieving a Single Session
To retrieve a single session, make a GET request to /actuator/sessions/{id}, as shown in the following curl-based example:
$ curl 'http://localhost:8080/actuator/sessions/4db5efcc-99cb-4d05-a52c-b49acfbb7ea9' -i -X GET
The preceding example retrieves the session with the id of 4db5efcc-99cb-4d05-a52c-b49acfbb7ea9.
The resulting response is similar to the following:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 208
{"attributeNames":[],"creationTime":"2026-01-22T07:43:52.710111964Z","expired":false,"id":"4db5efcc-99cb-4d05-a52c-b49acfbb7ea9","lastAccessedTime":"2026-01-22T12:43:15.710115300Z","maxInactiveInterval":1800}
Response Structure
The response contains details of the requested session. The following table describes the structure of the response:
| Path | Type | Description |
|---|---|---|
|
|
ID of the session. |
|
|
Names of the attributes stored in the session. |
|
|
Timestamp of when the session was created. |
|
|
Timestamp of when the session was last accessed. |
|
|
Maximum permitted period of inactivity, in seconds, before the session will expire. |
|
|
Whether the session has expired. |
Deleting a Session
To delete a session, make a DELETE request to /actuator/sessions/{id}, as shown in the following curl-based example:
$ curl 'http://localhost:8080/actuator/sessions/4db5efcc-99cb-4d05-a52c-b49acfbb7ea9' -i -X DELETE
The preceding example deletes the session with the id of 4db5efcc-99cb-4d05-a52c-b49acfbb7ea9.