Open Bug 1169040 Opened 9 years ago Updated 5 years ago

Cannot retrieve multiple bugs/users when one or more entries are private or not found

Categories

(Bugzilla :: WebService, defect)

defect
Not set
normal

Tracking

()

REOPENED

People

(Reporter: kohei, Unassigned)

References

Details

We can retrieve multiple bugs at once by using the ids params, but if one or more bugs in the list are marked as private, the response will be 401 Authorization Required with a single error object.

https://bugzilla.mozilla.org/rest/bug/1144468?ids=1144468&ids=1163761&ids=1164495

Same applies to the user method. When one or more users cannot be found, it returns 400 Bad Request with an error object.

https://bugzilla.mozilla.org/rest/user?names=kohei.yoshino@gmail.com&names=kohei.yoshino.bugs@gmail.com

With the REST API v2, hopefully it would return a combination of bug objects for public/existing bugs/users and error objects for private/non-existent bugs/users so at least public data can be retrieved as expected.
Actually an error object for private bugs would be nice to have the status and resolution fields, because Bugzilla itself exposes those basic info in a tooltip on other public bugs.
I spoke with kohei on IRC, bug 1283392 is actually a different bug.

A query like 'https://bugzilla.mozilla.org/rest/bug?id=1144468&id=1163761&id=1164495' should do what you want,
but it will not contain the 'status' and 'resolution' for the private bugs.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
I think this is still relevant.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
(In reply to Kohei Yoshino [:kohei] from comment #4)
> I think this is still relevant.

Doesn't what I suggested in comment 3 do what you want?
If it doesn't, I think you should change the bug title to specify what you meant.
Blocks: 1529362

I think I’ve missed :marco’s Comment 3. Results are returned properly with /rest/bug?[query]. Private bugs are not included, but it’s fine while creating new bug lists. Unblocking Bug 1529362.

No longer blocks: 1529362
See Also: → 1283392

While working on Bug 1283392, I have noticed that /rest/bug supports the experimental, undocumented permissive param that returns an error object rather than skipping private bugs. The param is apparently not working for some reason, but this should be the default behaviour in our next generation API.

You need to log in before you can comment on or make changes to this bug.