|
|
| Line 3: |
Line 3: |
| 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/index.php?title=Bugzilla:REST_API API Calls] | | * [https://wiki.mozilla.org/Bugzilla:REST_API:Calls API Calls] |
| ** [https://wiki.mozilla.org/index.php?title=Bugzilla:REST_API:Search Parameters for the Search call] | | ** [https://wiki.mozilla.org/Bugzilla:REST_API:Search Parameters for the Search call] |
| * [https://wiki.mozilla.org/index.php?title=Bugzilla:REST_API:Objects Objects sent and received] | | * [https://wiki.mozilla.org/Bugzilla:REST_API:Objects Objects sent and received] |
| ** [https://wiki.mozilla.org/index.php?title=Bugzilla:REST_API:Objects:Configuration The Configuration object] | | ** [https://wiki.mozilla.org/Bugzilla:REST_API:Objects:Configuration The Configuration object] |
| * [https://wiki.mozilla.org/index.php?title=Bugzilla:REST_API:HowTo Tips, tricks and code samples] | | * [https://wiki.mozilla.org/Bugzilla:REST_API:HowTo Tips, tricks and code samples] |
|
| |
|
| ==Versions== | | ==Versions== |
| Line 76: |
Line 76: |
| All of the "output" documentation below documents successful returns :-) Calls may also return an [[Bugzilla:REST_API:Objects#Error|Error]]. | | All of the "output" documentation below documents successful returns :-) Calls may also return an [[Bugzilla:REST_API:Objects#Error|Error]]. |
|
| |
|
| The documentation below gives a list of possible values for the "message" field; the list is almost certainly not exhaustive. Error handling is always a large part of any good API, and is one place where this one might be a little rough. In the future, ponies will provide each possible error object with a single unambiguous error code in a "code" field. The other codes are not guaranteed to be present, or continue to be present if they are there now. 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 documentation gives a list of possible values for the "message" field; the list is almost certainly not exhaustive. Error handling is always a large part of any good API, and is one place where this one might be a little rough. In the future, ponies will provide each possible error object with a single unambiguous error code in a "code" field. The other codes are not guaranteed to be present, or continue to be present if they are there now. 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. |
| | |
| == Conflicts ==
| |
| | |
| There are two calls (bug/<id> PUT and attachment/<id> PUT) where you can set any field on that bug or attachment. If you pass a last_change_time, these calls will check for editing conflicts. If you do not, they will unconditionally update the bug to the state you send.
| |
| | |
| If there is a conflict, conflict resolution must be implemented by the client. So if you call /bug/<id> PUT and the bug changed since your GET (i.e. the web interface would mid-air), you'll get an error, and your client will need to GET again, resolve the conflicts with the user using a UI of your choice, and attempt another PUT.
| |
| | |
| == API Calls ==
| |
| | |
| [[Bugzilla:REST_API:Calls|List of API calls, with input and output details and possible errors]].
| |
| | |
| Please note the following:
| |
| | |
| * All times are supplied as UTC, in the ISO 8601 extended format (e.g. "2009-06-21T12:34:56Z"). This should define the time unambiguously, and should be widely and easily parseable, at the expense of probably not being directly displayable without a little manipulation.
| |
| * Votes are not supported.
| |
| * Examples are in JSON format because I had to pick one; see above regarding other formats.
| |
|
| |
|
| ==Your Own Installation== | | ==Your Own Installation== |