|
|
|
@ -9,12 +9,12 @@ are managed by Spring Session.
|
|
|
|
|
[[sessions-retrieving]]
|
|
|
|
|
== Retrieving Sessions
|
|
|
|
|
|
|
|
|
|
To retrieve the sessions, make a `GET` request to `/application/sessions` as shown in the
|
|
|
|
|
To retrieve the sessions, make a `GET` request to `/application/sessions`, as shown in the
|
|
|
|
|
following curl-based example:
|
|
|
|
|
|
|
|
|
|
include::{snippets}sessions/username/curl-request.adoc[]
|
|
|
|
|
|
|
|
|
|
The preceding examples retrieves all of the sessions for the user with the username
|
|
|
|
|
The preceding examples retrieves all of the sessions for the user whose username is
|
|
|
|
|
`alice`.
|
|
|
|
|
|
|
|
|
|
The resulting response is similar to the following:
|
|
|
|
@ -26,8 +26,8 @@ include::{snippets}sessions/username/http-response.adoc[]
|
|
|
|
|
[[sessions-retrieving-query-parameters]]
|
|
|
|
|
=== Query Parameters
|
|
|
|
|
|
|
|
|
|
The endpoint uses query parameters to limit the sessions that it returns. The single
|
|
|
|
|
required query parameter is shown in the following table:
|
|
|
|
|
The endpoint uses query parameters to limit the sessions that it returns. The following
|
|
|
|
|
table shows the single required query parameter:
|
|
|
|
|
|
|
|
|
|
[cols="2,4"]
|
|
|
|
|
include::{snippets}sessions/username/request-parameters.adoc[]
|
|
|
|
@ -37,8 +37,8 @@ include::{snippets}sessions/username/request-parameters.adoc[]
|
|
|
|
|
[[sessions-retrieving-response-structure]]
|
|
|
|
|
=== Response Structure
|
|
|
|
|
|
|
|
|
|
The response contains details of the matching sessions. The structure of the response is
|
|
|
|
|
described in the following table:
|
|
|
|
|
The response contains details of the matching sessions. The following table describes the
|
|
|
|
|
structure of the response:
|
|
|
|
|
|
|
|
|
|
[cols="3,1,3"]
|
|
|
|
|
include::{snippets}sessions/username/response-fields.adoc[]
|
|
|
|
@ -48,12 +48,12 @@ include::{snippets}sessions/username/response-fields.adoc[]
|
|
|
|
|
[[sessions-retrieving-id]]
|
|
|
|
|
== Retrieving a Single Session
|
|
|
|
|
|
|
|
|
|
To retrieve a single session, make a `GET` request to `/application/sessions/{id}` as
|
|
|
|
|
To retrieve a single session, make a `GET` request to `/application/sessions/{id}`, as
|
|
|
|
|
shown in the following curl-based example:
|
|
|
|
|
|
|
|
|
|
include::{snippets}sessions/id/curl-request.adoc[]
|
|
|
|
|
|
|
|
|
|
The preceding example retrieves the session with the id
|
|
|
|
|
The preceding example retrieves the session with the `id` of
|
|
|
|
|
`4db5efcc-99cb-4d05-a52c-b49acfbb7ea9`. The resulting response is similar to the
|
|
|
|
|
following:
|
|
|
|
|
|
|
|
|
@ -64,8 +64,8 @@ include::{snippets}sessions/id/http-response.adoc[]
|
|
|
|
|
[[sessions-retrieving-id-response-structure]]
|
|
|
|
|
=== Response Structure
|
|
|
|
|
|
|
|
|
|
The response contains details of the requested session. The structure of the response is
|
|
|
|
|
described in the following table:
|
|
|
|
|
The response contains details of the requested session. The following table describes the
|
|
|
|
|
structure of the response:
|
|
|
|
|
|
|
|
|
|
[cols="3,1,3"]
|
|
|
|
|
include::{snippets}sessions/id/response-fields.adoc[]
|
|
|
|
@ -75,10 +75,10 @@ include::{snippets}sessions/id/response-fields.adoc[]
|
|
|
|
|
[[sessions-deleting]]
|
|
|
|
|
== Deleting a Session
|
|
|
|
|
|
|
|
|
|
To delete a session, make a `DELETE` request to `/application/sessions/{id}` as shown in
|
|
|
|
|
To delete a session, make a `DELETE` request to `/application/sessions/{id}`, as shown in
|
|
|
|
|
the following curl-based example:
|
|
|
|
|
|
|
|
|
|
include::{snippets}sessions/delete/curl-request.adoc[]
|
|
|
|
|
|
|
|
|
|
The preceding example deletes the session with the id
|
|
|
|
|
The preceding example deletes the session with the `id` of
|
|
|
|
|
`4db5efcc-99cb-4d05-a52c-b49acfbb7ea9`.
|
|
|
|
|