1WAIVERDB(7)                        WaiverDB                        WAIVERDB(7)
2
3
4

NAME

6       waiverdb - WaiverDB REST API
7
8       WavierDB offers a HTTP REST API.
9

REST API

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

AUTHOR

309       Red Hat, Inc. and others
310
312       2017, Red Hat, Inc. and others
313
314
315
316
3170.14                             Feb 12, 2019                      WAIVERDB(7)
Impressum