Bugzilla:API Comparison

From MozillaWiki
Revision as of 15:13, 21 May 2013 by Gerv (talk | contribs)
Jump to navigation Jump to search

This page attempts to list the differences between the Bugzilla XML-RPC/JSON-RPC API (on the Bugzilla tip) and the BzAPI REST API (on the BzAPI tip). This will hopefully be useful data as we figure out how to align them, as Bugzilla implements a native REST API.

High Level

Matching Calls

  • Search for bugs: /bug GET -- Bug.search
  • Create new bug: /bug POST -- Bug.create
  • Retrieve bug: /bug/<id> GET -- Bug.get
  • Update bug: /bug/<id> PUT -- Bug.update / Bug.update_see_also / Bug.update_tags
  • List comments for bug: /bug/<id>/comment GET -- Bug.comments
  • Add new comment to bug: /bug/<id>/comment POST -- Bug.add_comment
  • List history for bug: /bug/<id>/history GET -- Bug.history
  • List attachments for bug: /bug/<id>/attachment GET -- Bug.attachments
  • Create new attachment: /bug/<id>/attachment POST -- Bug.add_attachment
  • Retrieve attachment: /attachment/<id> GET -- Bug.attachments
  • Search for users: /user GET -- User.get
  • Retrieve user: /user/<id> GET -- User.get

RPC Calls Supplying Subsets of REST /config Call

  • Get current Bugzilla version: Bugzilla.version
  • Get info about classifications by name or ID: Classification.get
  • Get info about products: Product.get
  • Get info about fields and their legal values: Bug.fields

RPC Calls Not In REST

User

  • Get list of installed extensions: Bugzilla.extensions
  • Get info about Bugzilla's notions of time: Bugzilla.time
  • Get safe parameter values: Bugzilla.parameters
  • Get the latest time from the audit_log table: Bugzilla.last_audit_time
  • Get info about products a user can search on: Product.get_selectable_products
  • Get info about products a user can enter bugs against: Product.get_enterable_products
  • Get info about products a user can search or enter bugs against: Product.get_accessible_products

Admin

  • Create a new group: Group.create
  • Update info about a group: Group.update
  • Create a new product: Product.create
  • Update info about a product: Product.update
  • Offer account by email: User.offer_account_by_email
  • Create a user account: User.create
  • Update a user account: User.update

Not Needed For REST

  • Log in to RPC interface: User.login
  • Log out of RPC interface: User.logout

Deprecated

  • Bugzilla.timezone
  • Bug.legal_values

REST Calls Not In RPC

  • List flags for bug: /bug/<id>/flag GET (no specific call, although Bug.get returns the info)
  • Count bugs: /count GET
  • Update attachment metadata: /attachment/<id> PUT
  • Get Configuration: /configuration GET (although some config stuff is available as more specific calls)


Matching Calls: Details

Create new bug

  • /bug POST -- Bug.create

Retrieve bug

  • /bug/<id> GET -- Bug.get

Update bug

  • /bug/<id> PUT -- Bug.update / Bug.update_see_also / Bug.update_tags

List comments for bug

  • /bug/<id>/comment GET -- Bug.comments

Add new comment to bug

  • /bug/<id>/comment POST -- Bug.add_comment

List history for bug

  • /bug/<id>/history GET -- Bug.history

List attachments for bug

  • /bug/<id>/attachment GET -- Bug.attachments

Create new attachment

  • /bug/<id>/attachment POST -- Bug.add_attachment

Retrieve attachment

  • /attachment/<id> GET -- Bug.attachments

Search for users

  • /user GET -- User.get

Retrieve user

  • /user/<id> GET -- User.get


Configuration Calls: Details

BzAPI has a single call to get a large config data structure, whereas the RPC API is more fine-grained.

Get current Bugzilla version

  • Bugzilla.version

Get info about classifications by name or ID

  • Classification.get

Get info about products

  • Product.get

Get info about fields and their legal values

  • Bug.fields

RPC Calls Not In REST: Details

Get list of installed extensions

  • Bugzilla.extensions

Get info about Bugzilla's notions of time

  • Bugzilla.time

Get safe parameter values

  • Bugzilla.parameters

Get the latest time from the audit_log table

  • Bugzilla.last_audit_time

Get info about products a user can search on

  • Product.get_selectable_products

Get info about products a user can enter bugs against

  • Product.get_enterable_products

Get info about products a user can search or enter bugs against

  • Product.get_accessible_products

Create a new group

  • Group.create

Update info about a group

  • Group.update

Create a new product

  • Product.create

Update info about a product

  • Product.update

Offer account by email

  • User.offer_account_by_email

Create a user account

  • User.create

Update a user account

  • User.update

REST Calls Not In RPC: Details

List flags for bug

  • /bug/<id>/flag GET

(no specific call, although Bug.get returns the info)

Count bugs

  • /count GET

Update attachment metadata

  • /attachment/<id> PUT

Get Configuration

  • /configuration GET

(although some config stuff is available as more specific calls)