Debian Codegraph @

testing/web-platform/tests/tools/wave/docs/rest-api/devices-api/read-device.md

raw
1 # `read device` - [Devices API](../README.md#devices-api)
2
3 The `read device` method of the devices API fetches available information regarding a
4 specific device.
5
6 ## HTTP Request
7
8 `GET /api/devices/<device_token>`
9
10 ## Response Payload
11
12 ```json
13 {
14 "token": "<String>",
15 "user_agent": "<String>",
16 "last_active": "<String>",
17 "name": "<String>"
18 }
19 ```
20
21 - **token** is the unique identifier of the device.
22 - **user_agent** is the user agent of the request the device was registered with.
23 - **last_active** defines the point in time the device was last active. Expressed as ISO 8601 date and time format.
24 - **name** the name the device was assign based on its user agent.
25
26 ## Example
27
28 **Request:**
29
30 `GET /api/devices/1d9f5d30-830f-11ea-8dcb-0021ccd76152`
31
32 **Response:**
33
34 ```json
35 {
36 "token": "1d9f5d30-830f-11ea-8dcb-0021ccd76152",
37 "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36",
38 "last_active": 1587391153295,
39 "name": "Chrome 81.0.4044"
40 }
41 ```