summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/tools/wave/docs/rest-api/results-api/read-compact.md
blob: 55b6f41d4bae4ef5e4ecd5d90c1b153d4df0c386 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# `read compact` - [Results API](../README.md#results-api)

The `read compact` method of the results API returns the number of passed, failed, timed out and not run tests per API of a session.

## HTTP Request

`GET /api/results/<session_token>/compact`

## Response Payload

```json
{
  "<api_name>": {
    "pass": "Integer",
    "fail": "Integer",
    "timeout": "Integer",
    "not_run": "Integer",
    "total": "Integer",
    "complete": "Integer"
  }
}
```

## Example

**Request:**

`GET /api/results/620bbf70-c35e-11e9-bf9c-742c02629054/compact`

**Response:**

```json
{
  "apiOne": {
    "pass": 311,
    "fail": 59,
    "timeout": 23,
    "not_run": 20,
    "total": 481,
    "complete": 413
  },
  "apiTwo": {
    "pass": 548,
    "fail": 129,
    "timeout": 53,
    "not_run": 36,
    "total": 766,
    "complete": 766
  },
  "apiThree": {
    "pass": 349,
    "fail": 45,
    "timeout": 14,
    "not_run": 9,
    "total": 523,
    "complete": 417
  }
}
```