This page gives details of the configuration object returned by the Bugzilla:REST_API, 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. He is, 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, like maxattachmentsize?
- Are there any more hashes, apart from flag_types, which should be keyed by ID rather than name? Should we be using group IDs rather than names?
- Should request_group and grant_group on flag_types be Arrays rather than Strings, for forwards-compatibility?
- 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 |
|
product |
Array of String |
Product names
|
Product
Name |
Type |
Notes
|
id |
Integer |
|
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
|
group |
Array of String |
Names of groups settable on bugs in this product
|
Component
Name |
Type |
Notes
|
id |
Integer |
|
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 |
|
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 |
XXXunimplemented 'status' field only - for each status, a list of valid next statuses; "Start" key gives initial statuses
|