2 <html lang="en-us" itemscope itemtype="http://schema.org/Article">
5 <meta name="description" content="On mozilla.support.bugzilla Thorsten Schöning wrote: Still how does one get this Bugzilla::Webserves::Bug? There are different ways of course, one is BZ::Client, others depending on your environment may exist or you need to create your own client or whatever. Name a...">
6 <meta name="generator" content="Movable Type 5.2.3">
7 <title>Bugzilla::Webservice - Status</title>
8 <link rel="alternate" type="application/atom+xml" title="Recent Entries" href="http://defaria.com/blogs/Status/atom.xml">
9 <link rel="canonical" href="http://defaria.com/blogs/Status/2014/03/bugzillawebservice.html">
10 <meta name="viewport" content="width=device-width,initial-scale=1">
11 <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles.css">
13 <link rel="stylesheet" href="http://defaria.com/blogs/Status/styles_ie.css">
14 <script src="/mt/mt-static/support/theme_static/rainier/js/html5shiv.js"></script>
17 <link rel="start" href="http://defaria.com/blogs/Status/">
19 <link rel="prev" href="http://defaria.com/blogs/Status/2013/02/file-this-one-u.html" title="File this one under Paid Support vs Open Source">
20 <link rel="next" href="http://defaria.com/blogs/Status/2014/04/-setting-up-putty-to.html" title="Setting up PuTTY to do passwordless logins using pre-shared key">
21 <!-- Open Graph Protocol -->
22 <meta property="og:type" content="article">
23 <meta property="og:locale" content="en-us">
24 <meta property="og:title" content="Bugzilla::Webservice">
25 <meta property="og:url" content="http://defaria.com/blogs/Status/2014/03/bugzillawebservice.html">
26 <meta property="og:description" content="On mozilla.support.bugzilla Thorsten Schöning wrote: Still how does one get this Bugzilla::Webserves::Bug? There are different ways of course, one is BZ::Client, others depending on your environment may exist or you need to create your own client or whatever. Name a...">
27 <meta property="og:site_name" content="Status">
28 <meta property="og:image" content="/mt/mt-static/support/theme_static/rainier/img/siteicon-sample.png">
30 <meta itemprop="description" content="On mozilla.support.bugzilla Thorsten Schöning wrote: Still how does one get this Bugzilla::Webserves::Bug? There are different ways of course, one is BZ::Client, others depending on your environment may exist or you need to create your own client or whatever. Name a...">
31 <link itemprop="url" href="http://defaria.com/blogs/Status/2014/03/bugzillawebservice.html">
32 <link itemprop="image" href="/mt/mt-static/support/theme_static/rainier/img/siteicon-sample.png">
37 <div id="container-inner">
38 <header id="header" role="banner">
39 <div id="header-inner">
40 <div id="header-content">
42 <a href="http://defaria.com/blogs/Status/">
51 <nav role="navigation">
53 <li><a href="http://defaria.com/blogs/Status/">Home</a></li>
62 <div id="content-inner">
63 <ul class="breadcrumb breadcrumb-list">
64 <li class="breadcrumb-list-item"><a href="http://defaria.com/blogs/Status/">Home</a></li>
65 <li class="breadcrumb-list-item">Bugzilla::Webservice</li>
67 <div id="individual-main" class="main" role="main">
68 <article id="entry-1983" class="entry entry-asset asset hentry">
69 <div class="asset-header">
70 <h2 itemprop="name" class="asset-name entry-title">Bugzilla::Webservice</h2>
71 <footer class="asset-meta">
72 <ul class="asset-meta-list">
73 <li class="asset-meta-list-item">Posted on <time datetime="2014-03-26T11:34:15-08:00" itemprop="datePublished">March 26, 2014</time></li>
74 <li class="asset-meta-list-item">by <span class="author entry-author vcard"></span></li>
77 <li class="asset-meta-list-item">in <a itemprop="articleSection" rel="tag" href="http://defaria.com/blogs/Status/audience/">Audience</a></li>
83 <div class="entry-content asset-content" itemprop="articleBody">
84 <p>On mozilla.support.bugzilla Thorsten Schöning wrote:</p>
85 <blockquote type="cite">
86 <blockquote type="cite">Still how does one get this Bugzilla::Webserves::Bug?</blockquote>
88 <blockquote type="cite">There are different ways of course, one is BZ::Client, others depending on your environment may exist or you need to create your own client or whatever.</blockquote>
89 <p>Name a way then. You see when I say BZ::Client I can do cpan BZ::Client and I will get downloaded actually code that I can run (It's pretty clear I'm workign in Perl no?). However when I say Bugzilla::Webservice::Bug I cannot do cpan Bugzilla::Webservice::Bug and get code because cpan says it can't find anything listed under Bugzilla::Webservice::Bug. Now I know that it's not part of CPAN so what is it part of and how do I get the code?</p>
90 <p>'Cause you just got through telling me that BZ::Client is not an official Bugzilla project and yet you pointed me to specifically to <a href="http://www.bugzilla.org/docs/4.4/en/html/api/Bugzilla/WebService/Bug.html#search">http://www.bugzilla.org/docs/4.4/en/html/api/Bugzilla/WebService/Bug.html#search</a> which is in bugzilla.org. Was I not to think that that would be "an official Bugzilla project"? Yet there's nothing there that I can see about getting that code!</p>
91 <blockquote type="cite">
92 <blockquote type="cite">Looking at <a href="https://wiki.mozilla.org/Bugzilla:Addons#Client_libraries_for_the_Bugzilla_Webservices.2FREST_API">https://wiki.mozilla.org/Bugzilla:Addons#Client_libraries_for_the_Bugzilla_Webservices.2FREST_API</a> I see it telling me to use BZ::Client (and not even mentioning BZ::Client::Bug, which is much more to the point)</blockquote>
93 Because the wiki can't know your use case. :-)</blockquote>
94 <p>Looking at CPAN for BZ::Client (<a href="http://search.cpan.org/~jwied/BZ-Client-1.04/lib/BZ/Client.pm">http://search.cpan.org/~jwied/BZ-Client-1.04/lib/BZ/Client.pm</a>) we have the following methods:</p>
95 <pre style="margin-left: 30px;">new<br />url<br />user<br />password<br />login<br />api_call</pre>
96 <p>Not exactly a bastion of functionality! The Wiki could anticipate that I might need a bit more functionality for any functional use case! Just my opinion of course :-).</p>
97 <p>Looking at BZ::Client::Bug (<a href="http://search.cpan.org/~jwied/BZ-Client-1.04/lib/BZ/Client/Bug.pm">http://search.cpan.org/~jwied/BZ-Client-1.04/lib/BZ/Client/Bug.pm</a>) I see:</p>
98 <pre style="margin-left: 30px;"><strong>CLASS METHODS</strong><br />get<br />new<br />create<br />search<br /><strong>INSTANCE METHODS</strong><br />id<br />alias<br />assigned_to<br />component<br />creation_time<br />dupe_of<br />is_open<br />last_change_time<br />priority<br />product<br />resolution<br />severity<br />status<br />summary</pre>
99 <p>At the very least, couldn't the wiki mention both?</p>
102 <p>for a client side solution. I guess I didn't mention I'm working client side. Actually I see little difference between client and server side API's here.</p>
104 That sounds like one of the design goals of BZ::Client, but I'm only guessing.</blockquote>
105 <p>You mean a design goal to work on more than one machine? I'd say it's basic functionality but perhaps that's just me.</p>
107 <blockquote>I want the API that can get me the Bugzilla data from wherever I happen to run it. Oh and I'm working in Perl.</blockquote>
108 I don't think I understand this paragraph, BZ::Client works wherever your client is able to access your Bugzilla from. But your problem is totally different, you want functionality that may or may not be provided currently by the WebService-API. Check the docs and if it's not sufficient check the code and maybe provide patches for the docs for anyone else with a similar problem.</blockquote>
109 <p>It looked like you were telling me that BZ::Client was not an official project and that I shouldn't be using it. I realize you were saying that I'd be better off contacting that module's owner, and I have (have not heard back yet). It's just I thought there would be some sort of official or at least full featured way to access the functionality of Bugzilla from scripts, specifically Perl scripts as from what I can tell Bugzilla is largely written in Perl. And as it is quite old in Internet terms I find it surprising there isn't a full featured Perl module that everybody's using already.</p>
110 <p>So far I've found WWW::Bugzilla and things like WWW::Bugzilla::Bugtree and WWW::Bugzilla::Search. These use some sort of WWW::Mechanize thingy and seems to be horribly inefficient. For example, the new method requires a bugid and takes a while to instantiate. If a script had to process a 1000 bugs and instantiate each one of them at like 4-5 second per instantiation it would take just way too long to get anything done. The Search module's no better. If you have a couple of thousand bugs qualifying then it gathers all of the data, returns a huge structure and takes tens of minutes to return from the search call. I emailed the author about this module but haven't received a response.</p>
111 <p>I then found BZ::Client and BZ::Client::Bug, which work fairly decently. It's quicker and pretty flexible but got stopped at the lack of search capability.</p>
112 <p>I see this Bugzilla::Webservice::Bug but have no idea on how to download the code.</p>
113 <p>I also see this BzAPI thing but it appears to be server side only.</p>
114 <p>One thing I'm trying to accomplish: We have a number of saved searches. One process we have here executes a number of these and saves the results to .csv files. This is done manually through the web UI. Another Perl script gathers a bunch of these .csv files and produces another .csv file in the form of a report that is useful to management. I'd like to change this Perl process to simply interrogate the Bugzilla database directly, possibly utilizing the saved searches directly and produce the final .csv file directly (or perhaps make a web page instead). There are also many other scripts I could imagine Perl doing by having full functioned access to Bugzilla.</p>
115 <p>Oh and I checked BZ::Client::Bug::search's code. It descends off in to a plethora of web related technologies that sufficiently obscures what's going on, what's expected and what works WRT search.</p>
117 <p>I for example simply don't use the WebServices and therefore can't tell you if your needed behavior is implemented or not.</p>
119 <p>I don't particularly care if it's WebServices or not. I just want to interact with the functionality of Bugzilla programmatically through Perl. The backend can be WebServices, client/server socket stuff or a direct API.</p>
121 <blockquote>Indeed. I've worked with 2 REST APIs so far and they both shared the characteristic of 1) being poorly documented</blockquote>
122 I don't find the WebServices API of Bugzilla documented that poorly,</blockquote>
123 <p>Starting from <a href="http://www.bugzilla.org/docs/4.4/en/html/api/index.html">http://www.bugzilla.org/docs/4.4/en/html/api/index.html</a> it's not immediately clear that this is a server side only technology. If it's not a server side only technology then it's not at all clear how to get the client side code. And there's an appalling lack of real world examples.</p>
125 <p>if it is you are in a happy position because you just need to check the implementation and provide patches to improve the docs, because your behavior is already implemented.</p>
127 <p>You make the incorrect assumption that 1) I understand enough about the code base to make contributions, 2) I have that time and 3) I wish to work for free. I'm a consultant and I need to get stuff done for my client. My client does not pay me to work on open source projects. I'm not totally opposed to working on open source projects nor contributing to them but I don't have the time nor inclination to do so here. Sorry.</p>
129 <p>If it is not your have a bigger problem because your functionality needs implementation. :-)</p>
131 <p>Not necessarily. Somebody else could have already implemented this or there may be another solution. That's why I'm posting here. I'm shocked that such a mature technology has such a lack of an interface, supported or not...</p>
133 <blockquote>and 2) not supporting full search. What's up with that?</blockquote>
134 As often it's a matter of available resources.</blockquote>
135 <p>I see it as more of a matter of professionalism. I know that I would not release code, open source or not, unless it was not at least reasonably feature complete.</p>
136 <p>REST APIs seem, in my experience, to use too much web technologies and vagueness, attempting to be language agnostic, that they read as if they say nothing and you need to go elsewhere for answers to simple questions. There's never any good examples of real code, they often don't describe what data is returned other than to say that it's of XML or JSON format - how are multiple records indicated? How empty fields handled? Different field data types? How are exceptions handled? These questions are often not answered. And usually the search portion is "not totally implemented". I think that this is because representing search conditions appears to be difficult to do in a REST scenario (largely because they seem to try to represent the search in terms of data structures like XML instead of simply strings that must be parsed - REST APIs seem to eschew conditional parsers).</p>
139 <nav class="page-navigation entry-navigation pagination content-nav">
140 <ul class="page-navigation-list">
142 <li class="page-navigation-list-item page-navigation-prev"><a rel="prev" href="http://defaria.com/blogs/Status/2013/02/file-this-one-u.html" title="File this one under Paid Support vs Open Source">Previous entry</a></li>
145 <li class="page-navigation-list-item page-navigation-next"><a rel="next" href="http://defaria.com/blogs/Status/2014/04/-setting-up-putty-to.html" title="Setting up PuTTY to do passwordless logins using pre-shared key">Next entry</a></li>
150 <aside id="zenback" class="zenback feedback">
151 Please paste Zenback script code here.
158 <aside class="widgets related" role="complementary">
159 <nav class="widget-search widget">
160 <div class="widget-content">
161 <form method="get" id="search" action="http://defaria.com/mt/mt-search.cgi">
163 <input type="text" name="search" value="" placeholder="Search...">
165 <input type="hidden" name="IncludeBlogs" value="8">
167 <input type="hidden" name="limit" value="20">
168 <button type="submit" name="button">
169 <img alt="Search" src="/mt/mt-static/support/theme_static/rainier/img/search-icon.png">
175 <nav class="widget-archive-category widget">
176 <h3 class="widget-header">Categories</h3>
177 <div class="widget-content">
180 <ul class="widget-list">
183 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/ameriquest/">Ameriquest (99)</a>
191 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/audience/">Audience (3)</a>
199 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/broadcom/">Broadcom (76)</a>
207 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/gpdb/">GPDB (35)</a>
215 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/general-dynamics/">General Dynamics (61)</a>
223 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/general-electric/">General Electric (13)</a>
231 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/hewlett-packard/">Hewlett Packard (13)</a>
239 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/lynuxworks/">LynuxWorks (162)</a>
247 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/pqa/">PQA (35)</a>
255 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/salira/">Salira (79)</a>
263 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/tellabs/">Tellabs (2)</a>
271 <li class="widget-list-item"><a href="http://defaria.com/blogs/Status/texas-instruments/">Texas Instruments (31)</a>
283 <nav class="widget-archive-dropdown widget">
284 <h3 class="widget-header">Archives</h3>
285 <div class="widget-content">
287 <option>Select a Month...</option>
289 <option value="http://defaria.com/blogs/Status/2016/02/">February 2016</option>
293 <option value="http://defaria.com/blogs/Status/2014/09/">September 2014</option>
297 <option value="http://defaria.com/blogs/Status/2014/04/">April 2014</option>
301 <option value="http://defaria.com/blogs/Status/2014/03/">March 2014</option>
305 <option value="http://defaria.com/blogs/Status/2013/02/">February 2013</option>
309 <option value="http://defaria.com/blogs/Status/2012/09/">September 2012</option>
313 <option value="http://defaria.com/blogs/Status/2012/08/">August 2012</option>
317 <option value="http://defaria.com/blogs/Status/2012/05/">May 2012</option>
321 <option value="http://defaria.com/blogs/Status/2012/04/">April 2012</option>
325 <option value="http://defaria.com/blogs/Status/2012/02/">February 2012</option>
329 <option value="http://defaria.com/blogs/Status/2012/01/">January 2012</option>
333 <option value="http://defaria.com/blogs/Status/2011/10/">October 2011</option>
337 <option value="http://defaria.com/blogs/Status/2011/07/">July 2011</option>
341 <option value="http://defaria.com/blogs/Status/2010/09/">September 2010</option>
345 <option value="http://defaria.com/blogs/Status/2010/08/">August 2010</option>
349 <option value="http://defaria.com/blogs/Status/2010/04/">April 2010</option>
353 <option value="http://defaria.com/blogs/Status/2010/03/">March 2010</option>
357 <option value="http://defaria.com/blogs/Status/2010/02/">February 2010</option>
361 <option value="http://defaria.com/blogs/Status/2009/05/">May 2009</option>
365 <option value="http://defaria.com/blogs/Status/2009/04/">April 2009</option>
369 <option value="http://defaria.com/blogs/Status/2008/07/">July 2008</option>
373 <option value="http://defaria.com/blogs/Status/2008/05/">May 2008</option>
377 <option value="http://defaria.com/blogs/Status/2008/04/">April 2008</option>
381 <option value="http://defaria.com/blogs/Status/2008/03/">March 2008</option>
385 <option value="http://defaria.com/blogs/Status/2008/02/">February 2008</option>
389 <option value="http://defaria.com/blogs/Status/2008/01/">January 2008</option>
393 <option value="http://defaria.com/blogs/Status/2007/12/">December 2007</option>
397 <option value="http://defaria.com/blogs/Status/2007/11/">November 2007</option>
401 <option value="http://defaria.com/blogs/Status/2007/10/">October 2007</option>
405 <option value="http://defaria.com/blogs/Status/2007/09/">September 2007</option>
409 <option value="http://defaria.com/blogs/Status/2007/08/">August 2007</option>
413 <option value="http://defaria.com/blogs/Status/2007/07/">July 2007</option>
417 <option value="http://defaria.com/blogs/Status/2007/06/">June 2007</option>
421 <option value="http://defaria.com/blogs/Status/2007/05/">May 2007</option>
425 <option value="http://defaria.com/blogs/Status/2007/04/">April 2007</option>
429 <option value="http://defaria.com/blogs/Status/2007/03/">March 2007</option>
433 <option value="http://defaria.com/blogs/Status/2007/01/">January 2007</option>
437 <option value="http://defaria.com/blogs/Status/2006/12/">December 2006</option>
441 <option value="http://defaria.com/blogs/Status/2006/11/">November 2006</option>
445 <option value="http://defaria.com/blogs/Status/2006/10/">October 2006</option>
449 <option value="http://defaria.com/blogs/Status/2006/09/">September 2006</option>
453 <option value="http://defaria.com/blogs/Status/2006/07/">July 2006</option>
457 <option value="http://defaria.com/blogs/Status/2006/06/">June 2006</option>
461 <option value="http://defaria.com/blogs/Status/2006/05/">May 2006</option>
465 <option value="http://defaria.com/blogs/Status/2006/04/">April 2006</option>
469 <option value="http://defaria.com/blogs/Status/2006/03/">March 2006</option>
473 <option value="http://defaria.com/blogs/Status/2006/02/">February 2006</option>
477 <option value="http://defaria.com/blogs/Status/2006/01/">January 2006</option>
481 <option value="http://defaria.com/blogs/Status/2005/12/">December 2005</option>
485 <option value="http://defaria.com/blogs/Status/2005/11/">November 2005</option>
489 <option value="http://defaria.com/blogs/Status/2005/10/">October 2005</option>
493 <option value="http://defaria.com/blogs/Status/2005/09/">September 2005</option>
497 <option value="http://defaria.com/blogs/Status/2005/08/">August 2005</option>
501 <option value="http://defaria.com/blogs/Status/2005/07/">July 2005</option>
505 <option value="http://defaria.com/blogs/Status/2005/06/">June 2005</option>
509 <option value="http://defaria.com/blogs/Status/2005/05/">May 2005</option>
513 <option value="http://defaria.com/blogs/Status/2005/04/">April 2005</option>
517 <option value="http://defaria.com/blogs/Status/2005/03/">March 2005</option>
521 <option value="http://defaria.com/blogs/Status/2005/02/">February 2005</option>
525 <option value="http://defaria.com/blogs/Status/2005/01/">January 2005</option>
529 <option value="http://defaria.com/blogs/Status/2004/12/">December 2004</option>
533 <option value="http://defaria.com/blogs/Status/2004/09/">September 2004</option>
537 <option value="http://defaria.com/blogs/Status/2004/08/">August 2004</option>
541 <option value="http://defaria.com/blogs/Status/2004/07/">July 2004</option>
545 <option value="http://defaria.com/blogs/Status/2004/06/">June 2004</option>
549 <option value="http://defaria.com/blogs/Status/2004/05/">May 2004</option>
553 <option value="http://defaria.com/blogs/Status/2004/04/">April 2004</option>
557 <option value="http://defaria.com/blogs/Status/2004/03/">March 2004</option>
561 <option value="http://defaria.com/blogs/Status/2004/02/">February 2004</option>
565 <option value="http://defaria.com/blogs/Status/2004/01/">January 2004</option>
569 <option value="http://defaria.com/blogs/Status/2003/12/">December 2003</option>
573 <option value="http://defaria.com/blogs/Status/2003/11/">November 2003</option>
581 <div class="widget-syndication widget section">
582 <div class="widget-content">
583 <p><img src="http://defaria.com/mt/mt-static/images/status_icons/feed.gif" alt="Subscribe to feed" width="9" height="9" /> <a href="http://defaria.com/blogs/Status/atom.xml">Subscribe to this blog's feed</a></p>
591 <footer id="footer" role="contentinfo">
592 <div id="footer-inner">
593 <div id="footer-content">
594 <nav role="navigation">
596 <li><a href="http://defaria.com/blogs/Status/">Home</a></li>
602 <p class="license">© Copyright 2016.</p>
603 <p class="poweredby">Powered by <a href="http://www.movabletype.org/">Movable Type</a></p>
609 <script src="http://defaria.com/mt/mt-static/jquery/jquery.min.js"></script>
610 <script src="http://defaria.com/blogs/Status/mt-theme-scale2.js"></script>