Bugzilla:BzAPI:Objects:Configuration: Difference between revisions

Add deprecation notice
No edit summary
(Add deprecation notice)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This page gives details of the configuration object returned by the [[Bugzilla:REST_API]], and its sub-objects.
<div style="border: thin dotted #aaa; padding:5px;">
'''This specific REST API, generally referred to as "BzAPI", is DEPRECATED. For new projects, use the [[Bugzilla:REST_API|native REST API]] instead. The BMO team has implemented a [[Bugzilla:BzAPI:CompatLayer|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.'''
</div><br>
 
This page gives details of the configuration object returned by the [[Bugzilla:BzAPI]], and its sub-objects.


====Notes====
====Notes====


* Some of this is speculative; that is to say, config.cgi?ctype=rdf doesn't (yet) provide all the information specced here.
* 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.
* 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.
* 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.
* 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.
* 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==
==Configuration==
Line 16: Line 27:
|version||String||Bugzilla version
|version||String||Bugzilla version
|-
|-
|maintainer||[[Bugzilla:REST_API:Objects#User|User]]||
|maintainer||[[Bugzilla:BzAPI:Objects#User|User]]||
|-
|-
|announcement||String||XXXunimplemented HTML; something the Bugzilla admin wants users to know
|announcement||String||HTML; something the Bugzilla admin wants users to know
|-
|-
|max_attachment_size||Integer||XXXunimplemented In bytes; useful so clients can prevent large uploads which will fail
|max_attachment_size||Integer||In bytes; useful so clients can prevent large uploads which will fail
|-
|-
|classifications||Hash of [[Bugzilla:REST_API:Objects:Configuration#Classification|Classification]], keyed by name||XXXunimplemented Only if useclassifications set
|classification||Hash of [[Bugzilla:BzAPI:Objects:Configuration#Classification|Classification]], keyed by name||Only if useclassifications set
|-
|-
|products||Hash of [[Bugzilla:REST_API:Objects:Configuration#Product|Product]], keyed by name||  
|product||Hash of [[Bugzilla:BzAPI:Objects:Configuration#Product|Product]], keyed by name||  
|-
|-
|groups||Hash of [[Bugzilla:REST_API:Objects:Configuration#Group|Group]], keyed by name||  
|group||Hash of [[Bugzilla:BzAPI:Objects:Configuration#Group|Group]], keyed by name||  
|-
|-
|flag_types||Hash of [[Bugzilla:REST_API:Objects:Configuration#FlagType|FlagType]], keyed by ID||  
|flag_type||Hash of [[Bugzilla:BzAPI:Objects:Configuration#FlagType|FlagType]], keyed by ID||  
|-
|-
|fields||Hash of [[Bugzilla:REST_API:Objects:Configuration#Field|Field]], keyed by name||  
|field||Hash of [[Bugzilla:BzAPI:Objects:Configuration#Field|Field]], keyed by name||  
|}
|}


Line 39: Line 50:
|-
|-
|id||Integer||
|id||Integer||
|-
|description||String||Textual description
|-
|-
|product||Array of String||Product names
|product||Array of String||Product names
Line 48: Line 61:
!Name!!Type!!Notes
!Name!!Type!!Notes
|-
|-
|id||Integer||XXXunimplemented
|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||XXXunimplemented Backreference because there is no nesting
|classification||String||Backreference because there is no nesting; only if useclassifications set
|-
|-
|component||Hash of [[Bugzilla:REST_API:Objects:Configuration#Component|Component]], indexed by name||
|component||Hash of [[Bugzilla:BzAPI:Objects:Configuration#Component|Component]], indexed by name||
|-
|-
|version||Array of String||Version names
|version||Array of String||Version names
|-
|-
|target_milestone||Array of String||TM names; only if usetargetmilestone set
|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
|group||Array of String||Names of groups settable on bugs in this product
Line 68: Line 89:
|id||Integer||
|id||Integer||
|-
|-
|flag_type||Array of Integer||Flag type IDs
|description||String||Textual description
|-
|flag_type||Array of Integer||IDs of flag types settable on bugs/attachments in this component
|}
|}


Line 80: Line 103:
|description||String||
|description||String||
|-
|-
|is_accepting_bugs||Boolean||
|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||
|is_active||Boolean||
Line 114: Line 137:
|description||String||
|description||String||
|-
|-
|type||[[Bugzilla:REST_API:Objects:Configuration#FieldType|FieldType]]||
|is_active||Boolean||Whether field is currently used or not
|-
|-
|is_on_bug_entry||Boolean||
|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
|values||Array of String||Legal values for fields which have fixed set
|-
|-
|default||String||Default value, if Bugzilla specifies one
|default||String||Default value for bug entry, if Bugzilla specifies one
|-
|open||Array of [[Bugzilla:REST_API:Objects:Configuration#Status|Status]]||'status' field only - open statuses
|-
|closed||Array of [[Bugzilla:REST_API:Objects:Configuration#Status|Status]]||'status' field only - closed statuses
|}
 
====FieldType====
 
{| border="1"
!Name!!Type!!Notes
|-
|id||Integer||
|-
|-
|description||String||
|open||Array of String||'status' field only - open statuses
|}
 
====Status====
 
{| border="1"
!Name!!Type!!Notes
|-
|-
|name||String||
|closed||Array of String||'status' field only - closed statuses
|-
|-
|next_values||Array of String||Valid statuses you can transition to next
|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
|}
|}
Confirmed users
1,927

edits