NAME
WebService::Bugzilla - Perl API for Bugzilla REST API
VERSION
version 0.001
SYNOPSIS
use WebService::Bugzilla;
my $bz = WebService::Bugzilla->new(
base_url => 'https://bugzilla.example.com',
api_key => 'your-api-key-here',
);
# Fetch a bug
my $bug = $bz->bug->get(12345);
say $bug->summary;
# Search for bugs
my $bugs = $bz->bug->search(product => 'MyProduct', status => 'NEW');
# Create a comment
$bz->comment->create(12345, comment => 'Fixed in latest build.');
# Get the current user
my $me = $bz->user->whoami();
say $me->login_name;
DESCRIPTION
WebService::Bugzilla is a Moo-based client for the Bugzilla REST API. It consumes the WebService::Client role and provides lazy accessors for each Bugzilla API resource area.
HTTPS is required by default. Set allow_http => 1 to permit plain HTTP connections (useful for local development against localhost).
ALPHA STATUS
This release should be considered an alpha release. Please adjust your expectations accordingly.
Your feedback is very welcomed. Patches are even more welcome.
ATTRIBUTES
base_url-
Required. Base URL of the Bugzilla instance (e.g.
https://bugzilla.example.com). A trailing/bugzilla/rest/path is appended automatically when the URL contains no path component. api_key-
Optional API key used for authentication. When set it is sent as the
X-BUGZILLA-API-KEYheader on every request. allow_http-
Boolean (default
0). When false the constructor willcroakifbase_urluses plain HTTP (except for loopback addresses). mode-
API mode string passed to WebService::Client (default
v2). attachment-
Lazy accessor returning a WebService::Bugzilla::Attachment instance.
bug-
Lazy accessor returning a WebService::Bugzilla::Bug instance.
bug_user_last_visit-
Lazy accessor returning a WebService::Bugzilla::BugUserLastVisit instance.
classification-
Lazy accessor returning a WebService::Bugzilla::Classification instance.
comment-
Lazy accessor returning a WebService::Bugzilla::Comment instance.
component-
Lazy accessor returning a WebService::Bugzilla::Component instance.
field-
Lazy accessor returning a WebService::Bugzilla::Field instance.
flag_activity-
Lazy accessor returning a WebService::Bugzilla::FlagActivity instance.
github-
Lazy accessor returning a WebService::Bugzilla::GitHub instance.
group-
Lazy accessor returning a WebService::Bugzilla::Group instance.
information-
Lazy accessor returning a WebService::Bugzilla::Information instance.
product-
Lazy accessor returning a WebService::Bugzilla::Product instance.
reminder-
Lazy accessor returning a WebService::Bugzilla::Reminder instance.
user-
Lazy accessor returning a WebService::Bugzilla::User instance.
METHODS
BUILD
Moo lifecycle hook. Validates base_url, appends the REST base path when needed, configures the user-agent with an API-key header (if provided), and sets a descriptive User-Agent string.
req
my $data = $bz->req($http_request, %args);
around modifier wrapping "req" in WebService::Client. Unwraps the response object, returns undef for GET 404/410 responses, and throws a WebService::Bugzilla::Exception on other non-2xx status codes.
get
my $data = $bz->get($path, \%params);
around modifier wrapping "get" in WebService::Client. URL-encodes all query-parameter values before dispatch.
SEE ALSO
WebService::Client - role consumed by this class
WebService::Bugzilla::Exception - exception objects thrown on errors
https://bmo.readthedocs.io/en/latest/api/core/v1/index.html - Bugzilla REST API documentation
AUTHOR
Dean Hamstead <dean@fragfest.com.au>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2026 by Dean Hamstead.
This is free software, licensed under:
The MIT (X11) License