Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 4e237fd705495e1e21ef20696443e053 > files > 958

bugzilla-5.0.4-3.mga7.noarch.rpm


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>6.1.3. Bugs &#8212; Bugzilla 5.0.4 documentation</title>
    <link rel="stylesheet" href="../../../_static/bugzilla.css" type="text/css" />
    <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../../',
        VERSION:     '5.0.4',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="../../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../../_static/doctools.js"></script>
    <link rel="shortcut icon" href="../../../_static/favicon.ico"/>
    <link rel="search" title="Search" href="../../../search.html" />
    <link rel="next" title="6.1.4. Bug User Last Visited" href="bug-user-last-visit.html" />
    <link rel="prev" title="6.1.2. Attachments" href="attachment.html" /> 
  </head>
  <body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="bug-user-last-visit.html" title="6.1.4. Bug User Last Visited"
             accesskey="N">next</a></li>
        <li class="right" >
          <a href="attachment.html" title="6.1.2. Attachments"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">Bugzilla 5.0.4 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >6. WebService API Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="index.html" accesskey="U">6.1. Core API v1</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="bugs">
<h1>6.1.3. Bugs<a class="headerlink" href="#bugs" title="Permalink to this headline">¶</a></h1>
<p>The REST API for creating, changing, and getting the details of bugs.</p>
<p>This part of the Bugzilla REST API allows you to file new bugs in Bugzilla and
to get information about existing bugs.</p>
<div class="section" id="get-bug">
<span id="rest-single-bug"></span><h2>6.1.3.1. Get Bug<a class="headerlink" href="#get-bug" title="Permalink to this headline">¶</a></h2>
<p>Gets information about particular bugs in the database.</p>
<p><strong>Request</strong></p>
<p>To get information about a particular bug using its ID or alias:</p>
<div class="highlight-text"><div class="highlight"><pre><span></span>GET /rest/bug/(id_or_alias)
</pre></div>
</div>
<p>You can also use <a class="reference internal" href="#rest-search-bugs"><span class="std std-ref">Search Bugs</span></a> to return more than one bug at a time
by specifying bug IDs as the search terms.</p>
<div class="highlight-text"><div class="highlight"><pre><span></span>GET /rest/bug?id=12434,43421
</pre></div>
</div>
<table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="7%" />
<col width="72%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><strong>id_or_alias</strong></td>
<td>mixed</td>
<td>An integer bug ID or a bug alias string.</td>
</tr>
</tbody>
</table>
<p><strong>Response</strong></p>
<div class="highlight-js"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="s2">&quot;faults&quot;</span><span class="o">:</span> <span class="p">[],</span>
  <span class="s2">&quot;bugs&quot;</span><span class="o">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="s2">&quot;assigned_to_detail&quot;</span><span class="o">:</span> <span class="p">{</span>
        <span class="s2">&quot;id&quot;</span><span class="o">:</span> <span class="mi">2</span><span class="p">,</span>
        <span class="s2">&quot;real_name&quot;</span><span class="o">:</span> <span class="s2">&quot;Test User&quot;</span><span class="p">,</span>
        <span class="s2">&quot;name&quot;</span><span class="o">:</span> <span class="s2">&quot;user@bugzilla.org&quot;</span><span class="p">,</span>
        <span class="s2">&quot;email&quot;</span><span class="o">:</span> <span class="s2">&quot;user@bugzilla.org&quot;</span>
      <span class="p">},</span>
      <span class="s2">&quot;flags&quot;</span><span class="o">:</span> <span class="p">[</span>
        <span class="p">{</span>
          <span class="s2">&quot;type_id&quot;</span><span class="o">:</span> <span class="mi">11</span><span class="p">,</span>
          <span class="s2">&quot;modification_date&quot;</span><span class="o">:</span> <span class="s2">&quot;2014-09-28T21:03:47Z&quot;</span><span class="p">,</span>
          <span class="s2">&quot;name&quot;</span><span class="o">:</span> <span class="s2">&quot;blocker&quot;</span><span class="p">,</span>
          <span class="s2">&quot;status&quot;</span><span class="o">:</span> <span class="s2">&quot;?&quot;</span><span class="p">,</span>
          <span class="s2">&quot;id&quot;</span><span class="o">:</span> <span class="mi">2906</span><span class="p">,</span>
          <span class="s2">&quot;setter&quot;</span><span class="o">:</span> <span class="s2">&quot;user@bugzilla.org&quot;</span><span class="p">,</span>
          <span class="s2">&quot;creation_date&quot;</span><span class="o">:</span> <span class="s2">&quot;2014-09-28T21:03:47Z&quot;</span>
        <span class="p">}</span>
      <span class="p">],</span>
      <span class="s2">&quot;resolution&quot;</span><span class="o">:</span> <span class="s2">&quot;INVALID&quot;</span><span class="p">,</span>
      <span class="s2">&quot;id&quot;</span><span class="o">:</span> <span class="mi">35</span><span class="p">,</span>
      <span class="s2">&quot;qa_contact&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
      <span class="s2">&quot;version&quot;</span><span class="o">:</span> <span class="s2">&quot;1.0&quot;</span><span class="p">,</span>
      <span class="s2">&quot;status&quot;</span><span class="o">:</span> <span class="s2">&quot;RESOLVED&quot;</span><span class="p">,</span>
      <span class="s2">&quot;creator&quot;</span><span class="o">:</span> <span class="s2">&quot;user@bugzilla.org&quot;</span><span class="p">,</span>
      <span class="s2">&quot;cf_drop_down&quot;</span><span class="o">:</span> <span class="s2">&quot;---&quot;</span><span class="p">,</span>
      <span class="s2">&quot;summary&quot;</span><span class="o">:</span> <span class="s2">&quot;test bug&quot;</span><span class="p">,</span>
      <span class="s2">&quot;last_change_time&quot;</span><span class="o">:</span> <span class="s2">&quot;2014-09-23T19:12:17Z&quot;</span><span class="p">,</span>
      <span class="s2">&quot;platform&quot;</span><span class="o">:</span> <span class="s2">&quot;All&quot;</span><span class="p">,</span>
      <span class="s2">&quot;url&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
      <span class="s2">&quot;classification&quot;</span><span class="o">:</span> <span class="s2">&quot;Unclassified&quot;</span><span class="p">,</span>
      <span class="s2">&quot;cc_detail&quot;</span><span class="o">:</span> <span class="p">[</span>
        <span class="p">{</span>
          <span class="s2">&quot;id&quot;</span><span class="o">:</span> <span class="mi">786</span><span class="p">,</span>
          <span class="s2">&quot;real_name&quot;</span><span class="o">:</span> <span class="s2">&quot;Foo Bar&quot;</span><span class="p">,</span>
          <span class="s2">&quot;name&quot;</span><span class="o">:</span> <span class="s2">&quot;foo@bar.com&quot;</span><span class="p">,</span>
          <span class="s2">&quot;email&quot;</span><span class="o">:</span> <span class="s2">&quot;foo@bar.com&quot;</span>
        <span class="p">},</span>
      <span class="p">],</span>
      <span class="s2">&quot;priority&quot;</span><span class="o">:</span> <span class="s2">&quot;P1&quot;</span><span class="p">,</span>
      <span class="s2">&quot;is_confirmed&quot;</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
      <span class="s2">&quot;creation_time&quot;</span><span class="o">:</span> <span class="s2">&quot;2000-07-25T13:50:04Z&quot;</span><span class="p">,</span>
      <span class="s2">&quot;assigned_to&quot;</span><span class="o">:</span> <span class="s2">&quot;user@bugzilla.org&quot;</span><span class="p">,</span>
      <span class="s2">&quot;flags&quot;</span><span class="o">:</span> <span class="p">[],</span>
      <span class="s2">&quot;alias&quot;</span><span class="o">:</span> <span class="p">[],</span>
      <span class="s2">&quot;cf_large_text&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
      <span class="s2">&quot;groups&quot;</span><span class="o">:</span> <span class="p">[],</span>
      <span class="s2">&quot;op_sys&quot;</span><span class="o">:</span> <span class="s2">&quot;All&quot;</span><span class="p">,</span>
      <span class="s2">&quot;cf_bug_id&quot;</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span>
      <span class="s2">&quot;depends_on&quot;</span><span class="o">:</span> <span class="p">[],</span>
      <span class="s2">&quot;is_cc_accessible&quot;</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
      <span class="s2">&quot;is_open&quot;</span><span class="o">:</span> <span class="kc">false</span><span class="p">,</span>
      <span class="s2">&quot;cf_qa_list_4&quot;</span><span class="o">:</span> <span class="s2">&quot;---&quot;</span><span class="p">,</span>
      <span class="s2">&quot;keywords&quot;</span><span class="o">:</span> <span class="p">[],</span>
      <span class="s2">&quot;cc&quot;</span><span class="o">:</span> <span class="p">[</span>
        <span class="s2">&quot;foo@bar.com&quot;</span><span class="p">,</span>
      <span class="p">],</span>
      <span class="s2">&quot;see_also&quot;</span><span class="o">:</span> <span class="p">[],</span>
      <span class="s2">&quot;deadline&quot;</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span>
      <span class="s2">&quot;is_creator_accessible&quot;</span><span class="o">:</span> <span class="kc">true</span><span class="p">,</span>
      <span class="s2">&quot;whiteboard&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
      <span class="s2">&quot;dupe_of&quot;</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span>
      <span class="s2">&quot;target_milestone&quot;</span><span class="o">:</span> <span class="s2">&quot;---&quot;</span><span class="p">,</span>
      <span class="s2">&quot;cf_mulitple_select&quot;</span><span class="o">:</span> <span class="p">[],</span>
      <span class="s2">&quot;component&quot;</span><span class="o">:</span> <span class="s2">&quot;SaltSprinkler&quot;</span><span class="p">,</span>
      <span class="s2">&quot;severity&quot;</span><span class="o">:</span> <span class="s2">&quot;critical&quot;</span><span class="p">,</span>
      <span class="s2">&quot;cf_date&quot;</span><span class="o">:</span> <span class="kc">null</span><span class="p">,</span>
      <span class="s2">&quot;product&quot;</span><span class="o">:</span> <span class="s2">&quot;FoodReplicator&quot;</span><span class="p">,</span>
      <span class="s2">&quot;creator_detail&quot;</span><span class="o">:</span> <span class="p">{</span>
        <span class="s2">&quot;id&quot;</span><span class="o">:</span> <span class="mi">28</span><span class="p">,</span>
        <span class="s2">&quot;real_name&quot;</span><span class="o">:</span> <span class="s2">&quot;hello&quot;</span><span class="p">,</span>
        <span class="s2">&quot;name&quot;</span><span class="o">:</span> <span class="s2">&quot;user@bugzilla.org&quot;</span><span class="p">,</span>
        <span class="s2">&quot;email&quot;</span><span class="o">:</span> <span class="s2">&quot;namachi@netscape.com&quot;</span>
      <span class="p">},</span>
      <span class="s2">&quot;cf_free_text&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
      <span class="s2">&quot;blocks&quot;</span><span class="o">:</span> <span class="p">[]</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p><code class="docutils literal"><span class="pre">bugs</span></code> (array) Each bug object contains information about the bugs with valid
