multiple_components_update_not_allowed => 1212,
component_need_initialowner => 1213,
+ # BugUserLastVisited errors
+ user_not_involved => 1300,
+
# Errors thrown by the WebService itself. The ones that are negative
# conform to http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php
xmlrpc_invalid_value => -32600,
is only returned if a requestee is set.
================= ======== ====================================================
+**Errors**
+
+This method can throw all the same errors as :ref:`rest_single_bug`. In addition,
+it can also throw the following error:
+
+* 304 (Auth Failure, Attachment is Private)
+ You specified the id of a private attachment in the "attachment_ids"
+ argument, and you are not in the "insider group" that can see
+ private attachments.
+
.. _rest_add_attachment:
Create Attachment
ids array Attachment IDs created.
==== ===== =========================
+**Errors**
+
+This method can throw all the same errors as :ref:`rest_single_bug`, plus:
+
+* 129 (Flag Status Invalid)
+ The flag status is invalid.
+* 130 (Flag Modification Denied)
+ You tried to request, grant, or deny a flag but only a user with the required
+ permissions may make the change.
+* 131 (Flag not Requestable from Specific Person)
+ You can't ask a specific person for the flag.
+* 133 (Flag Type not Unique)
+ The flag type specified matches several flag types. You must specify
+ the type id value to update or add a flag.
+* 134 (Inactive Flag Type)
+ The flag type is inactive and cannot be used to create new flags.
+* 140 (Markdown Disabled)
+ You tried to set the "is_markdown" flag of the comment to true but the Markdown feature is not enabled.
+* 600 (Attachment Too Large)
+ You tried to attach a file that was larger than Bugzilla will accept.
+* 601 (Invalid MIME Type)
+ You specified a "content_type" argument that was blank, not a valid
+ MIME type, or not a MIME type that Bugzilla accepts for attachments.
+* 603 (File Name Not Specified)
+ You did not specify a valid for the "file_name" argument.
+* 604 (Summary Required)
+ You did not specify a value for the "summary" argument.
+* 606 (Empty Data)
+ You set the "data" field to an empty string.
+
.. _rest_update_attachment:
Update Attachment
* removed: (string) The values that were removed from
this field.
================ ======== =====================================================
+
+**Errors**
+
+This method can throw all the same errors as :ref:`rest_single_bug`, plus:
+
+* 129 (Flag Status Invalid)
+ The flag status is invalid.
+* 130 (Flag Modification Denied)
+ You tried to request, grant, or deny a flag but only a user with the required
+ permissions may make the change.
+* 131 (Flag not Requestable from Specific Person)
+ You can't ask a specific person for the flag.
+* 132 (Flag not Unique)
+ The flag specified has been set multiple times. You must specify the id
+ value to update the flag.
+* 133 (Flag Type not Unique)
+ The flag type specified matches several flag types. You must specify
+ the type id value to update or add a flag.
+* 134 (Inactive Flag Type)
+ The flag type is inactive and cannot be used to create new flags.
+* 140 (Markdown Disabled)
+ You tried to set the "is_markdown" flag of the "comment" to true but Markdown feature is
+ not enabled.
+* 601 (Invalid MIME Type)
+ You specified a "content_type" argument that was blank, not a valid
+ MIME type, or not a MIME type that Bugzilla accepts for attachments.
+* 603 (File Name Not Specified)
+ You did not specify a valid for the "file_name" argument.
+* 604 (Summary Required)
+ You did not specify a value for the "summary" argument.
last_visit_ts datetime The timestamp the user last visited the bug.
============= ======== ============================================
+**Errors**
+
+* 1300 (User Not Involved with Bug)
+ The caller's account is not involved with the bug id provided.
+
.. _rest-bug-user-last-visit-get:
Get Last Visited
* Multiple-Selection Fields: (array of strings)
* Date/Time Fields: (datetime)
+**Errors**
+
+* 100 (Invalid Bug Alias)
+ If you specified an alias and there is no bug with that alias.
+* 101 (Invalid Bug ID)
+ The bug_id you specified doesn't exist in the database.
+* 102 (Access Denied)
+ You do not have access to the bug_id you specified.
+
.. _rest_history:
Bug History
object.
============= ====== ==========================================================
+**Errors**
+
+Same as :ref:`rest_single_bug`.
+
.. _rest_search_bugs:
Search Bugs
The same as :ref:`rest_single_bug`.
+**Errors**
+
+If you specify an invalid value for a particular field, you just won't
+get any results for that value.
+
+* 1000 (Parameters Required)
+ You may not search without any search terms.
+
.. _rest_create_bug:
Create Bug
id int This is the ID of the newly-filed bug.
==== ==== ======================================
+**Errors**
+
+* 51 (Invalid Object)
+ You specified a field value that is invalid. The error message will have
+ more details.
+* 103 (Invalid Alias)
+ The alias you specified is invalid for some reason. See the error message
+ for more details.
+* 104 (Invalid Field)
+ One of the drop-down fields has an invalid value, or a value entered in a
+ text field is too long. The error message will have more detail.
+* 105 (Invalid Component)
+ You didn't specify a component.
+* 106 (Invalid Product)
+ Either you didn't specify a product, this product doesn't exist, or
+ you don't have permission to enter bugs in this product.
+* 107 (Invalid Summary)
+ You didn't specify a summary for the bug.
+* 116 (Dependency Loop)
+ You specified values in the "blocks" or "depends_on" fields
+ that would cause a circular dependency between bugs.
+* 120 (Group Restriction Denied)
+ You tried to restrict the bug to a group which does not exist, or which
+ you cannot use with this product.
+* 129 (Flag Status Invalid)
+ The flag status is invalid.
+* 130 (Flag Modification Denied)
+ You tried to request, grant, or deny a flag but only a user with the required
+ permissions may make the change.
+* 131 (Flag not Requestable from Specific Person)
+ You can't ask a specific person for the flag.
+* 133 (Flag Type not Unique)
+ The flag type specified matches several flag types. You must specify
+ the type id value to update or add a flag.
+* 134 (Inactive Flag Type)
+ The flag type is inactive and cannot be used to create new flags.
+* 504 (Invalid User)
+ Either the QA Contact, Assignee, or CC lists have some invalid user
+ in them. The error message will have more details.
+
.. _rest_update_bug:
Update Bug
===================== ======= =================================================
alias object 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
+ bug. To set these, you should pass an object as
+ the value. The object may contain the following
items:
* ``add`` (array) Aliases to add to this field.
``comment_is_private``, and ``work_time``. 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.
+
+**Errors**
+
+This method can throw all the same errors as :ref:`rest_single_bug`, plus:
+
+* 129 (Flag Status Invalid)
+ The flag status is invalid.
+* 130 (Flag Modification Denied)
+ You tried to request, grant, or deny a flag but only a user with the required
+ permissions may make the change.
+* 131 (Flag not Requestable from Specific Person)
+ You can't ask a specific person for the flag.
+* 132 (Flag not Unique)
+ The flag specified has been set multiple times. You must specify the id
+ value to update the flag.
+* 133 (Flag Type not Unique)
+ The flag type specified matches several flag types. You must specify
+ the type id value to update or add a flag.
+* 134 (Inactive Flag Type)
+ The flag type is inactive and cannot be used to create new flags.
+* 140 (Markdown Disabled)
+ You tried to set the "is_markdown" flag of the "comment" to true but Markdown feature is
+ not enabled.
+* 601 (Invalid MIME Type)
+ You specified a "content_type" argument that was blank, not a valid
+ MIME type, or not a MIME type that Bugzilla accepts for attachments.
+* 603 (File Name Not Specified)
+ You did not specify a valid for the "file_name" argument.
+* 604 (Summary Required)
+ You did not specify a value for the "summary" argument.
description string The description of the classificaion.
sort_key int The value which determines the order the classification is
sorted.
-products array Products the user is authorized to
- access within the classification. Each hash has the
- following keys:
+products array Products the user is authorized to access within the
+ classification. The product object keys are described below.
=========== ====== ============================================================
Product object:
tags array An array of comment tags currently set for the comment.
============= ======== ========================================================
+**Errors**
+
+This method can throw all the same errors as :ref:`rest_single_bug`. In addition,
+it can also throw the following errors:
+
+* 110 (Comment Is Private)
+ You specified the id of a private comment in the "comment_ids"
+ argument, and you are not in the "insider group" that can see
+ private comments.
+* 111 (Invalid Comment ID)
+ You specified an id in the "comment_ids" argument that is invalid--either
+ you specified something that wasn't a number, or there is no comment with
+ that id.
+
.. _rest_add_comment:
Create Comments
id int ID of the newly-created comment.
==== ==== =================================
+**Errors**
+
+* 54 (Hours Worked Too Large)
+ You specified a "work_time" larger than the maximum allowed value of
+ "99999.99".
+* 100 (Invalid Bug Alias)
+ If you specified an alias and there is no bug with that alias.
+* 101 (Invalid Bug ID)
+ The id you specified doesn't exist in the database.
+* 109 (Bug Edit Denied)
+ You did not have the necessary rights to edit the bug.
+* 113 (Can't Make Private Comments)
+ You tried to add a private comment, but don't have the necessary rights.
+* 114 (Comment Too Long)
+ You tried to add a comment longer than the maximum allowed length
+ (65,535 characters).
+* 140 (Markdown Disabled)
+ You tried to set the "is_markdown" flag to true but the Markdown feature
+ is not enabled.
+
.. _rest_search_comment_tags:
Search Comment Tags
An array of matching tags.
+**Errors**
+
+This method can throw all of the errors that :ref:`rest_single_bug` throws, plus:
+
+* 125 (Comment Tagging Disabled)
+ Comment tagging support is not available or enabled.
+
.. _rest_update_comment_tags:
Update Comment Tags
]
An array of strings containing the comment's updated tags.
+
+**Errors**
+
+This method can throw all of the errors that :ref:`rest_single_bug` throws, plus:
+
+* 125 (Comment Tagging Disabled)
+ Comment tagging support is not available or enabled.
+* 126 (Invalid Comment Tag)
+ The comment tag provided was not valid (eg. contains invalid characters).
+* 127 (Comment Tag Too Short)
+ The comment tag provided is shorter than the minimum length.
+* 128 (Comment Tag Too Long)
+ The comment tag provided is longer than the maximum length.
components. You will be able to get information about them as well as manipulate
them.
+.. _rest_create_component:
+
Create Component
----------------
==== ==== ========================================
id int The ID of the newly-added component.
==== ==== ========================================
+
+**Errors**
+
+* 304 (Authorization Failure)
+ You are not authorized to create a new component.
+* 1200 (Component already exists)
+ The name that you specified for the new component already exists in the
+ specified product.
+
+.. _rest_update_component:
+
+Update Component
+----------------
+
+This allows you to update one or more components in Bugzilla.
+
+**Request**
+
+.. code-block:: text
+
+ PUT /rest/component/<component_id>
+ PUT /rest/component/<product_name>/<component_name>
+
+The params to include in the PUT body as well as the returned data format,
+are the same as below. The "ids" and "names" params will be overridden as
+it is pulled from the URL path.
+
+================== ======= ==============================================================
+name type description
+================== ======= ==============================================================
+**ids** array Numeric ids of the components that you wish to update.
+**names** array Objects with names of the components that you wish to update.
+ The object keys are "product" and "component", representing
+ the name of the product and the component you wish to change.
+name string A new name for this component. If you try to set this while
+ updating more than one component for a product, an error
+ will occur, as component names must be unique per product.
+description string Update the long description for these components to this value.
+default_assignee string The login name of the default assignee of the component.
+default_cc array An array of strings with each element representing one
+ login name of the default CC list.
+default_qa_contact string The login name of the default QA contact for the component.
+is_open boolean True if the component is currently allowing bugs to be
+ entered into it, False otherwise.
+================== ======= ==============================================================
+
+**Response**
+
+.. code-block:: js
+
+ {
+ "components" : [
+ {
+ "id" : 123,
+ "changes" : {
+ "name" : {
+ "removed" : "FooName",
+ "added" : "BarName"
+ },
+ "default_assignee" : {
+ "removed" : "foo@company.com",
+ "added" : "bar@company.com"
+ }
+ }
+ }
+ ]
+ }
+
+An object with a single field "components". This points to an array of objects
+with the following fields:
+
+======= ======= =================================================================
+name type description
+======= ======= =================================================================
+id int The id of the component that was updated.
+changes object The changes that were actually done on this component. The keys
+ are the names of the fields that were changed, and the values
+ are an object with two keys:
+
+ added (string) The value that this field was changed to.
+ removed (string) The value that was previously set in this field.
+======= ======= =================================================================
+
+Note that booleans will be represented with the strings '1' and '0'.
+
+**Errors**
+
+* 51 (User does not exist)
+ One of the contact e-mail addresses is not a valid Bugzilla user.
+* 106 (Product access denied)
+ The product you are trying to modify does not exist or you don't have access to it.
+* 706 (Product admin denied)
+ You do not have the permission to change components for this product.
+* 105 (Component name too long)
+ The name specified for this component was longer than the maximum
+ allowed length.
+* 1200 (Component name already exists)
+ You specified the name of a component that already exists.
+ (Component names must be unique per product in Bugzilla.)
+* 1210 (Component blank name)
+ You must specify a non-blank name for this component.
+* 1211 (Component must have description)
+ You must specify a description for this component.
+* 1212 (Component name is not unique)
+ You have attempted to set more than one component in the same product with the
+ same name. Component names must be unique in each product.
+* 1213 (Component needs a default assignee)
+ A default assignee is required for this component.
+
+.. _rest_delete_component:
+
+Delete Component
+----------------
+
+This allows you to delete one or more components in Bugzilla.
+
+**Request**
+
+.. code-block:: text
+
+ DELETE /rest/component/<component_id>
+ DELETE /rest/component/<product_name>/<component_name>
+
+========= ===== ============================================================
+name type description
+========= ===== ============================================================
+**ids** int Numeric ids of the components that you wish to delete.
+**names** array Objects containing the names of the components that you wish
+ to delete. The object keys are "product" and "component",
+ representing the name of the product and the component you
+ wish to delete.
+========= ===== ============================================================
+
+**Response**
+
+An object with a single field "components". This points to an array of objects
+with the following field:
+
+==== ==== =========================================
+name type description
+==== ==== =========================================
+id int The id of the component that was deleted.
+==== ==== =========================================
+
+.. code-block:: js
+
+ {
+ "components" : [
+ {
+ "id" : 123,
+ }
+ ]
+ }
+
+**Errors**
+
+* 106 (Product access denied)
+ The product you are trying to modify does not exist or you don't have access to it.
+* 706 (Product admin denied)
+ You do not have the permission to delete components for this product.
+* 1202 (Component has bugs)
+ The component you are trying to delete currently has bugs assigned to it.
+ You must move these bugs before trying to delete the component.
using this transition.
================= ======= =====================================================
+**Errors**
+
+* 51 (Invalid Field Name or Id)
+ You specified an invalid field name or id.
+
.. _rest_legal_values:
Legal Values
values array The legal values for this field. The values will be sorted
as they normally would be in Bugzilla.
========== ====== =============================================================
+
+**Errors**
+
+* 106 (Invalid Product)
+ You were required to specify a product, and either you didn't, or you
+ specified an invalid product (or a product that you can't access).
+* 108 (Invalid Field Name)
+ You specified a field that doesn't exist or isn't a drop-down field.
bug or attachment.
================ ======= ======================================================
+**Errors**
+
+* 106 (Product Access Denied)
+ Either the product does not exist or you don't have access to it.
+* 51 (Invalid Component)
+ The component provided does not exist in the product.
+
+.. _rest_flagtype_create:
+
Create Flag Type
----------------
flag_id int ID of the new FlagType object is returned.
======= ==== ==============================================
+**Errors**
+
+* 51 (Group Does Not Exist)
+ The group name you entered does not exist, or you do not have access to it.
+* 105 (Unknown component)
+ The component does not exist for this product.
+* 106 (Product Access Denied)
+ Either the product does not exist or you don't have editcomponents privileges
+ to it.
+* 501 (Illegal Email Address)
+ One of the e-mail address in the CC list is invalid. An e-mail in the CC
+ list does NOT need to be a valid Bugzilla user.
+* 1101 (Flag Type Name invalid)
+ You must specify a non-blank name for this flag type. It must
+ no contain spaces or commas, and must be 50 characters or less.
+* 1102 (Flag type must have description)
+ You must specify a description for this flag type.
+* 1103 (Flag type CC list is invalid
+ The CC list must be 200 characters or less.
+* 1104 (Flag Type Sort Key Not Valid)
+ The sort key is not a valid number.
+* 1105 (Flag Type Not Editable)
+ This flag type is not available for the products you can administer. Therefore
+ you can not edit attributes of the flag type, other than the inclusion and
+ exclusion list.
+
.. _rest_flagtype_update:
Update Flag Type
======= ====== ================================================================
Booleans changes will be represented with the strings '1' and '0'.
+
+**Errors**
+
+* 51 (Group Does Not Exist)
+ The group name you entered does not exist, or you do not have access to it.
+* 105 (Unknown component)
+ The component does not exist for this product.
+* 106 (Product Access Denied)
+ Either the product does not exist or you don't have editcomponents privileges
+ to it.
+* 501 (Illegal Email Address)
+ One of the e-mail address in the CC list is invalid. An e-mail in the CC
+ list does NOT need to be a valid Bugzilla user.
+* 1101 (Flag Type Name invalid)
+ You must specify a non-blank name for this flag type. It must
+ no contain spaces or commas, and must be 50 characters or less.
+* 1102 (Flag type must have description)
+ You must specify a description for this flag type.
+* 1103 (Flag type CC list is invalid
+ The CC list must be 200 characters or less.
+* 1104 (Flag Type Sort Key Not Valid)
+ The sort key is not a valid number.
+* 1105 (Flag Type Not Editable)
+ This flag type is not available for the products you can administer. Therefore
+ you can not edit attributes of the flag type, other than the inclusion and
+ exclusion list.
**Excluding Fields**
-``exclude_fields``: The (case-sensitive) names of fields in the return value. The\
-fields specified will not be included in the returned hashes. Fields should
+``exclude_fields``: The (case-sensitive) names of fields in the return value. The
+fields specified will not be included in the returned objects. Fields should
be comma delimited.
Invalid field names are ignored.
id int ID of the newly-created group.
==== ==== ==============================
+**Errors**
+
+* 800 (Empty Group Name)
+ You must specify a value for the "name" field.
+* 801 (Group Exists)
+ There is already another group with the same "name".
+* 802 (Group Missing Description)
+ You must specify a value for the "description" field.
+* 803 (Group Regexp Invalid)
+ You specified an invalid regular expression in the "user_regexp" field.
+
.. _rest_group_update:
Update Group
values were removed.
======= ====== ================================================================
+**Errors**
+
+The same as :ref:`rest_group_create`.
+
.. _rest_group_get:
Get Group
from logging into Bugzilla. If empty, then the user
account is enabled; otherwise it is disabled/closed.
============= ======= =========================================================
+
+**Errors**
+
+* 51 (Invalid Object)
+ A non existing group name was passed to the function, as a result no
+ group object existed for that invalid name.
+* 805 (Cannot view groups)
+ Logged-in users are not authorized to edit bugzilla groups as they are not
+ members of the creategroups group in bugzilla, or they are not authorized to
+ access group member's information as they are not members of the "editusers"
+ group or can bless the group.
id int ID of the newly-filed product.
==== ==== =====================================
+**Errors**
+
+* 51 (Classification does not exist)
+ You must specify an existing classification name.
+* 700 (Product blank name)
+ You must specify a non-blank name for this product.
+* 701 (Product name too long)
+ The name specified for this product was longer than the maximum
+ allowed length.
+* 702 (Product name already exists)
+ You specified the name of a product that already exists.
+ (Product names must be globally unique in Bugzilla.)
+* 703 (Product must have description)
+ You must specify a description for this product.
+* 704 (Product must have version)
+ You must specify a version for this product.
+
.. _rest_product_update:
Update Product
Booleans will be represented with the strings '1' and '0' for changed values
as they are stored as strings in the database currently.
+
+**Errors**
+
+* 700 (Product blank name)
+ You must specify a non-blank name for this product.
+* 701 (Product name too long)
+ The name specified for this product was longer than the maximum
+ allowed length.
+* 702 (Product name already exists)
+ You specified the name of a product that already exists.
+ (Product names must be globally unique in Bugzilla.)
+* 703 (Product must have description)
+ You must specify a description for this product.
+* 705 (Product must define a default milestone)
+ You must define a default milestone.
of the session, i.e. til :ref:`rest_user_logout` is called.
======== ====== ===============================================================
+**Errors**
+
+* 300 (Invalid Username or Password)
+ The username does not exist, or the password is wrong.
+* 301 (Login Disabled)
+ The ability to login with this account has been disabled. A reason may be
+ specified with the error.
+* 305 (New Password Required)
+ The current password is correct, but the user is asked to change
+ their password.
+* 50 (Param Required)
+ A login or password parameter was not provided.
+
.. _rest_user_logout:
Logout
id int The numeric ID of the user that was created.
==== ==== ============================================
+**Errors**
+
+* 502 (Password Too Short)
+ The password specified is too short. (Usually, this means the
+ password is under three characters.)
+
.. _rest_user_update:
Update User
values were removed.
======= ====== ================================================================
+**Errors**
+
+* 51 (Bad Login Name)
+ You passed an invalid login name in the "names" array.
+* 304 (Authorization Required)
+ Logged-in users are not authorized to edit other users.
+
.. _rest_user_get:
Get User
returned are filtered based on your permission to bless each group. The
``saved_searches`` and ``saved_reports`` items are only returned if you are
querying your own account, even if you are in the editusers group.
+
+**Errors**
+
+* 51 (Bad Login Name or Group ID)
+ You passed an invalid login name in the "names" array or a bad
+ group ID in the "group_ids" argument.
+* 52 (Invalid Parameter)
+ The value used must be an integer greater than zero.
+* 304 (Authorization Required)
+ You are logged in, but you are not authorized to see one of the users you
+ wanted to get information about by user id.
+* 505 (User Access By Id or User-Matching Denied)
+ Logged-out users cannot use the "ids" or "match" arguments to this
+ function.
+* 804 (Invalid Group Name)
+ You passed a group name in the "groups" argument which either does not
+ exist or you do not belong to it.