Debian Codegraph @

testing/web-platform/tests/tools/wave/docs/rest-api/sessions-api/find.md

raw
1 # `find` - [Sessions API](../README.md#sessions-api)
2
3 The `find` method of the sessions API searches for a session token using a provided token fragment, which is the beginning of a session token with at least 8 characters. Due to data protection, it is not possible to find multiple tokens using one fragment. If the server finds more than one session token, it returns none. In this case more characters need to be added to the fragment, until it matches only one session token.
4
5 ## HTTP Request
6
7 `GET /api/sessions/<token_fragment>`
8
9 ## Response Payload
10
11 ```json
12 {
13 "token": "String"
14 }
15 ```
16
17 ### Example
18
19 **Request:**
20
21 `GET /api/sessions/afd4ecb0`
22
23 **Response:**
24
25 ```json
26 {
27 "token": "afd4ecb0-c339-11e9-b66c-eca76c2bea9c"
28 }
29 ```