node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



A JavaScript wrapper for the Bugzilla JSON-RPC API.


For node install with npm:

npm install bz-json

and use with var bz = require("bz-json")

For the browser, build a browser file from the source code with browserbuild: browserbuild bz-json.js.


var bugzilla = bz.createClient();
bugzilla.getBug(678223, function(error, bug) {
  if (!error) {


bz.createClient(options) creates a new Bugzilla API client, optionally takes options like the JSON-RPC API url and username + password:

var bugzilla = bz.createClient({
  url: "",
  username: '',
  password: 'secret'

Client methods

Each method takes a callback that takes an error message (if any kind of error occurs) as its first argument, and the expected return data as its second.

getBug(id, callback)
retrieves a bug given a bug id.