Closed Bug 1503182 Opened 7 years ago Closed 7 years ago

Fix data type of native bug count API return value

Categories

(bugzilla.mozilla.org :: API, defect)

Production
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: emorley, Assigned: kohei)

References

Details

Attachments

(1 file)

Hi! With BzAPI, I can fetch counts of bugs using queries like: ttps://bugzilla.mozilla.org/bzapi/count?keywords=intermittent-failure&chfieldfr om=-1y However there doesn't appear to be a REST API equivalent, since this doesn't work: https://bugzilla.mozilla.org/rest/count?keywords=intermittent-failure&chfieldfrom=-1y ...and I can't find an alternative endpoint documented on: https://bugzilla.readthedocs.io/en/latest/api/core/v1/bug.html Or if this feature already exists, could it be added to the RTD docs? Many thanks :-)
Here we go :-) https://bugzilla.mozilla.org/rest/bug?keywords=intermittent-failure&chfieldfrom=-1y&count_only=true It has to be documented, and the value should be a number instead of a string.
Summary: Add native REST API for fetching counts of bugs that match search criteria → Document native REST API for fetching counts of bugs that match search criteria
Ah awesome thank you :-)
The `count_only` param was added in Bug 920060 and documented in Bug 1250911, but only in the BMO docs. The upstream docs will be updated once Bugzilla 6 is shipped, I guess. I’ll fix the data type only. https://bmo.readthedocs.io/en/latest/api/core/v1/bug.html https://bugzilla.readthedocs.io/en/latest/api/core/v1/bug.html
Assignee: nobody → kohei.yoshino
Status: NEW → ASSIGNED
Summary: Document native REST API for fetching counts of bugs that match search criteria → Fix data type of native bug count API return value
Version: Staging → Production
Ah ok. The reason I ended up on the `bugzilla.readthedocs.io` docs was that googling "bugzilla mozilla api docs" gave the top result of: https://wiki.mozilla.org/Bugzilla:REST_API ...which links to: http://bugzilla.readthedocs.org/en/latest/api/index.html
Attached file GitHub Pull Request
Merged to master
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Depends on: 1505762
No longer depends on: 1505762
Regressions: 1505762
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: