This specific REST API, generally referred to as "BzAPI", is DEPRECATED. For new projects, use the native REST API instead. The BMO team has implemented a compatibility layer to help existing apps transition off BzAPI onto the native REST API. Please migrate existing BzAPI-based apps to the new compatibility-layer endpoint as soon as possible, as BzAPI will be shut off at some point in the future. Direct any questions to the BMO team.
The native REST API is available in Bugzilla 5.0 and up, and on bugzilla.mozilla.org. Although BzAPI is deprecated, it can be used with older Bugzilla installations (versions prior to 5.0) to provide a REST API.
This page gives details of the configuration object returned by the Bugzilla:BzAPI, and its sub-objects.
Notes
- The idea is that this object is designed for easy lookup of values, so there are a lot of hashes, keyed by name or ID, instead of arrays over which one would have to iterate.
- This is also why many hashes are keyed by name rather than ID - it's because the name is more likely to be what the API user has. You are, of course, at liberty to transform the data structures to key off something else.
- The use of hashes also gives forwards-compatibility. For example, if some fields became product or component-specific, we could add a "fields" member to the hash.
- Classifications are not wrapped around their products in the same way that products are wrapped around their components because the use of classifications is optional, and this would make the top-level field name depend on whether they were switched on or not.
Open Questions
- Are there any more params we should expose?
- Is an "is_for_bugs" boolean the right way of doing the bug vs. attachment choice?
- Does is_on_bug_entry make much sense if a Bugzilla has multiple bug entry templates?
Configuration
Name |
Type |
Notes
|
version |
String |
Bugzilla version
|
maintainer |
User |
|
announcement |
String |
HTML; something the Bugzilla admin wants users to know
|
max_attachment_size |
Integer |
In bytes; useful so clients can prevent large uploads which will fail
|
classification |
Hash of Classification, keyed by name |
Only if useclassifications set
|
product |
Hash of Product, keyed by name |
|
group |
Hash of Group, keyed by name |
|
flag_type |
Hash of FlagType, keyed by ID |
|
field |
Hash of Field, keyed by name |
|
Classification
Name |
Type |
Notes
|
id |
Integer |
|
description |
String |
Textual description
|
product |
Array of String |
Product names
|
Product
Name |
Type |
Notes
|
id |
Integer |
|
description |
String |
Textual description
|
is_active |
Boolean |
Whether product is accepting new bugs and appears on normal lists of products
|
is_permitting_unconfirmed |
Boolean |
Whether product accepts submission of UNCONFIRMED bugs or allows bugs to be switched to that state
|
classification |
String |
Backreference because there is no nesting; only if useclassifications set
|
component |
Hash of Component, indexed by name |
|
version |
Array of String |
Version names
|
target_milestone |
Array of String |
TM names; only if usetargetmilestone set
|
default_target_milestone |
String |
Default value for milestone field; only if usetargetmilestone set
|
group |
Array of String |
Names of groups settable on bugs in this product
|
Component
Name |
Type |
Notes
|
id |
Integer |
|
description |
String |
Textual description
|
flag_type |
Array of Integer |
IDs of flag types settable on bugs/attachments in this component
|
Group
Name |
Type |
Notes
|
id |
Integer |
|
description |
String |
|
is_accepting_bugs |
Boolean |
False means no-one can put a bug into this group; this is not the same as the group being inactive
|
is_active |
Boolean |
|
FlagType
Name |
Type |
Notes
|
name |
String |
|
description |
String |
|
is_for_bugs |
Boolean |
False means "is for attachments"
|
is_requestable |
Boolean |
|
is_specifically_requestable |
Boolean |
|
is_multiplicable |
Boolean |
|
request_group |
String |
Group name
|
grant_group |
String |
Group name
|
Field
Name |
Type |
Notes
|
description |
String |
|
is_active |
Boolean |
Whether field is currently used or not
|
type |
Integer, Enumeration |
FIELD_TYPE_* constants from Constants.pm; 0 means "unknown"
|
is_on_bug_entry |
Boolean |
XXX currently custom fields only
|
values |
Array of String |
Legal values for fields which have fixed set
|
default |
String |
Default value for bug entry, if Bugzilla specifies one
|
open |
Array of String |
'status' field only - open statuses
|
closed |
Array of String |
'status' field only - closed statuses
|
transitions |
Hash of Array of String, keyed by status name |
'status' field only - for each status, a list of valid next statuses; "{Start}" key gives initial statuses
|