Skip to content

Commit 3155dad

Browse files
authored
Merge pull request alexjustesen#75 from svenvg93/api-docs
Add API Server list
2 parents 43b0d47 + 8fd9c0f commit 3155dad

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

api/v1.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ A "Bearer Token" is required to authenticate into the API, you can generate toke
2222
* 200: OK
2323
* 404: Result not found
2424

25-
26-
2725
***
2826

2927
### List results
@@ -36,7 +34,7 @@ curl localhost/api/v1/results
3634
3735
#### Filtering
3836
39-
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\`.
37+
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`.
4038
4139
Example: filter dates in a range
4240
@@ -77,8 +75,6 @@ curl localhost/api/v1/results?sort=-created_at
7775
* 200: OK
7876
* 422: Unprocessable Entity (validation probably failed, see logs)
7977
80-
81-
8278
***
8379
8480
### Get latest result
@@ -94,8 +90,6 @@ curl localhost/api/v1/results/latest
9490
* 200: OK
9591
* 404: No result found
9692
97-
98-
9993
***
10094
10195
### Run speedtest
@@ -118,19 +112,32 @@ curl -X POST localhost/api/v1/speedtests/run
118112
119113
***
120114
121-
### Stats
115+
### Speedtest server list
122116
123117
```bash
124-
curl localhost/api/v1/stats
118+
curl -X POST localhost/api/v1/ookla/list-servers
125119
-H "Accept: application/json"
126120
-H "Authorization: Bearer yourtokengoeshere"
127121
```
128122
129123
#### Responses
130124
131125
* 200: OK
126+
* 403: Forbidden
127+
128+
***
129+
130+
### Stats
132131
132+
```bash
133+
curl localhost/api/v1/stats
134+
-H "Accept: application/json"
135+
-H "Authorization: Bearer yourtokengoeshere"
136+
```
133137
138+
#### Responses
139+
140+
* 200: OK
134141
135142
***
136143
@@ -163,8 +170,6 @@ The data structure returned mimic the `results` table but includes the addition
163170
}
164171
```
165172
166-
167-
168173
***
169174
170175
### FAQ
@@ -176,6 +181,3 @@ The data structure returned mimic the `results` table but includes the addition
176181
No, not at this time its read-only.
177182
178183
</details>
179-
180-
181-

0 commit comments

Comments
 (0)