ids containing the following items:</p>
<p>These fields are returned by default or by specifying <code class="docutils literal"><span class="pre">_default</span></code> in
<code class="docutils literal"><span class="pre">include_fields</span></code>.</p>
<table border="1" class="docutils">
<colgroup>
<col width="27%" />
<col width="10%" />
<col width="63%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>actual_time</td>
<td>double</td>
<td>The total number of hours that this bug has
taken so far. If you are not in the time-tracking
group, this field will not be included in the
return value.</td>
</tr>
<tr class="row-odd"><td>alias</td>
<td>array</td>
<td>The unique aliases of this bug. An empty array
will be returned if this bug has no aliases.</td>
</tr>
<tr class="row-even"><td>assigned_to</td>
<td>string</td>
<td>The login name of the user to whom the bug is
assigned.</td>
</tr>
<tr class="row-odd"><td>assigned_to_detail</td>
<td>object</td>
<td>An object containing detailed user information
for the assigned_to. To see the keys included
in the user detail object, see below.</td>
</tr>
<tr class="row-even"><td>blocks</td>
<td>array</td>
<td>The IDs of bugs that are &quot;blocked&quot; by this bug.</td>
</tr>
<tr class="row-odd"><td>cc</td>
<td>array</td>
<td>The login names of users on the CC list of this
bug.</td>
</tr>
<tr class="row-even"><td>cc_detail</td>
<td>array</td>
<td>Array of objects containing detailed user
information for each of the cc list members.
To see the keys included in the user detail
object, see below.</td>
</tr>
<tr class="row-odd"><td>classification</td>
<td>string</td>
<td>The name of the current classification the bug
is in.</td>
</tr>
<tr class="row-even"><td>component</td>
<td>string</td>
<td>The name of the current component of this bug.</td>
</tr>
<tr class="row-odd"><td>creation_time</td>
<td>datetime</td>
<td>When the bug was created.</td>
</tr>
<tr class="row-even"><td>creator</td>
<td>string</td>
<td>The login name of the person who filed this bug
(the reporter).</td>
</tr>
<tr class="row-odd"><td>creator_detail</td>
<td>object</td>
<td>An object containing detailed user information
for the creator. To see the keys included in the
user detail object, see below.</td>
</tr>
<tr class="row-even"><td>deadline</td>
<td>string</td>
<td>The day that this bug is due to be completed, in
the format <code class="docutils literal"><span class="pre">YYYY-MM-DD</span></code>.</td>
</tr>
<tr class="row-odd"><td>depends_on</td>
<td>array</td>
<td>The IDs of bugs that this bug &quot;depends on&quot;.</td>
</tr>
<tr class="row-even"><td>dupe_of</td>
<td>int</td>
<td>The bug ID of the bug that this bug is a
duplicate of. If this bug isn't a duplicate of
any bug, this will be null.</td>
</tr>
<tr class="row-odd"><td>estimated_time</td>
<td>double</td>
<td>The number of hours that it was estimated that
this bug would take. If you are not in the
time-tracking group, this field will not be
included in the return value.</td>
</tr>
<tr class="row-even"><td>flags</td>
<td>array</td>
<td>An array of objects containing the information
about flags currently set for the bug. Each flag
objects contains the following items</td>
</tr>
<tr class="row-odd"><td>groups</td>
<td>array</td>
<td>The names of all the groups that this bug is in.</td>
</tr>
<tr class="row-even"><td>id</td>
<td>int</td>
<td>The unique numeric ID of this bug.</td>
</tr>
<tr class="row-odd"><td>is_cc_accessible</td>
<td>boolean</td>
<td>If true, this bug can be accessed by members of
the CC list, even if they are not in the groups
the bug is restricted to.</td>
</tr>
<tr class="row-even"><td>is_confirmed</td>
<td>boolean</td>
<td><code class="docutils literal"><span class="pre">true</span></code> if the bug has been confirmed. Usually
this means that the bug has at some point been
moved out of the <code class="docutils literal"><span class="pre">UNCONFIRMED</span></code> status and into
another open status.</td>
</tr>
<tr class="row-odd"><td>is_open</td>
<td>boolean</td>
<td><code class="docutils literal"><span class="pre">true</span></code> if this bug is open, <code class="docutils literal"><span class="pre">false</span></code> if it
is closed.</td>
</tr>
<tr class="row-even"><td>is_creator_accessible</td>
<td>boolean</td>
<td>If <code class="docutils literal"><span class="pre">true</span></code>, this bug can be accessed by the
creator of the bug, even if they are not a
member of the groups the bug is restricted to.</td>
</tr>
<tr class="row-odd"><td>keywords</td>
<td>array</td>
<td>Each keyword that is on this bug.</td>
</tr>
<tr class="row-even"><td>last_change_time</td>
<td>datetime</td>
<td>When the bug was last changed.</td>
</tr>
<tr class="row-odd"><td>op_sys</td>
<td>string</td>
<td>The name of the operating system that the bug
was filed against.</td>
</tr>
<tr class="row-even"><td>platform</td>
<td>string</td>
<td>The name of the platform (hardware) that the bug
was filed against.</td>
</tr>
<tr class="row-odd"><td>priority</td>
<td>string</td>
<td>The priority of the bug.</td>
</tr>
<tr class="row-even"><td>product</td>
<td>string</td>
<td>The name of the product this bug is in.</td>
</tr>
<tr class="row-odd"><td>qa_contact</td>
<td>string</td>
<td>The login name of the current QA Contact on the
bug.</td>
</tr>
<tr class="row-even"><td>qa_contact_detail</td>
<td>object</td>
<td>An object containing detailed user information
for the qa_contact. To see the keys included in
the user detail object, see below.</td>
</tr>
<tr class="row-odd"><td>remaining_time</td>
<td>double</td>
<td>The number of hours of work remaining until work
on this bug is complete. If you are not in the
time-tracking group, this field will not be
included in the return value.</td>
</tr>
<tr class="row-even"><td>resolution</td>
<td>string</td>
<td>The current resolution of the bug, or an empty
string if the bug is open.</td>
</tr>
<tr class="row-odd"><td>see_also</td>
<td>array</td>
<td>The URLs in the See Also field on the bug.</td>
</tr>
<tr class="row-even"><td>severity</td>
<td>string</td>
<td>The current severity of the bug.</td>
</tr>
<tr class="row-odd"><td>status</td>
<td>string</td>
<td>The current status of the bug.</td>
</tr>
<tr class="row-even"><td>summary</td>
<td>string</td>
<td>The summary of this bug.</td>
</tr>
<tr class="row-odd"><td>target_milestone</td>
<td>string</td>
<td>The milestone that this bug is supposed to be
fixed by, or for closed bugs, the milestone that
it was fixed for.</td>
</tr>
<tr class="row-even"><td>update_token</td>
<td>string</td>
<td>The token that you would have to pass to the
<code class="docutils literal"><span class="pre">process_bug.cgi</span></code> page in order to update this
bug. This changes every time the bug is updated.
This field is not returned to logged-out users.</td>
</tr>
<tr class="row-odd"><td>url</td>
<td>string</td>
<td>A URL that demonstrates the problem described in
the bug, or is somehow related to the bug report.</td>
</tr>
<tr class="row-even"><td>version</td>
<td>string</td>
<td>The version the bug was reported against.</td>
</tr>
<tr class="row-odd"><td>whiteboard</td>
<td>string</td>
<td>The value of the &quot;status whiteboard&quot; field on
the bug.</td>
</tr>
</tbody>
</table>
<p>Custom fields:</p>
<p>Every custom field in this installation will also be included in the
return value. Most fields are returned as strings. However, some field types have
different return values.</p>
<p>Normally custom fields are returned by default similar to normal bug fields or
you can specify only custom fields by using <code class="docutils literal"><span class="pre">_custom</span></code> in <code class="docutils literal"><span class="pre">include_fields</span></code>.</p>
<p>Extra fields:</p>
<p>These fields are returned only by specifying <code class="docutils literal"><span class="pre">_extra</span></code> or the field name in
<code class="docutils literal"><span class="pre">include_fields</span></code>.</p>
<table border="1" class="docutils">
<colgroup>
<col width="5%" />
<col width="6%" />
<col width="88%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>tags</td>
<td>array</td>
<td>Each array item is a tag name. Note that tags are
personal to the currently logged in user and are not the same as
comment tags.</td>
</tr>
</tbody>
</table>
<p>User object:</p>
<table border="1" class="docutils">
<colgroup>
<col width="12%" />
<col width="8%" />
<col width="81%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>id</td>
<td>int</td>
<td>The user ID for this user.</td>
</tr>
<tr class="row-odd"><td>real_name</td>
<td>string</td>
<td>The 'real' name for this user, if any.</td>
</tr>
<tr class="row-even"><td>name</td>
<td>string</td>
<td>The user's Bugzilla login.</td>
</tr>
<tr class="row-odd"><td>email</td>
<td>string</td>
<td>The user's email address. Currently this is the same value as
the name.</td>
</tr>
</tbody>
</table>
<p>Flag object:</p>
<table border="1" class="docutils">
<colgroup>
<col width="22%" />
<col width="10%" />
<col width="68%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>id</td>
<td>int</td>
<td>The ID of the flag.</td>
</tr>
<tr class="row-odd"><td>name</td>
<td>string</td>
<td>The name of the flag.</td>
</tr>
<tr class="row-even"><td>type_id</td>
<td>int</td>
<td>The type ID of the flag.</td>
</tr>
<tr class="row-odd"><td>creation_date</td>
<td>datetime</td>
<td>The timestamp when this flag was originally created.</td>
</tr>
<tr class="row-even"><td>modification_date</td>
<td>datetime</td>
<td>The timestamp when the flag was last modified.</td>
</tr>
<tr class="row-odd"><td>status</td>
<td>string</td>
<td>The current status of the flag.</td>
</tr>
<tr class="row-even"><td>setter</td>
<td>string</td>
<td>The login name of the user who created or last
modified the flag.</td>
</tr>
<tr class="row-odd"><td>requestee</td>
<td>string</td>
<td>The login name of the user this flag has been
requested to be granted or denied. Note, this field
is only returned if a requestee is set.</td>
</tr>
</tbody>
</table>
<p>Custom field object:</p>
<p>You can specify to only return custom fields by specifying <code class="docutils literal"><span class="pre">_custom</span></code> or the
field name in <code class="docutils literal"><span class="pre">include_fields</span></code>.</p>
<ul class="simple">
<li>Bug ID Fields: (int)</li>
<li>Multiple-Selection Fields: (array of strings)</li>
<li>Date/Time Fields: (datetime)</li>
</ul>
</div>
<div class="section" id="bug-history">
<span id="rest-history"></span><h2>6.1.3.2. Bug History<a class="headerlink" href="#bug-history" title="Permalink to this headline">¶</a></h2>
<p>Gets the history of changes for particular bugs in the database.</p>
<p><strong>Request</strong></p>
<p>To get the history for a specific bug ID:</p>
<div class="highlight-text"><div class="highlight"><pre><span></span>GET /rest/bug/(id)/history
</pre></div>
</div>
<p>To get the history for a bug since a specific date:</p>
<div class="highlight-text"><div class="highlight"><pre><span></span>GET /rest/bug/(id)/history?new_since=YYYY-MM-DD
</pre></div>
</div>
<table border="1" class="docutils">
<colgroup>
<col width="12%" />
<col width="10%" />
<col width="78%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><strong>id</strong></td>
<td>mixed</td>
<td>An integer bug ID or alias.</td>
</tr>
<tr class="row-odd"><td>new_since</td>
<td>datetime</td>
<td>A datetime timestamp to only show history since.</td>
</tr>
</tbody>
</table>
<p><strong>Response</strong></p>
<div class="highlight-js"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="s2">&quot;bugs&quot;</span><span class="o">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="s2">&quot;alias&quot;</span><span class="o">:</span> <span class="p">[],</span>
      <span class="s2">&quot;history&quot;</span><span class="o">:</span> <span class="p">[</span>
        <span class="p">{</span>
          <span class="s2">&quot;when&quot;</span><span class="o">:</span> <span class="s2">&quot;2014-09-23T19:12:17Z&quot;</span><span class="p">,</span>
          <span class="s2">&quot;who&quot;</span><span class="o">:</span> <span class="s2">&quot;user@bugzilla.org&quot;</span><span class="p">,</span>
          <span class="s2">&quot;changes&quot;</span><span class="o">:</span> <span class="p">[</span>
            <span class="p">{</span>
              <span class="s2">&quot;added&quot;</span><span class="o">:</span> <span class="s2">&quot;P1&quot;</span><span class="p">,</span>
              <span class="s2">&quot;field_name&quot;</span><span class="o">:</span> <span class="s2">&quot;priority&quot;</span><span class="p">,</span>
              <span class="s2">&quot;removed&quot;</span><span class="o">:</span> <span class="s2">&quot;P2&quot;</span>
            <span class="p">},</span>
            <span class="p">{</span>
              <span class="s2">&quot;removed&quot;</span><span class="o">:</span> <span class="s2">&quot;blocker&quot;</span><span class="p">,</span>
              <span class="s2">&quot;field_name&quot;</span><span class="o">:</span> <span class="s2">&quot;severity&quot;</span><span class="p">,</span>
              <span class="s2">&quot;added&quot;</span><span class="o">:</span> <span class="s2">&quot;critical&quot;</span>
            <span class="p">}</span>
          <span class="p">]</span>
        <span class="p">},</span>
        <span class="p">{</span>
          <span class="s2">&quot;when&quot;</span><span class="o">:</span> <span class="s2">&quot;2014-09-28T21:03:47Z&quot;</span><span class="p">,</span>
          <span class="s2">&quot;who&quot;</span><span class="o">:</span> <span class="s2">&quot;user@bugzilla.org&quot;</span><span class="p">,</span>
          <span class="s2">&quot;changes&quot;</span><span class="o">:</span> <span class="p">[</span>
            <span class="p">{</span>
              <span class="s2">&quot;added&quot;</span><span class="o">:</span> <span class="s2">&quot;blocker?&quot;</span><span class="p">,</span>
              <span class="s2">&quot;removed&quot;</span><span class="o">:</span> <span class="s2">&quot;&quot;</span><span class="p">,</span>
              <span class="s2">&quot;field_name&quot;</span><span class="o">:</span> <span class="s2">&quot;flagtypes.name&quot;</span>
            <span class="p">}</span>
          <span class="p">]</span>
        <span class="p">}</span>
      <span class="p">],</span>
      <span class="s2">&quot;id&quot;</span><span class="o">:</span> <span class="mi">35</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p><code class="docutils literal"><span class="pre">bugs</span></code> (array) Bug objects each containing the following items:</p>
