Debian Codegraph @

testing/web-platform/tests/tools/wave/docs/rest-api/results-api/view.md

raw
1 # Viewing Reports - [Results API](../README.md#results-api)
2
3 It is possible to view the reports generated by the WPT Report tool directly in the browser using a version of the report that is hosted by the WAVE server. The methods listed here return urls to those hosted reports.
4
5 ## 1. `view report`
6
7 Returns a URL to a report for an API of a single session, generated by the WPT Report tool.
8
9 ### HTTP Request
10
11 `GET /api/results/<session_token>/<api_name>/reporturl`
12
13 ### Response Payload
14
15 ```json
16 {
17 "uri": "String"
18 }
19 ```
20
21 ### Example
22
23 **Request:**
24
25 `GET /api/results/d9caaae0-c362-11e9-943f-eedb305f22f6/apiOne/reporturl`
26
27 **Response:**
28
29 ```json
30 {
31 "uri": "/results/d9caaae0-c362-11e9-943f-eedb305f22f6/apiOne/all.html"
32 }
33 ```
34
35 ## 2. `view multi report`
36
37 Returns a URL to a report for an API of multiple session, generated by the WPT Report tool.
38
39 ### HTTP Request
40
41 `GET /api/results/<api_name>/reporturl`
42
43 ### Query Parameters
44
45 | Parameter | Description | Default | Example |
46 | --------- | ------------------------------------------------------------ | ------- | -------------------------------- |
47 | `tokens` | Comma separated list of tokens to create a multi report for. | none | `tokens=token_a,token_b,token_c` |
48
49 ### Example
50
51 **Request:**
52
53 `GET /api/results/apiOne/reporturl?tokens=ce2dc080-c283-11e9-b4d6-e046513784c2,cd922410-c344-11e9-858f-9063f6dd878f`
54
55 **Response:**
56
57 ```json
58 {
59 "uri": "/results/comparison-cd922410-ce2dc080-1709d631/apiOne/all.html"
60 }
61 ```