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       POST /api/v1.0/waivers/
34              Create a new waiver or multiple waivers.
35
36              To  create multiple waivers, pass list of dict instead. Response
37              also contains list on success.
38
39              Sample request:
40
41                 POST /api/v1.0/waivers/ HTTP/1.1
42                 Host: localhost:5004
43                 Accept-Encoding: gzip, deflate
44                 Accept: application/json
45                 Connection: keep-alive
46                 User-Agent: HTTPie/0.9.4
47                 Content-Type: application/json
48                 Content-Length: 91
49
50                 {
51                     "subject_type": "compose",
52                     "subject_identifier": "Fedora-9000-19700101.n.18",
53                     "testcase": "compose.install_no_user",
54                     "waived": false,
55                     "product_version": "Parrot",
56                     "comment": "This is fine"
57                 }
58
59              Sample response:
60
61                 HTTP/1.0 201 CREATED
62                 Content-Length: 228
63                 Content-Type: application/json
64                 Date: Thu, 16 Mar 2017 17:42:04 GMT
65                 Server: Werkzeug/0.12.1 Python/2.7.13
66
67                 {
68                     "comment": "This is fine",
69                     "id": 15,
70                     "product_version": "Parrot",
71                     "subject_type": "compose",
72                     "subject_identifier": "Fedora-9000-19700101.n.18",
73                     "testcase": "compose.install_no_user",
74                     "timestamp": "2017-03-16T17:42:04.209638",
75                     "username": "jcline",
76                     "waived": false,
77                     "proxied_by": null
78                 }
79
80              JSON Parameters
81
82                     · subject_type (string) – The type of  thing  which  this
83                       waiver is for.
84
85                     · subject_identifier  (string)  –  The  identifier of the
86                       thing this waiver is for. The semantics of this identi‐
87                       fier  depend  on  the “subject_type”. For example, Koji
88                       builds are identified by their NVR.
89
90                     · testcase (string) – The result testcase for the waiver.
91
92                     · waived (boolean) – Whether or not the result is waived.
93
94                     · product_version (string) – The product version string.
95
96                     · comment (string) – A comment explaining the waiver.
97
98                     · username (string) – Username on whose behalf the caller
99                       is proxying.
100
101              Status Codes
102
103                     · 201 Created – The waiver was successfully created.
104
105       GET /api/v1.0/waivers/
106              Get waiver records.
107
108              Sample request:
109
110                 GET /api/v1.0/waivers/ HTTP/1.1
111                 Host: localhost:5004
112                 User-Agent: curl/7.51.0
113                 Accept: application/json
114
115              Sample response:
116
117                 HTTP/1.1 200 OK
118                 Content-Type: application/json
119                 Content-Length: 184
120                 Server: Werkzeug/0.12.1 Python/2.7.13
121                 Date: Thu, 16 Mar 2017 13:53:14 GMT
122
123                 {
124                     "data": [],
125                     "first": "http://localhost:5004/api/v1.0/waivers/?page=1",
126                     "last": "http://localhost:5004/api/v1.0/waivers/?page=0",
127                     "next": null,
128                     "prev": null
129                 }
130
131              Query Parameters
132
133                     · page (int) – The page to get.
134
135                     · limit (int) – Limit the number of items returned.
136
137                     · subject_type  (string)  –  Only include waivers for the
138                       given subject type.
139
140                     · subject_identifier (string) – Only include waivers  for
141                       the given subject identifier.
142
143                     · testcase  (string) – Only include waivers for the given
144                       test case name.
145
146                     · product_version (string) – Only include waivers for the
147                       given product version.
148
149                     · username  (string)  –  Only  include waivers which were
150                       submitted by the given user.
151
152                     · proxied_by (string) – Only include waivers  which  were
153                       proxied on behalf of someone else by the given user.
154
155                     · since  (string)  – An ISO 8601 formatted datetime (e.g.
156                       2017-03-16T13:40:05+00:00)  to   filter   results   by.
157                       Optionally provide a second ISO 8601 datetime separated
158                       by   a   comma    to    retrieve    a    range    (e.g.
159                       2017-03-16T13:40:05+00:00, 2017-03-16T13:40:15+00:00)
160
161                     · include_obsolete  (boolean) – If true, obsolete waivers
162                       will be included.
163
164              Status Codes
165
166                     · 200 OK – If the query was valid and  no  problems  were
167                       encountered.   Note that the response may still contain
168                       0 waivers.
169
170                     · 400 Bad Request – The request was malformed  and  could
171                       not be processed.
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