<table border="1" class="docutils">
<colgroup>
<col width="9%" />
<col width="6%" />
<col width="84%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>id</td>
<td>int</td>
<td>The numeric ID of the bug.</td>
</tr>
<tr class="row-odd"><td>alias</td>
<td>array</td>
<td>The unique aliases of this bug. An empty array will be returned
if this bug has no aliases.</td>
</tr>
<tr class="row-even"><td>history</td>
<td>array</td>
<td>An array of History objects.</td>
</tr>
</tbody>
</table>
<p>History object:</p>
<table border="1" class="docutils">
<colgroup>
<col width="9%" />
<col width="10%" />
<col width="81%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>when</td>
<td>datetime</td>
<td>The date the bug activity/change happened.</td>
</tr>
<tr class="row-odd"><td>who</td>
<td>string</td>
<td>The login name of the user who performed the bug change.</td>
</tr>
<tr class="row-even"><td>changes</td>
<td>array</td>
<td>An array of Change objects which contain all the changes that
happened to the bug at this time (as specified by <code class="docutils literal"><span class="pre">when</span></code>).</td>
</tr>
</tbody>
</table>
<p>Change object:</p>
<table border="1" class="docutils">
<colgroup>
<col width="17%" />
<col width="8%" />
<col width="75%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>field_name</td>
<td>string</td>
<td>The name of the bug field that has changed.</td>
</tr>
<tr class="row-odd"><td>removed</td>
<td>string</td>
<td>The previous value of the bug field which has been
deleted by the change.</td>
</tr>
<tr class="row-even"><td>added</td>
<td>string</td>
<td>The new value of the bug field which has been added
by the change.</td>
</tr>
<tr class="row-odd"><td>attachment_id</td>
<td>int</td>
<td>The ID of the attachment that was changed.
This only appears if the change was to an attachment,
otherwise <code class="docutils literal"><span class="pre">attachment_id</span></code> will not be present in this
object.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="search-bugs">
<span id="rest-search-bugs"></span><h2>6.1.3.3. Search Bugs<a class="headerlink" href="#search-bugs" title="Permalink to this headline">¶</a></h2>
<p>Allows you to search for bugs based on particular criteria.</p>
<p><strong>Request</strong></p>
<p>To search for bugs:</p>
<div class="highlight-text"><div class="highlight"><pre><span></span>GET /rest/bug
</pre></div>
</div>
<p>Unless otherwise specified in the description of a parameter, bugs are
returned if they match <em>exactly</em> the criteria you specify in these
parameters. That is, we don't match against substrings--if a bug is in
the &quot;Widgets&quot; product and you ask for bugs in the &quot;Widg&quot; product, you
won't get anything.</p>
<p>Criteria are joined in a logical AND. That is, you will be returned
bugs that match <em>all</em> of the criteria, not bugs that match <em>any</em> of
the criteria.</p>
<p>Each parameter can be either the type it says, or a list of the types
it says. If you pass an array, it means &quot;Give me bugs with <em>any</em> of
these values.&quot; For example, if you wanted bugs that were in either
the &quot;Foo&quot; or &quot;Bar&quot; products, you'd pass:</p>
<div class="highlight-text"><div class="highlight"><pre><span></span>GET /rest/bug?product=Foo&amp;product=Bar
</pre></div>
</div>
<p>Some Bugzillas may treat your arguments case-sensitively, depending
on what database system they are using. Most commonly, though, Bugzilla is
not case-sensitive with the arguments passed (because MySQL is the
most-common database to use with Bugzilla, and MySQL is not case sensitive).</p>
<p>In addition to the fields listed below, you may also use criteria that
is similar to what is used in the Advanced Search screen of the Bugzilla
UI. This includes fields specified by <code class="docutils literal"><span class="pre">Search</span> <span class="pre">by</span> <span class="pre">Change</span> <span class="pre">History</span></code> and
<code class="docutils literal"><span class="pre">Custom</span> <span class="pre">Search</span></code>. The easiest way to determine what the field names are and what
format Bugzilla expects is to first construct your query using the
Advanced Search UI, execute it and use the query parameters in they URL
as your query for the REST call.</p>
<table border="1" class="docutils">
<colgroup>
<col width="20%" />
<col width="10%" />
<col width="70%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>alias</td>
<td>array</td>
<td>The unique aliases of this bug. An empty array will
be returned if this bug has no aliases.</td>
</tr>
<tr class="row-odd"><td>assigned_to</td>
<td>string</td>
<td>The login name of a user that a bug is assigned to.</td>
</tr>
<tr class="row-even"><td>component</td>
<td>string</td>
<td>The name of the Component that the bug is in. Note
that if there are multiple Components with the same
name, and you search for that name, bugs in <em>all</em>
those Components will be returned. If you don't want
this, be sure to also specify the <code class="docutils literal"><span class="pre">product</span></code> argument.</td>
</tr>
<tr class="row-odd"><td>creation_time</td>
<td>datetime</td>
<td>Searches for bugs that were created at this time or
later. May not be an array.</td>
</tr>
<tr class="row-even"><td>creator</td>
<td>string</td>
<td>The login name of the user who created the bug. You
can also pass this argument with the name
<code class="docutils literal"><span class="pre">reporter</span></code>, for backwards compatibility with
older Bugzillas.</td>
</tr>
<tr class="row-odd"><td>id</td>
<td>int</td>
<td>The numeric ID of the bug.</td>
</tr>
<tr class="row-even"><td>last_change_time</td>
<td>datetime</td>
<td>Searches for bugs that were modified at this time
or later. May not be an array.</td>
</tr>
<tr class="row-odd"><td>limit</td>
<td>int</td>
<td>Limit the number of results returned. If the limit
is more than zero and higher than the maximum limit
set by the administrator, then the maximum limit will
be used instead. If you set the limit equal to zero,
then all matching results will be returned instead.</td>
</tr>
<tr class="row-even"><td>offset</td>
<td>int</td>
<td>Used in conjunction with the <code class="docutils literal"><span class="pre">limit</span></code> argument,
<code class="docutils literal"><span class="pre">offset</span></code> defines the starting position for the
search. For example, given a search that would
return 100 bugs, setting <code class="docutils literal"><span class="pre">limit</span></code> to 10 and
<code class="docutils literal"><span class="pre">offset</span></code> to 10 would return bugs 11 through 20
from the set of 100.</td>
</tr>
<tr class="row-odd"><td>op_sys</td>
<td>string</td>
<td>The &quot;Operating System&quot; field of a bug.</td>
</tr>
<tr class="row-even"><td>platform</td>
<td>string</td>
<td>The Platform (sometimes called &quot;Hardware&quot;) field of
a bug.</td>
</tr>
<tr class="row-odd"><td>priority</td>
<td>string</td>
<td>The Priority field on a bug.</td>
</tr>
<tr class="row-even"><td>product</td>
<td>string</td>
<td>The name of the Product that the bug is in.</td>
</tr>
<tr class="row-odd"><td>resolution</td>
<td>string</td>
<td>The current resolution--only set if a bug is closed.
You can find open bugs by searching for bugs with an
empty resolution.</td>
</tr>
<tr class="row-even"><td>severity</td>
<td>string</td>
<td>The Severity field on a bug.</td>
</tr>
<tr class="row-odd"><td>status</td>
<td>string</td>
<td>The current status of a bug (not including its
resolution, if it has one, which is a separate field
above).</td>
</tr>
<tr class="row-even"><td>summary</td>
<td>string</td>
<td>Searches for substrings in the single-line Summary
field on bugs. If you specify an array, then bugs
whose summaries match <em>any</em> of the passed substrings
will be returned. Note that unlike searching in the
Bugzilla UI, substrings are not split on spaces. So
searching for <code class="docutils literal"><span class="pre">foo</span> <span class="pre">bar</span></code> will match &quot;This is a foo
bar&quot; but not &quot;This foo is a bar&quot;. <code class="docutils literal"><span class="pre">['foo',</span> <span class="pre">'bar']</span></code>,
would, however, match the second item.</td>
</tr>
<tr class="row-odd"><td>tags</td>
<td>string</td>
<td>Searches for a bug with the specified tag. If you
specify an array, then any bugs that match <em>any</em> of
the tags will be returned. Note that tags are
personal to the currently logged in user.</td>
</tr>
<tr class="row-even"><td>target_milestone</td>
<td>string</td>
<td>The Target Milestone field of a bug. Note that even
if this Bugzilla does not have the Target Milestone
field enabled, you can still search for bugs by
Target Milestone. However, it is likely that in that
case, most bugs will not have a Target Milestone set
(it defaults to &quot;---&quot; when the field isn't enabled).</td>
</tr>
<tr class="row-odd"><td>qa_contact</td>
<td>string</td>
<td>The login name of the bug's QA Contact. Note that
even if this Bugzilla does not have the QA Contact
field enabled, you can still search for bugs by QA
Contact (though it is likely that no bug will have a
QA Contact set, if the field is disabled).</td>
</tr>
<tr class="row-even"><td>url</td>
<td>string</td>
<td>The &quot;URL&quot; field of a bug.</td>
</tr>
<tr class="row-odd"><td>version</td>
<td>string</td>
<td>The Version field of a bug.</td>
</tr>
<tr class="row-even"><td>whiteboard</td>
<td>string</td>
<td>Search the &quot;Status Whiteboard&quot; field on bugs for a
substring. Works the same as the <code class="docutils literal"><span class="pre">summary</span></code> field
described above, but searches the Status Whiteboard
field.</td>
</tr>
<tr class="row-odd"><td>quicksearch</td>
<td>string</td>
<td>Search for bugs using quicksearch syntax.</td>
</tr>
</tbody>
</table>
<p><strong>Response</strong></p>
<p>The same as <a class="reference internal" href="#rest-single-bug"><span class="std std-ref">Get Bug</span></a>.</p>
</div>
<div class="section" id="create-bug">
<span id="rest-create-bug"></span><h2>6.1.3.4. Create Bug<a class="headerlink" href="#create-bug" title="Permalink to this headline">¶</a></h2>
<p>This allows you to create a new bug in Bugzilla. If you specify any
invalid fields, an error will be thrown stating which field is invalid.
If you specify any fields you are not allowed to set, they will just be
set to their defaults or ignored.</p>
<p>You cannot currently set all the items here that you can set on enter_bug.cgi.</p>
<p>The WebService interface may allow you to set things other than those listed
here, but realize that anything undocumented here may likely change in the
future.</p>
<p><strong>Request</strong></p>
<p>To create a new bug in Bugzilla.</p>
<div class="highlight-text"><div class="highlight"><pre><span></span>POST /rest/bug
</pre></div>
</div>
<div class="highlight-js"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="s2">&quot;product&quot;</span> <span class="o">:</span> <span class="s2">&quot;TestProduct&quot;</span><span class="p">,</span>
  <span class="s2">&quot;component&quot;</span> <span class="o">:</span> <span class="s2">&quot;TestComponent&quot;</span><span class="p">,</span>
  <span class="s2">&quot;version&quot;</span> <span class="o">:</span> <span class="s2">&quot;unspecified&quot;</span><span class="p">,</span>
  <span class="s2">&quot;summary&quot;</span> <span class="o">:</span> <span class="s2">&quot;&#39;This is a test bug - please disregard&quot;</span><span class="p">,</span>
  <span class="s2">&quot;alias&quot;</span> <span class="o">:</span> <span class="s2">&quot;SomeAlias&quot;</span><span class="p">,</span>
  <span class="s2">&quot;op_sys&quot;</span> <span class="o">:</span> <span class="s2">&quot;All&quot;</span><span class="p">,</span>
  <span class="s2">&quot;priority&quot;</span> <span class="o">:</span> <span class="s2">&quot;P1&quot;</span><span class="p">,</span>
  <span class="s2">&quot;rep_platform&quot;</span> <span class="o">:</span> <span class="s2">&quot;All&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
<p>Some params must be set, or an error will be thrown. These params are
marked in <strong>bold</strong>.</p>
<p>Some parameters can have defaults set in Bugzilla, by the administrator.
If these parameters have defaults set, you can omit them. These parameters
are marked (defaulted).</p>
<p>Clients that want to be able to interact uniformly with multiple
Bugzillas should always set both the params marked required and those
marked (defaulted), because some Bugzillas may not have defaults set
for (defaulted) parameters, and then this method will throw an error
if you don't specify them.</p>
<table border="1" class="docutils">
<colgroup>
<col width="23%" />
<col width="9%" />
<col width="68%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><strong>product</strong></td>
<td>string</td>
<td>The name of the product the bug is being filed
against.</td>
</tr>
<tr class="row-odd"><td><strong>component</strong></td>
<td>string</td>
<td>The name of a component in the product above.</td>
</tr>
<tr class="row-even"><td><strong>summary</strong></td>
<td>string</td>
<td>A brief description of the bug being filed.</td>
</tr>
<tr class="row-odd"><td><strong>version</strong></td>
<td>string</td>
<td>A version of the product above; the version the
bug was found in.</td>
</tr>
<tr class="row-even"><td>description</td>
<td>string</td>
<td>(defaulted) The initial description for this bug.
Some Bugzilla installations require this to not be
blank.</td>
</tr>
<tr class="row-odd"><td>op_sys</td>
<td>string</td>
<td>(defaulted) The operating system the bug was
discovered on.</td>
</tr>
<tr class="row-even"><td>platform</td>
<td>string</td>
<td>(defaulted) What type of hardware the bug was
experienced on.</td>
</tr>
<tr class="row-odd"><td>priority</td>
<td>string</td>
<td>(defaulted) What order the bug will be fixed in by
the developer, compared to the developer's other
bugs.</td>
</tr>
<tr class="row-even"><td>severity</td>
<td>string</td>
<td>(defaulted) How severe the bug is.</td>
</tr>
<tr class="row-odd"><td>alias</td>
<td>array</td>
<td>One or more brief aliases for the bug that can be
used instead of a bug number when accessing this bug.
Must be unique in all of this Bugzilla.</td>
</tr>
<tr class="row-even"><td>assigned_to</td>
<td>string</td>
<td>A user to assign this bug to, if you don't want it
to be assigned to the component owner.</td>
</tr>
<tr class="row-odd"><td>cc</td>
<td>array</td>
<td>An array of usernames to CC on this bug.</td>
</tr>
<tr class="row-even"><td>comment_is_private</td>
<td>boolean</td>
<td>If set to true, the description is private,
otherwise it is assumed to be public.</td>
</tr>
<tr class="row-odd"><td>groups</td>
<td>array</td>
<td>An array of group names to put this bug into. You
can see valid group names on the Permissions tab of
the Preferences screen, or, if you are an
administrator, in the Groups control panel. If you
don't specify this argument, then the bug will be
added into all the groups that are set as being
&quot;Default&quot; for this product. (If you want to avoid
that, you should specify <code class="docutils literal"><span class="pre">groups</span></code> as an empty
array.)</td>
</tr>
<tr class="row-even"><td>qa_contact</td>
<td>string</td>
<td>If this installation has QA Contacts enabled, you
can set the QA Contact here if you don't want to
use the component's default QA Contact.</td>
</tr>
<tr class="row-odd"><td>status</td>
<td>string</td>
<td>The status that this bug should start out as. Note
that only certain statuses can be set on bug
creation.</td>
</tr>
<tr class="row-even"><td>resolution</td>
<td>string</td>
<td>If you are filing a closed bug, then you will have
to specify a resolution. You cannot currently
specify a resolution of <code class="docutils literal"><span class="pre">DUPLICATE</span></code>   for new
bugs, though. That must be done with
<a class="reference internal" href="#rest-update-bug"><span class="std std-ref">Update Bug</span></a>.</td>
</tr>
<tr class="row-odd"><td>target_milestone</td>
<td>string</td>
<td>A valid target milestone for this product.</td>
</tr>
<tr class="row-even"><td>flags</td>
<td>array</td>
<td>Flags objects to add to the bug. The object format
is described in the Flag object below.</td>
</tr>
</tbody>
</table>
<p>Flag object:</p>
<p>To create a flag, at least the <code class="docutils literal"><span class="pre">status</span></code> and the <code class="docutils literal"><span class="pre">type_id</span></code> or <code class="docutils literal"><span class="pre">name</span></code> must
be provided. An optional requestee can be passed if the flag type is requestable
to a specific user.</p>
<table border="1" class="docutils">
<colgroup>
<col width="12%" />
<col width="8%" />
<col width="81%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>name</td>
<td>string</td>
<td>The name of the flag type.</td>
</tr>
<tr class="row-odd"><td>type_id</td>
<td>int</td>
<td>The internal flag type ID.</td>
</tr>
<tr class="row-even"><td>status</td>
<td>string</td>
<td>The flags new status (i.e. &quot;?&quot;, &quot;+&quot;, &quot;-&quot; or &quot;X&quot; to clear flag).</td>
</tr>
<tr class="row-odd"><td>requestee</td>
<td>string</td>
<td>The login of the requestee if the flag type is requestable
to a specific user.</td>
</tr>
</tbody>
</table>
<p>In addition to the above parameters, if your installation has any custom
fields, you can set them just by passing in the name of the field and
its value as a string.</p>
<p><strong>Response</strong></p>
<div class="highlight-js"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="s2">&quot;id&quot;</span> <span class="o">:</span> <span class="mi">12345</span>
<span class="p">}</span>
</pre></div>
</div>
<table border="1" class="docutils">
<colgroup>
<col width="9%" />
<col width="9%" />
<col width="83%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>id</td>
<td>int</td>
<td>This is the ID of the newly-filed bug.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="update-bug">
<span id="rest-update-bug"></span><h2>6.1.3.5. Update Bug<a class="headerlink" href="#update-bug" title="Permalink to this headline">¶</a></h2>
<p>Allows you to update the fields of a bug. Automatically sends emails
out about the changes.</p>
<p><strong>Request</strong></p>
<p>To update the fields of a current bug.</p>
<div class="highlight-text"><div class="highlight"><pre><span></span>PUT /rest/bug/(id_or_alias)
</pre></div>
</div>
<div class="highlight-js"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="s2">&quot;ids&quot;</span> <span class="o">:</span> <span class="p">[</span><span class="mi">35</span><span class="p">],</span>
  <span class="s2">&quot;status&quot;</span> <span class="o">:</span> <span class="s2">&quot;IN_PROGRESS&quot;</span><span class="p">,</span>
  <span class="s2">&quot;keywords&quot;</span> <span class="o">:</span> <span class="p">{</span>
    <span class="s2">&quot;add&quot;</span> <span class="o">:</span> <span class="p">[</span><span class="s2">&quot;funny&quot;</span><span class="p">,</span> <span class="s2">&quot;stupid&quot;</span><span class="p">]</span>
  <span class="p">}</span>
