Closed
Bug 1088253
Opened 6 years ago
Closed 6 years ago
GET REST calls should allow arbitrary URL parameters to be passed in addition the values in the path
Categories
(Bugzilla :: WebService, enhancement)
Bugzilla
WebService
Tracking
()
RESOLVED
FIXED
Bugzilla 5.0
People
(Reporter: dkl, Assigned: dkl)
References
Details
Attachments
(1 file)
2.20 KB,
patch
|
glob
:
review+
|
Details | Diff | Splinter Review |
For example you can currently only get one bug at a time using REST but you can specify multple bug ids using XMLRPC/JSONRPC. So instead of being limited to: https://bugzilla.mozilla.org/rest/bug/35 which only only gets one bug (35) you can do more than one by doing: https://bugzilla.mozilla.org/rest/bug/35?ids=35&ids=36&ids=37 The 'ids' values in URL parameters will override the ids=35 internally. Another option is to make it append to 'ids' instead of overriding 'ids' parameter completely. Will look to see how difficult the latter would be. dkl
Assignee | ||
Comment 1•6 years ago
|
||
Attachment #8510597 -
Flags: review?(glob)
Comment on attachment 8510597 [details] [diff] [review] 1088253_1.patch Review of attachment 8510597 [details] [diff] [review]: ----------------------------------------------------------------- r=glob this works well, but i'd also like to see support for specifying the bugs to get with just query_string params: qr{^/bug/$}, { GET => { method => 'get', }, }, this means instead your example: /rest/bug/35?ids=35&ids=36&ids=37 or, without returning bug 35 twice: /rest/bug/35?ids=36&ids=37 we can write: /rest/bug/?ids=35&ids=36&ids=37 which is clearer, and easier to construct.
Attachment #8510597 -
Flags: review?(glob) → review+
Flags: documentation?
Flags: approval5.0+
Flags: approval+
Target Milestone: --- → Bugzilla 5.0
Assignee | ||
Comment 3•6 years ago
|
||
(In reply to Byron Jones ‹:glob› from comment #2) > this works well, but i'd also like to see support for specifying the bugs to > get with just query_string params: > > qr{^/bug/$}, { > GET => { > method => 'get', > }, > }, > > this means instead your example: > /rest/bug/35?ids=35&ids=36&ids=37 > or, without returning bug 35 twice: > /rest/bug/35?ids=36&ids=37 > we can write: > /rest/bug/?ids=35&ids=36&ids=37 > which is clearer, and easier to construct. You can already sort of do that with Bug.search REST endpoint by doing: /rest/bug?id=35&id=36&id=37 I have made the suggested change with plans to make this all less confusing for REST 2.0. To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 9e0278d..38d2f3a master -> master To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git 1dec043..a3e9de5 5.0 -> 5.0
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•