Confirmed users
1,927
edits
(link to BMO/REST) |
mNo edit summary |
||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<div style="border: thin dotted #aaa; padding:5px;"> | <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> | |||
These pages document the tip of the HTTP REST API for Bugzilla proxy software ("BzAPI"). Please file bugs (in either code or documentation) in [https://bugzilla.mozilla.org/enter_bug.cgi?product=Webtools&component=BzAPI the BzAPI component in bugzilla.mozilla.org]. | These pages document the tip of the HTTP REST API for Bugzilla proxy software ("BzAPI"). Please file bugs (in either code or documentation) in [https://bugzilla.mozilla.org/enter_bug.cgi?product=Webtools&component=BzAPI the BzAPI component in bugzilla.mozilla.org]. | ||
Line 6: | Line 9: | ||
This page contains general information and preliminaries. Read it first. Then, you can find more detailed information: | This page contains general information and preliminaries. Read it first. Then, you can find more detailed information: | ||
* [https://wiki.mozilla.org/Bugzilla: | * [https://wiki.mozilla.org/Bugzilla:BzAPI:Methods API Methods] | ||
** [https://wiki.mozilla.org/Bugzilla: | ** [https://wiki.mozilla.org/Bugzilla:BzAPI:Search Parameters for the Search method] | ||
* [https://wiki.mozilla.org/Bugzilla: | * [https://wiki.mozilla.org/Bugzilla:BzAPI:Objects Objects sent and received] | ||
** [https://wiki.mozilla.org/Bugzilla: | ** [https://wiki.mozilla.org/Bugzilla:BzAPI:Objects:Configuration The Configuration object] | ||
* [https://wiki.mozilla.org/Bugzilla: | * [https://wiki.mozilla.org/Bugzilla:BzAPI:HowTo Tips, tricks and code samples] | ||
==Versions== | ==Versions== | ||
Line 18: | Line 21: | ||
===Version 1.3 (7th March 2013)=== | ===Version 1.3 (7th March 2013)=== | ||
* [https://wiki.mozilla.org/index.php?title=Bugzilla: | * [https://wiki.mozilla.org/index.php?title=Bugzilla:BzAPI&oldid=538111 Overview] | ||
* [https://wiki.mozilla.org/index.php?title=Bugzilla: | * [https://wiki.mozilla.org/index.php?title=Bugzilla:BzAPI:Methods&oldid=436589 API Methods] | ||
** [https://wiki.mozilla.org/index.php?title=Bugzilla: | ** [https://wiki.mozilla.org/index.php?title=Bugzilla:BzAPI:Search&oldid=483668 Parameters for the Search method] | ||
* [https://wiki.mozilla.org/index.php?title=Bugzilla: | * [https://wiki.mozilla.org/index.php?title=Bugzilla:BzAPI:Objects&oldid=537941 Objects sent and received] | ||
** [https://wiki.mozilla.org/index.php?title=Bugzilla: | ** [https://wiki.mozilla.org/index.php?title=Bugzilla:BzAPI:Objects:Configuration&oldid=265440 The Configuration object] | ||
* [https://wiki.mozilla.org/index.php?title=Bugzilla: | * [https://wiki.mozilla.org/index.php?title=Bugzilla:BzAPI:HowTo&oldid=489309 Tips, tricks and code samples] | ||
===Version 1.2 (21st November 2012)=== | ===Version 1.2 (21st November 2012)=== | ||
* [https://wiki.mozilla.org/index.php?title=Bugzilla: | * [https://wiki.mozilla.org/index.php?title=Bugzilla:BzAPI&oldid=358475 Overview] | ||
* [https://wiki.mozilla.org/index.php?title=Bugzilla: | * [https://wiki.mozilla.org/index.php?title=Bugzilla:BzAPI:Methods&oldid=436589 API Methods] | ||
** [https://wiki.mozilla.org/index.php?title=Bugzilla: | ** [https://wiki.mozilla.org/index.php?title=Bugzilla:BzAPI:Search&oldid=483668 Parameters for the Search method] | ||
* [https://wiki.mozilla.org/index.php?title=Bugzilla: | * [https://wiki.mozilla.org/index.php?title=Bugzilla:BzAPI:Objects&oldid=292055 Objects sent and received] | ||
** [https://wiki.mozilla.org/index.php?title=Bugzilla: | ** [https://wiki.mozilla.org/index.php?title=Bugzilla:BzAPI:Objects:Configuration&oldid=265440 The Configuration object] | ||
* [https://wiki.mozilla.org/index.php?title=Bugzilla: | * [https://wiki.mozilla.org/index.php?title=Bugzilla:BzAPI:HowTo&oldid=295460 Tips, tricks and code samples] | ||
==Servers== | ==Servers== | ||
Line 98: | Line 101: | ||
== Errors == | == Errors == | ||
If methods are not successful for whatever reason, they will return an [[Bugzilla: | If methods are not successful for whatever reason, they will return an [[Bugzilla:BzAPI:Objects#Error|Error]]. ''You should test every API return to see if it is an error ("error" member set to a true value).'' | ||
The "code" field on an Error, if present, will give an error code from [[Bugzilla:WebServices:Errors|this list]]. The other member variables of the object are not stable, and should not be relied upon. The html_page, in particular, is only there so you can read it manually for a better idea of what the error was, and ask for the API to support it properly. | The "code" field on an Error, if present, will give an error code from [[Bugzilla:WebServices:Errors|this list]]. The other member variables of the object are not stable, and should not be relied upon. The html_page, in particular, is only there so you can read it manually for a better idea of what the error was, and ask for the API to support it properly. | ||
Line 144: | Line 147: | ||
Secondly, if you are using non-ASCII characters at all, you need to patch the BZ::Client module, which has an encoding bug. The patch for that is also in the <tt>patches</tt> directory. | Secondly, if you are using non-ASCII characters at all, you need to patch the BZ::Client module, which has an encoding bug. The patch for that is also in the <tt>patches</tt> directory. | ||
[[category:Bugzilla]] |