Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions api/v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ A "Bearer Token" is required to authenticate into the API, you can generate toke
* 200: OK
* 404: Result not found



***

### List results
Expand All @@ -36,7 +34,7 @@ curl localhost/api/v1/results

#### Filtering

You can filter the results response by the fields: `ping`, `download`, `upload`, `healthy`, `status`, `scheduled` and `created_at`. To filter on `created_at` use `start_at`and \`end\_at\`.
You can filter the results response by the fields: `ping`, `download`, `upload`, `healthy`, `status`, `scheduled` and `created_at`. To filter on `created_at` use `start_at`and `end_at`.

Example: filter dates in a range

Expand Down Expand Up @@ -77,8 +75,6 @@ curl localhost/api/v1/results?sort=-created_at
* 200: OK
* 422: Unprocessable Entity (validation probably failed, see logs)



***

### Get latest result
Expand All @@ -94,8 +90,6 @@ curl localhost/api/v1/results/latest
* 200: OK
* 404: No result found



***

### Run speedtest
Expand All @@ -118,19 +112,32 @@ curl -X POST localhost/api/v1/speedtests/run

***

### Stats
### Speedtest server list

```bash
curl localhost/api/v1/stats
curl -X POST localhost/api/v1/ookla/list-servers
-H "Accept: application/json"
-H "Authorization: Bearer yourtokengoeshere"
```

#### Responses

* 200: OK
* 403: Forbidden

***

### Stats

```bash
curl localhost/api/v1/stats
-H "Accept: application/json"
-H "Authorization: Bearer yourtokengoeshere"
```

#### Responses

* 200: OK

***

Expand Down Expand Up @@ -163,8 +170,6 @@ The data structure returned mimic the `results` table but includes the addition
}
```



***

### FAQ
Expand All @@ -176,6 +181,3 @@ The data structure returned mimic the `results` table but includes the addition
No, not at this time its read-only.

</details>