Bugzilla:API Comparison: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 73: Line 73:


* /bug POST -- Bug.create
* /bug POST -- Bug.create
The BzAPI call is backed by the RPC call, so they are quite similar.
Differences:
* The BzAPI call takes the initial description as a single member of the "comments" array rather than as a single-valued field called "description".
* The BzAPI call takes User objects rather than flat email addresses.
* The BzAPI call accepts any fields; it does a behind-the-scenes update for any fields not set in the initial Bug.create call. The RPC call only takes a [http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Bug.html#create limited set of fields].


===Retrieve bug===
===Retrieve bug===
Line 85: Line 93:


* /bug/<id>/comment GET -- Bug.comments
* /bug/<id>/comment GET -- Bug.comments
The BzAPI call is backed by the RPC call, so they are quite similar.
Differences:
* The BzAPI call only works for a single bug, as specified in the URL used. The RPC call works for multiple bugs.
* The RPC call can request comments by ID; the BzAPI does not have that ability.
* BzAPI returns User objects rather than bare email addresses
* BzAPI does not return the bug_id field for each comment
* BzAPI returns attachment_ref fields if there is an attachment_id
* BzAPI does not return the "count" field (for consistency; as it's new - code comment says "feel free to add it back when making native" :-)
* BzAPI does not return the (deprecated) "time" field; it returns "creation_time" (which RPC also returns).


===Add new comment to bug===
===Add new comment to bug===


* /bug/<id>/comment POST -- Bug.add_comment
* /bug/<id>/comment POST -- Bug.add_comment
The BzAPI call is backed by the RPC call, so they are quite similar.
Differences:
* BzAPI does not support the "work_time" parameter.
* BzAPI return value includes a "ref" as well as an "id".


===List history for bug===
===List history for bug===


* /bug/<id>/history GET -- Bug.history
* /bug/<id>/history GET -- Bug.history
The BzAPI call is backed by the RPC call, so they are quite similar.
Differences:
* RPC "who" field is "changer" in BzAPI
* RPC "when" field is "change_time" in BzAPI
* The BzAPI call uses consistent, modern field names for the 'field_name' field on each history entry
* The BzAPI call returns User objects rather than email addresses for the 'changer' field


===List attachments for bug===
===List attachments for bug===
Line 109: Line 145:


* /user GET -- User.get
* /user GET -- User.get
The BzAPI call is backed by the RPC call, so they are quite similar.
Differences:
* REST only supports search by name matching. RPC supports an exact name list, name matching, an ID list, and/or group.


===Retrieve user===
===Retrieve user===
Line 114: Line 156:
* /user/<id> GET -- User.get
* /user/<id> GET -- User.get


The BzAPI call is backed by the RPC call, so they are quite similar.
Differences:
* REST supports retrieving individual users by ID or by name. RPC just has the general search call which can be made specific.


==Configuration Calls: Details==
==Configuration Calls: Details==
Line 214: Line 261:


(although some config stuff is available as more specific calls)
(although some config stuff is available as more specific calls)
==Scratchpad==
* Need to check if there are differences in include_fields/exclude_fields support
* What about return values?
Account confirmers, Anti-spam team, Confirmed users, Bureaucrats and Sysops emeriti
4,925

edits