-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.yml
182 lines (170 loc) · 5.69 KB
/
api.yml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
swagger: '2.0'
info:
title: OONI Pipeline
description: A public interface to the OONI Pipeline
version: "1.0.0"
# the domain of the service
host: api.ooni.io
# array of all schemes that your API supports
schemes:
- https
# will be prefixed to all paths
basePath: /v1
produces:
- application/json
paths:
/reports:
get:
summary: List reports
description: |
This will return all the OONI reports in the database
parameters:
- name: offset
in: query
type: integer
format: int32
description: Offset the list of returned results by this amount. Default is zero.
- name: limit
in: query
type: integer
format: int32
description: Number of items to retrieve. Default is 5, maximum is 100.
required: false
- name: fields
in: query
type: array
description: 'The fields that should be set in the returned reports defaults
to [options, probe_asn, probe_cc, probe_ip, software_name, software_version,
start_time, test_name, test_version, data_format_version, report_id, test_helpers]'
items:
type: string
- name: start_date
in: query
description: The start date to search reports for.
required: false
type: string
format: date
- name: end_date
in: query
description: The end date to search reports for.
required: false
type: string
format: date
- name: probe_asn
in: query
type: string
description: The AS Number of the probe (prefixed by AS, ex. AS1234) or null if includeasn is set to false.
required: false
- name: probe_cc
in: query
type: string
description: The two letter country code of the probe or null if inlcudecc is set to false.
required: false
- name: probe_ip
in: query
type: string
description: The IPv4 address of the probe or null if includeip is set to false.
required: false
- name: software_name
in: query
type: string
description: The name of the software that has generated such report (ex. ooniprobe).
required: false
- name: software_version
in: query
type: string
description: The version of the software that has generated such report (ex. 0.0.10).
required: false
- name: test_name
in: query
type: string
description: The name of the test that such report is for (ex. HTTP Requests).
required: false
- name: test_version
in: query
type: string
description: The version of the test that such report is for (ex. 0.0.10).
required: false
- name: data_format_version
in: query
type: string
description: The version string of the data format being used by the test (ex. httpt-000)
required: false
- name: report_id
in: query
type: string
description: A 64 character mixed case string that is generated by the client used to identify the report.
required: false
- name: test_helpers
in: query
type: string
description: A dictionary with as keys the names of the options and values the addresses of the test helpers used.
required: false
tags:
- Open Data
responses:
200:
description: An array of Reports
schema:
type: array
items:
$ref: '#/definitions/Report'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
definitions:
Report:
properties:
options:
type: string
description: A dict containing the keys and values of options passed to the test.
probe_asn:
type: string
description: The AS Number of the probe (prefixed by AS, ex. AS1234) or null if includeasn is set to false.
probe_cc:
type: string
description: The two letter country code of the probe or null if inlcudecc is set to false.
probe_ip:
type: string
description: The IPv4 address of the probe or null if includeip is set to false.
software_name:
type: string
description: The name of the software that has generated such report (ex. ooniprobe).
software_version:
type: string
description: The version of the software that has generated such report (ex. 0.0.10).
start_time:
type: string
description: The time at which the test was started in seconds since epoch.
test_name:
type: string
description: The name of the test that such report is for (ex. HTTP Requests).
test_version:
type: string
description: The version of the test that such report is for (ex. 0.0.10).
data_format_version:
type: string
description: The version string of the data format being used by the test (ex. httpt-000)
report_id:
type: string
description: A 64 character mixed case string that is generated by the client used to identify the report.
measurements:
type: array
description: An array of measurements
items:
$ref: '#/definitions/Measurement'
Measurement:
properties:
start_time:
type: integer
format: int32
Error:
properties:
code:
type: integer
format: int32
message:
type: string
fields:
type: string