1WAIVERDB(7) WaiverDB WAIVERDB(7)
2
3
4
6 waiverdb - WaiverDB REST API
7
8 WavierDB offers a HTTP REST API.
9
11 GET /api/v1.0/about
12 Returns the current running version and the method used for
13 authentication.
14
15 Sample response:
16
17 HTTP/1.0 200 OK
18 Content-Length: 55
19 Content-Type: application/json
20 Date: Tue, 31 Oct 2017 04:29:19 GMT
21 Server: Werkzeug/0.11.10 Python/2.7.13
22
23 {
24 "auth_method": "OIDC",
25 "version": "0.3.1"
26 }
27
28 Status Codes
29
30 · 200 OK – Currently running waiverdb software version
31 and authentication are returned.
32
33 GET /api/v1.0/config
34 Returns the current configuration (PERMISSION_MAPPING and SUPE‐
35 RUSERS).
36
37 Sample response:
38
39 HTTP/1.0 200 OK
40 Content-Length: 55
41 Content-Type: application/json
42 Date: Tue, 31 Oct 2017 04:29:19 GMT
43 Server: Werkzeug/0.11.10 Python/2.7.13
44
45 {
46 "permission_mapping": {
47 "^kernel-qe": {
48 "groups": ["devel", "qa"],
49 "users": []
50 }
51 },
52 "superusers": ["alice", "bob"]
53 }
54
55 Status Codes
56
57 · 200 OK – Configuration is returned.
58
59 GET /api/v1.0/waivers/
60 Get waiver records.
61
62 Sample request:
63
64 GET /api/v1.0/waivers/ HTTP/1.1
65 Host: localhost:5004
66 User-Agent: curl/7.51.0
67 Accept: application/json
68
69 Sample response:
70
71 HTTP/1.1 200 OK
72 Content-Type: application/json
73 Content-Length: 184
74 Server: Werkzeug/0.12.1 Python/2.7.13
75 Date: Thu, 16 Mar 2017 13:53:14 GMT
76
77 {
78 "data": [],
79 "first": "http://localhost:5004/api/v1.0/waivers/?page=1",
80 "last": "http://localhost:5004/api/v1.0/waivers/?page=0",
81 "next": null,
82 "prev": null
83 }
84
85 Query Parameters
86
87 · page (int) – The page to get.
88
89 · limit (int) – Limit the number of items returned.
90
91 · subject_type (string) – Only include waivers for the
92 given subject type.
93
94 · subject_identifier (string) – Only include waivers for
95 the given subject identifier.
96
97 · testcase (string) – Only include waivers for the given
98 test case name.
99
100 · scenario (string) – Only include waivers for the given
101 scenario name.
102
103 · product_version (string) – Only include waivers for the
104 given product version.
105
106 · username (string) – Only include waivers which were
107 submitted by the given user.
108
109 · proxied_by (string) – Only include waivers which were
110 proxied on behalf of someone else by the given user.
111
112 · since (string) – An ISO 8601 formatted datetime (e.g.
113 2017-03-16T13:40:05+00:00) to filter results by.
114 Optionally provide a second ISO 8601 datetime separated
115 by a comma to retrieve a range (e.g.
116 2017-03-16T13:40:05+00:00, 2017-03-16T13:40:15+00:00)
117
118 · include_obsolete (boolean) – If true, obsolete waivers
119 will be included.
120
121 Status Codes
122
123 · 200 OK – If the query was valid and no problems were
124 encountered. Note that the response may still contain
125 0 waivers.
126
127 · 400 Bad Request – The request was malformed and could
128 not be processed.
129
130 POST /api/v1.0/waivers/
131 Create a new waiver or multiple waivers.
132
133 To create multiple waivers, pass list of dict instead. Response
134 also contains list on success.
135
136 Sample request:
137
138 POST /api/v1.0/waivers/ HTTP/1.1
139 Host: localhost:5004
140 Accept-Encoding: gzip, deflate
141 Accept: application/json
142 Connection: keep-alive
143 User-Agent: HTTPie/0.9.4
144 Content-Type: application/json
145 Content-Length: 91
146
147 {
148 "subject_type": "compose",
149 "subject_identifier": "Fedora-9000-19700101.n.18",
150 "testcase": "compose.install_no_user",
151 "waived": false,
152 "product_version": "Parrot",
153 "comment": "This is fine"
154 }
155
156 Sample response:
157
158 HTTP/1.0 201 CREATED
159 Content-Length: 228
160 Content-Type: application/json
161 Date: Thu, 16 Mar 2017 17:42:04 GMT
162 Server: Werkzeug/0.12.1 Python/2.7.13
163
164 {
165 "comment": "This is fine",
166 "id": 15,
167 "product_version": "Parrot",
168 "subject_type": "compose",
169 "subject_identifier": "Fedora-9000-19700101.n.18",
170 "testcase": "compose.install_no_user",
171 "scenario": null,
172 "timestamp": "2017-03-16T17:42:04.209638",
173 "username": "jcline",
174 "waived": false,
175 "proxied_by": null
176 }
177
178 JSON Parameters
179
180 · subject_type (string) – The type of thing which this
181 waiver is for.
182
183 · subject_identifier (string) – The identifier of the
184 thing this waiver is for. The semantics of this identi‐
185 fier depend on the “subject_type”. For example, Koji
186 builds are identified by their NVR.
187
188 · testcase (string) – The result testcase for the waiver.
189
190 · scenario (string) – The result scenario for the waiver.
191
192 · waived (boolean) – Whether or not the result is waived.
193
194 · product_version (string) – The product version string.
195
196 · comment (string) – A comment explaining the waiver.
197
198 · username (string) – Username on whose behalf the caller
199 is proxying.
200
201 Status Codes
202
203 · 201 Created – The waiver was successfully created.
204
205 POST /api/v1.0/waivers/+by-subjects-and-testcases
206 Deprecated. Use POST /api/v1.0/waivers/+filtered instead.
207
208 Instead of making a deprecated request like this:
209
210 POST /api/v1.0/waivers/+by-subjects-and-testcases HTTP/1.1
211 Content-Type: application/json
212
213 {
214 "results": [
215 {
216 "subject": {"productmd.compose.id": "Fedora-9000-19700101.n.18"},
217 "testcase": "compose.install_no_user"
218 },
219 {
220 "subject": {"item": "gzip-1.9-1.fc28", "type": "koji_build"},
221 "testcase": "dist.rpmlint"
222 }
223 ]
224 }
225
226 make the following equivalent request:
227
228 POST /api/v1.0/waivers/+filtered HTTP/1.1
229 Content-Type: application/json
230
231 {
232 "filters": [
233 {
234 "subject_type": "compose",
235 "subject_identifier": "Fedora-9000-19700101.n.18",
236 "testcase": "compose.install_no_user"
237 },
238 {
239 "subject_type": "koji_build",
240 "subject_identifier": "gzip-1.9-1.fc28",
241 "testcase": "dist.rpmlint"
242 }
243 ]
244 }
245
246 POST /api/v1.0/waivers/+filtered
247 Get waiver records, filtered by some criteria.
248
249 This API behaves the same way as GET /api/v1.0/waivers/, but it
250 allows for longer or more complex filter criteria that cannot be
251 expressed in the query string.
252
253 Note that the response is not paginated (that is, all waivers
254 are returned in the ‘data’ key, even if there is a large number
255 of them).
256
257 Sample request:
258
259 POST /api/v1.0/waivers/+filtered HTTP/1.1
260 Accept: application/json
261 Content-Type: application/json
262
263 {
264 "filters": [
265 {
266 "subject_type": "compose",
267 "subject_identifier": "Fedora-9000-19700101.n.18",
268 "testcase": "compose.install_no_user"
269 },
270 {
271 "subject_type": "koji_build",
272 "subject_identifier": "gzip-1.9-1.fc28",
273 "testcase": "dist.rpmlint"
274 }
275 ]
276 }
277
278 Sample response:
279
280 HTTP/1.1 200 OK
281 Content-Type: application/json
282
283 {
284 "data": [
285 {
286 "id": 15,
287 "comment": "The tests broke",
288 "product_version": "fedora-27",
289 "subject_type": "compose",
290 "subject_identifier": "Fedora-9000-19700101.n.18",
291 "testcase": "compose.install_no_user",
292 "scenario": null,
293 "timestamp": "2017-03-16T17:42:04.209638",
294 "username": "jcline",
295 "waived": true,
296 "proxied_by": null
297 }
298 ]
299 }
300
301 JSON Parameters
302
303 · filters (list) – List of filter dicts. If the list con‐
304 tains multiple filter dicts, they are combined with
305 logical OR. Within each filter dict, the criteria are
306 combined with logical AND. Keys within the filter dict
307 are the same as the filtering parameters accepted by
308 GET /api/v1.0/waivers/.
309
310 · include_obsolete (boolean) – If true, obsolete waivers
311 will be included.
312
313 Status Codes
314
315 · 200 OK – Returns matching waivers, if any.
316
317 · 400 Bad Request – The request was malformed (invalid
318 filter critera).
319
320 GET /api/v1.0/waivers/(int: waiver_id)
321 Get a single waiver by waiver ID.
322
323 Parameters
324
325 · waiver_id (int) – The waiver’s database ID.
326
327 Status Codes
328
329 · 200 OK – The waiver was found and returned.
330
331 · 404 Not Found – No waiver exists with that ID.
332
333 GET /healthcheck
334 Request handler for performing an application-level health
335 check. This is not part of the published API, it is intended for
336 use by OpenShift or other monitoring tools.
337
338 Returns a 200 response if the application is alive and able to
339 serve requests.
340
342 Red Hat, Inc. and others
343
345 2021, Red Hat, Inc. and others
346
347
348
349
3501.2 Jan 12, 2021 WAIVERDB(7)