<span class="p">}</span>
</pre></div>
</div>
<p>The params to include in the PUT body as well as the returned data format,
are the same as below. You can specify the ID or alias of the bug to update
either in the URL path and/or in the <code class="docutils literal"><span class="pre">ids</span></code> param. You can use both and they
will be combined so you can edit more than one bug at a time.</p>
<table border="1" class="docutils">
<colgroup>
<col width="19%" />
<col width="6%" />
<col width="74%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><strong>id_or_alias</strong></td>
<td>mixed</td>
<td>An integer bug ID or alias.</td>
</tr>
<tr class="row-odd"><td><strong>ids</strong></td>
<td>array</td>
<td>The IDs or aliases of the bugs that you want to modify.</td>
</tr>
</tbody>
</table>
<p>All following fields specify the values you want to set on the bugs you are
updating.</p>
<table border="1" class="docutils">
<colgroup>
<col width="27%" />
<col width="9%" />
<col width="65%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>alias</td>
<td>object</td>
<td><p class="first">These specify the aliases of a bug that can be
used instead of a bug number when acessing this
bug. To set these, you should pass a hash as the
value. The object may contain the following
items:</p>
<ul class="simple">
<li><code class="docutils literal"><span class="pre">add</span></code> (array) Aliases to add to this field.</li>
<li><code class="docutils literal"><span class="pre">remove</span></code> (array) Aliases to remove from this
field. If the aliases are not already in the
field, they will be ignored.</li>
<li><code class="docutils literal"><span class="pre">set</span></code> (array) An exact set of aliases to set
this field to, overriding the current value.
If you specify <code class="docutils literal"><span class="pre">set</span></code>, then <code class="docutils literal"><span class="pre">add</span></code> and
<code class="docutils literal"><span class="pre">remove</span></code> will be ignored.</li>
</ul>
<p>You can only set this if you are modifying a
single bug. If there is more than one bug
specified in <code class="docutils literal"><span class="pre">ids</span></code>, passing in a value for
<code class="docutils literal"><span class="pre">alias</span></code> will cause an error to be thrown.</p>
<p class="last">For backwards compatibility, you can also
specify a single string. This will be treated as
if you specified the set key above.</p>
</td>
</tr>
<tr class="row-odd"><td>assigned_to</td>
<td>string</td>
<td>The full login name of the user this bug is
assigned to.</td>
</tr>
<tr class="row-even"><td>blocks</td>
<td>object</td>
<td>(Same as <code class="docutils literal"><span class="pre">depends_on</span></code> below)</td>
</tr>
<tr class="row-odd"><td>depends_on</td>
<td>object</td>
<td><p class="first">These specify the bugs that this bug blocks or
depends on, respectively. To set these, you
should pass an object as the value. The object
may contain the following items:</p>
<ul class="last simple">
<li><code class="docutils literal"><span class="pre">add</span></code> (array) Bug IDs to add to this field.</li>
<li><code class="docutils literal"><span class="pre">remove</span></code> (array) Bug IDs to remove from this
field. If the bug IDs are not already in the
field, they will be ignored.</li>
<li><code class="docutils literal"><span class="pre">set</span></code> (array of) An exact set of bug IDs to
set this field to, overriding the current
value. If you specify <code class="docutils literal"><span class="pre">set</span></code>, then <code class="docutils literal"><span class="pre">add</span></code>
and <code class="docutils literal"><span class="pre">remove</span></code> will be ignored.</li>
</ul>
</td>
</tr>
<tr class="row-even"><td>cc</td>
<td>object</td>
<td><p class="first">The users on the cc list. To modify this field,
pass an object, which may have the following
items:</p>
<ul class="last simple">
<li><code class="docutils literal"><span class="pre">add</span></code> (array) User names to add to the CC
list. They must be full user names, and an
error will be thrown if you pass in an invalid
user name.</li>
<li><code class="docutils literal"><span class="pre">remove</span></code> (array) User names to remove from
the CC list. They must be full user names, and
an error will be thrown if you pass in an
invalid user name.</li>
</ul>
</td>
</tr>
<tr class="row-odd"><td>is_cc_accessible</td>
<td>boolean</td>
<td>Whether or not users in the CC list are allowed
to access the bug, even if they aren't in a group
that can normally access the bug.</td>
</tr>
<tr class="row-even"><td>comment</td>
<td>object</td>
<td><p class="first">A comment on the change. The object may contain
the following items:</p>
<ul class="last simple">
<li><code class="docutils literal"><span class="pre">body</span></code> (string) The actual text of the
comment. For compatibility with the parameters
to <a class="reference internal" href="comment.html#rest-add-comment"><span class="std std-ref">Create Comments</span></a>, you can also call
this field <code class="docutils literal"><span class="pre">comment</span></code>, if you want.</li>
<li><code class="docutils literal"><span class="pre">is_private</span></code> (boolean) Whether the comment is
private or not. If you try to make a comment
private and you don't have the permission to,
an error will be thrown.</li>
</ul>
</td>
</tr>
<tr class="row-odd"><td>comment_is_private</td>
<td>object</td>
<td><p class="first">This is how you update the privacy of comments
that are already on a bug. This is a object,
where the keys are the <code class="docutils literal"><span class="pre">int</span></code> ID of comments
(not their count on a bug, like #1, #2, #3, but
their globally-unique ID, as returned by
<a class="reference internal" href="comment.html#rest-comments"><span class="std std-ref">Get Comments</span></a> and the value is a
<code class="docutils literal"><span class="pre">boolean</span></code> which specifies whether that comment
should become private (<code class="docutils literal"><span class="pre">true</span></code>) or public
(<code class="docutils literal"><span class="pre">false</span></code>).</p>
<p class="last">The comment IDs must be valid for the bug being
updated. Thus, it is not practical to use this
while updating multiple bugs at once, as a single
comment ID will never be valid on multiple bugs.</p>
</td>
</tr>
<tr class="row-even"><td>component</td>
<td>string</td>
<td>The Component the bug is in.</td>
</tr>
<tr class="row-odd"><td>deadline</td>
<td>date</td>
<td>The Deadline field is a date specifying when the
bug must be completed by, in the format
<code class="docutils literal"><span class="pre">YYYY-MM-DD</span></code>.</td>
</tr>
<tr class="row-even"><td>dupe_of</td>
<td>int</td>
<td>The bug that this bug is a duplicate of. If you
want to mark a bug as a duplicate, the safest
thing to do is to set this value and <em>not</em> set
the <code class="docutils literal"><span class="pre">status</span></code> or <code class="docutils literal"><span class="pre">resolutio</span></code> fields. They will
automatically be set by Bugzilla to the
appropriate values for duplicate bugs.</td>
</tr>
<tr class="row-odd"><td>estimated_time</td>
<td>double</td>
<td>The total estimate of time required to fix the
bug, in hours. This is the <em>total</em> estimate, not
the amount of time remaining to fix it.</td>
</tr>
<tr class="row-even"><td>flags</td>
<td>array</td>
<td>An array of Flag change objects. The items needed
are described below.</td>
</tr>
<tr class="row-odd"><td>groups</td>
<td>object</td>
<td><p class="first">The groups a bug is in. To modify this field,
pass an object, which may have the following
items:</p>
<ul class="last simple">
<li><code class="docutils literal"><span class="pre">add</span></code> (array) The names of groups to add.
Passing in an invalid group name or a group
that you cannot add to this bug will cause an
error to be thrown.</li>
<li><code class="docutils literal"><span class="pre">remove</span></code> (array) The names of groups to
remove. Passing in an invalid group name or a
group that you cannot remove from this bug
will cause an error to be thrown.</li>
</ul>
</td>
</tr>
<tr class="row-even"><td>keywords</td>
<td>object</td>
<td><p class="first">Keywords on the bug. To modify this field, pass
an object, which may have the following items:</p>
<ul class="last simple">
<li><code class="docutils literal"><span class="pre">add</span></code> (array) The names of keywords to add
to the field on the bug. Passing something that
isn't a valid keyword name will cause an error
to be thrown.</li>
<li><code class="docutils literal"><span class="pre">remove</span></code> (array) The names of keywords to
remove from the field on the bug. Passing
something that isn't a valid keyword name will
cause an error to be thrown.</li>
<li><code class="docutils literal"><span class="pre">set</span></code> (array) An exact set of keywords to set
the field to, on the bug. Passing something
that isn't a valid keyword name will cause an
error to be thrown. Specifying <code class="docutils literal"><span class="pre">set</span></code>
overrides <code class="docutils literal"><span class="pre">add</span></code> and <code class="docutils literal"><span class="pre">remove</span></code>.</li>
</ul>
</td>
</tr>
<tr class="row-odd"><td>op_sys</td>
<td>string</td>
<td>The Operating System (&quot;OS&quot;) field on the bug.</td>
</tr>
<tr class="row-even"><td>platform</td>
<td>string</td>
<td>The Platform or &quot;Hardware&quot; field on the bug.</td>
</tr>
<tr class="row-odd"><td>priority</td>
<td>string</td>
<td>The Priority field on the bug.</td>
</tr>
<tr class="row-even"><td>product</td>
<td>string</td>
<td><p class="first">The name of the product that the bug is in. If
you change this, you will probably also want to
change <code class="docutils literal"><span class="pre">target_milestone</span></code>, <code class="docutils literal"><span class="pre">version</span></code>, and
<code class="docutils literal"><span class="pre">component</span></code>, since those have different legal
values in every product.</p>
<p>If you cannot change the <code class="docutils literal"><span class="pre">target_milestone</span></code>
field, it will be reset to the default for the
product, when you move a bug to a new product.</p>
<p>You may also wish to add or remove groups, as
which groups are
valid on a bug depends on the product. Groups
that are not valid in the new product will be
automatically removed, and groups which are
mandatory in the new product will be automaticaly
added, but no other automatic group changes will
be done.</p>
<div class="last admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Users can only move a bug into a product if
they would normally have permission to file
new bugs in that product.</p>
</div>
</td>
</tr>
<tr class="row-odd"><td>qa_contact</td>
<td>string</td>
<td>The full login name of the bug's QA Contact.</td>
</tr>
<tr class="row-even"><td>is_creator_accessible</td>
<td>boolean</td>
<td>Whether or not the bug's reporter is allowed
to access the bug, even if they aren't in a group
that can normally access the bug.</td>
</tr>
<tr class="row-odd"><td>remaining_time</td>
<td>double</td>
<td>How much work time is remaining to fix the bug,
in hours. If you set <code class="docutils literal"><span class="pre">work_time</span></code> but don't
explicitly set <code class="docutils literal"><span class="pre">remaining_time</span></code>, then the
<code class="docutils literal"><span class="pre">work_time</span></code> will be deducted from the bug's
<code class="docutils literal"><span class="pre">remaining_time</span></code>.</td>
</tr>
<tr class="row-even"><td>reset_assigned_to</td>
<td>boolean</td>
<td>If true, the <code class="docutils literal"><span class="pre">assigned_to</span></code> field will be
reset to the default for the component that the
bug is in. (If you have set the component at the
same time as using this, then the component used
will be the new component, not the old one.)</td>
</tr>
<tr class="row-odd"><td>reset_qa_contact</td>
<td>boolean</td>
<td>If true, the <code class="docutils literal"><span class="pre">qa_contact</span></code> field will be reset
to the default for the component that the bug is
in. (If you have set the component at the same
time as using this, then the component used will
be the new component, not the old one.)</td>
</tr>
<tr class="row-even"><td>resolution</td>
<td>string</td>
<td><p class="first">The current resolution. May only be set if you
are closing a bug or if you are modifying an
already-closed bug. Attempting to set the
resolution to <em>any</em> value (even an empty or null
string) on an open bug will cause an error to be
thrown.</p>
<div class="last admonition note">
<p class="first admonition-title">Note</p>
<p class="last">If you change the <code class="docutils literal"><span class="pre">status</span></code> field to an open
status, the resolution field will automatically
be cleared, so you don't have to clear it
manually.</p>
</div>
</td>
</tr>
<tr class="row-odd"><td>see_also</td>
<td>object</td>
<td><p class="first">The See Also field on a bug, specifying URLs to
bugs in other bug trackers. To modify this field,
pass an object, which may have the following
items:</p>
<ul class="last simple">
<li><code class="docutils literal"><span class="pre">add</span></code> (array) URLs to add to the field. Each
URL must be a valid URL to a bug-tracker, or
an error will be thrown.</li>
<li><code class="docutils literal"><span class="pre">remove</span></code> (array) URLs to remove from the
field. Invalid URLs will be ignored.</li>
</ul>
</td>
</tr>
<tr class="row-even"><td>severity</td>
<td>string</td>
<td>The Severity field of a bug.</td>
</tr>
<tr class="row-odd"><td>status</td>
<td>string</td>
<td>The status you want to change the bug to. Note
that if a bug is changing from open to closed,
you should also specify a <code class="docutils literal"><span class="pre">resolution</span></code>.</td>
</tr>
<tr class="row-even"><td>summary</td>
<td>string</td>
<td>The Summary field of the bug.</td>
</tr>
<tr class="row-odd"><td>target_milestone</td>
<td>string</td>
<td>The bug's Target Milestone.</td>
</tr>
<tr class="row-even"><td>url</td>
<td>string</td>
<td>The &quot;URL&quot; field of a bug.</td>
</tr>
<tr class="row-odd"><td>version</td>
<td>string</td>
<td>The bug's Version field.</td>
</tr>
<tr class="row-even"><td>whiteboard</td>
<td>string</td>
<td>The Status Whiteboard field of a bug.</td>
</tr>
<tr class="row-odd"><td>work_time</td>
<td>double</td>
<td>The number of hours worked on this bug as part
of this change.
If you set <code class="docutils literal"><span class="pre">work_time</span></code> but don't explicitly
set <code class="docutils literal"><span class="pre">remaining_time</span></code>, then the <code class="docutils literal"><span class="pre">work_time</span></code>
will be deducted from the bug's <code class="docutils literal"><span class="pre">remaining_time</span></code>.</td>
</tr>
</tbody>
</table>
<p>You can also set the value of any custom field by passing its name as
a parameter, and the value to set the field to. For multiple-selection
fields, the value should be an array of strings.</p>
<p>Flag change object:</p>
<p>The following values can be specified. At least the <code class="docutils literal"><span class="pre">status</span></code> and one of
<code class="docutils literal"><span class="pre">type_id</span></code>, <code class="docutils literal"><span class="pre">id</span></code>, or <code class="docutils literal"><span class="pre">name</span></code> must be specified. If a <code class="docutils literal"><span class="pre">type_id</span></code> or
<code class="docutils literal"><span class="pre">name</span></code> matches a single currently set flag, the flag will be updated unless
<code class="docutils literal"><span class="pre">new</span></code> is specified.</p>
<table border="1" class="docutils">
<colgroup>
<col width="13%" />
<col width="9%" />
<col width="78%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>name</td>
<td>string</td>
<td>The name of the flag that will be created or updated.</td>
</tr>
<tr class="row-odd"><td>type_id</td>
<td>int</td>
<td>The internal flag type ID that will be created or updated.
You will need to specify the <code class="docutils literal"><span class="pre">type_id</span></code> if more than one
flag type of the same name exists.</td>
</tr>
<tr class="row-even"><td><strong>status</strong></td>
<td>string</td>
<td>The flags new status (i.e. &quot;?&quot;, &quot;+&quot;, &quot;-&quot; or &quot;X&quot; to clear a
flag).</td>
</tr>
<tr class="row-odd"><td>requestee</td>
<td>string</td>
<td>The login of the requestee if the flag type is requestable
to a specific user.</td>
</tr>
<tr class="row-even"><td>id</td>
<td>int</td>
<td>Use ID to specify the flag to be updated. You will need to
specify the <code class="docutils literal"><span class="pre">id</span></code> if more than one flag is set of the same
name.</td>
</tr>
<tr class="row-odd"><td>new</td>
<td>boolean</td>
<td>Set to true if you specifically want a new flag to be
created.</td>
</tr>
</tbody>
</table>
<p><strong>Response</strong></p>
<div class="highlight-js"><div class="highlight"><pre><span></span><span class="p">{</span>
  <span class="s2">&quot;bugs&quot;</span> <span class="o">:</span> <span class="p">[</span>
    <span class="p">{</span>
      <span class="s2">&quot;alias&quot;</span> <span class="o">:</span> <span class="p">[],</span>
      <span class="s2">&quot;changes&quot;</span> <span class="o">:</span> <span class="p">{</span>
        <span class="s2">&quot;keywords&quot;</span> <span class="o">:</span> <span class="p">{</span>
          <span class="s2">&quot;added&quot;</span> <span class="o">:</span> <span class="s2">&quot;funny, stupid&quot;</span><span class="p">,</span>
          <span class="s2">&quot;removed&quot;</span> <span class="o">:</span> <span class="s2">&quot;&quot;</span>
        <span class="p">},</span>
          <span class="s2">&quot;status&quot;</span> <span class="o">:</span> <span class="p">{</span>
            <span class="s2">&quot;added&quot;</span> <span class="o">:</span> <span class="s2">&quot;IN_PROGRESS&quot;</span><span class="p">,</span>
            <span class="s2">&quot;removed&quot;</span> <span class="o">:</span> <span class="s2">&quot;CONFIRMED&quot;</span>
        <span class="p">}</span>
      <span class="p">},</span>
      <span class="s2">&quot;id&quot;</span> <span class="o">:</span> <span class="mi">35</span><span class="p">,</span>
      <span class="s2">&quot;last_change_time&quot;</span> <span class="o">:</span> <span class="s2">&quot;2014-09-29T14:25:35Z&quot;</span>
    <span class="p">}</span>
  <span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p><code class="docutils literal"><span class="pre">bugs</span></code> (array) This points to an array of objects with the following items:</p>
<table border="1" class="docutils">
<colgroup>
<col width="21%" />
<col width="10%" />
<col width="69%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">name</th>
<th class="head">type</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>id</td>
<td>int</td>
<td>The ID of the bug that was updated.</td>
</tr>
<tr class="row-odd"><td>alias</td>
<td>array</td>
<td>The aliases of the bug that was updated, if this bug
has any alias.</td>
</tr>
<tr class="row-even"><td>last_change_time</td>
<td>datetime</td>
<td>The exact time that this update was done at, for
this bug. If no update was done (that is, no fields
had their values changed and no comment was added)
then this will instead be the last time the bug was
updated.</td>
</tr>
<tr class="row-odd"><td>changes</td>
<td>object</td>
<td><p class="first">The changes that were actually done on this bug. The
keys are the names of the fields that were changed,
and the values are an object with two keys:</p>
<ul class="last simple">
<li><code class="docutils literal"><span class="pre">added</span></code> (string) The values that were added to
this field, possibly a comma-and-space-separated
list if multiple values were added.</li>
<li><code class="docutils literal"><span class="pre">removed</span></code> (string) The values that were removed
from this field, possibly a
comma-and-space-separated list if multiple values
were removed.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Currently, some fields are not tracked in changes: <code class="docutils literal"><span class="pre">comment</span></code>,
<code class="docutils literal"><span class="pre">comment_is_private</span></code>, and <code class="docutils literal"><span class="pre">work_time</span></code>. This means that they will not
show up in the return value even if they were successfully updated.
This may change in a future version of Bugzilla.</p>
<hr class="docutils" />
<p>This documentation undoubtedly has bugs; if you find some, please file
them <a class="reference external" href="https://bugzilla.mozilla.org/enter_bug.cgi?product=Bugzilla&amp;component=Documentation">here</a>.</p>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
            <p class="logo"><a href="../../../index.html">
              <img class="logo" src="../../../_static/bugzilla.png" alt="Logo"/>
            </a></p>
  <h3><a href="../../../index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">6.1.3. Bugs</a><ul>
<li><a class="reference internal" href="#get-bug">6.1.3.1. Get Bug</a></li>
<li><a class="reference internal" href="#bug-history">6.1.3.2. Bug History</a></li>
<li><a class="reference internal" href="#search-bugs">6.1.3.3. Search Bugs</a></li>
<li><a class="reference internal" href="#create-bug">6.1.3.4. Create Bug</a></li>
<li><a class="reference internal" href="#update-bug">6.1.3.5. Update Bug</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="attachment.html"
                        title="previous chapter">6.1.2. Attachments</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="bug-user-last-visit.html"
                        title="next chapter">6.1.4. Bug User Last Visited</a></p>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="../../../search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="bug-user-last-visit.html" title="6.1.4. Bug User Last Visited"
             >next</a></li>
        <li class="right" >
          <a href="attachment.html" title="6.1.2. Attachments"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="../../../index.html">Bugzilla 5.0.4 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="../../index.html" >6. WebService API Reference</a> &#187;</li>
          <li class="nav-item nav-item-2"><a href="index.html" >6.1. Core API v1</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.6.
    </div>
  </body>
</html>