summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2016-02-23 23:06:55 +0100
committerDavid Lawrence <dkl@mozilla.com>2016-02-23 23:06:55 +0100
commit89852803b2c696c62e79372e9dc36331cd728156 (patch)
treebfba5830e08c192c11239df990bdcd8eda6cfe88 /docs
parent14832008c5fb813a86a6b2b78baa50d068675dd9 (diff)
downloadbugzilla-89852803b2c696c62e79372e9dc36331cd728156.tar.gz
bugzilla-89852803b2c696c62e79372e9dc36331cd728156.tar.xz
Bug 1244718 - API documentation is missing error codes
Diffstat (limited to 'docs')
-rw-r--r--docs/en/rst/api/core/v1/attachment.rst70
-rw-r--r--docs/en/rst/api/core/v1/bug-user-last-visit.rst5
-rw-r--r--docs/en/rst/api/core/v1/bug.rst95
-rw-r--r--docs/en/rst/api/core/v1/classification.rst5
-rw-r--r--docs/en/rst/api/core/v1/comment.rst54
-rw-r--r--docs/en/rst/api/core/v1/component.rst65
-rw-r--r--docs/en/rst/api/core/v1/field.rst13
-rw-r--r--docs/en/rst/api/core/v1/flagtype.rst373
-rw-r--r--docs/en/rst/api/core/v1/general.rst4
-rw-r--r--docs/en/rst/api/core/v1/group.rst26
-rw-r--r--docs/en/rst/api/core/v1/product.rst32
-rw-r--r--docs/en/rst/api/core/v1/user.rst43
12 files changed, 340 insertions, 445 deletions
diff --git a/docs/en/rst/api/core/v1/attachment.rst b/docs/en/rst/api/core/v1/attachment.rst
index 70e4c25fd..cbde4ba10 100644
--- a/docs/en/rst/api/core/v1/attachment.rst
+++ b/docs/en/rst/api/core/v1/attachment.rst
@@ -116,6 +116,16 @@ requestee string The login name of the user this flag has been
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
@@ -220,6 +230,36 @@ name type description
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
@@ -347,3 +387,33 @@ changes object The changes that were actually done on this
* 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.
diff --git a/docs/en/rst/api/core/v1/bug-user-last-visit.rst b/docs/en/rst/api/core/v1/bug-user-last-visit.rst
index 919744968..2c3782662 100644
--- a/docs/en/rst/api/core/v1/bug-user-last-visit.rst
+++ b/docs/en/rst/api/core/v1/bug-user-last-visit.rst
@@ -55,6 +55,11 @@ id int The bug id.
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
diff --git a/docs/en/rst/api/core/v1/bug.rst b/docs/en/rst/api/core/v1/bug.rst
index 26c89fa86..310b4a6b7 100644
--- a/docs/en/rst/api/core/v1/bug.rst
+++ b/docs/en/rst/api/core/v1/bug.rst
@@ -281,6 +281,15 @@ field name in ``include_fields``.
* 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
@@ -389,6 +398,10 @@ attachment_id int The ID of the attachment that was changed.
object.
============= ====== ==========================================================
+**Errors**
+
+Same as :ref:`rest_single_bug`.
+
.. _rest_search_bugs:
Search Bugs
@@ -515,6 +528,14 @@ quicksearch string Search for bugs using quicksearch syntax.
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
@@ -655,6 +676,46 @@ name type description
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
@@ -701,8 +762,8 @@ name type description
===================== ======= =================================================
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.
@@ -987,3 +1048,33 @@ Currently, some fields are not tracked in changes: ``comment``,
``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.
diff --git a/docs/en/rst/api/core/v1/classification.rst b/docs/en/rst/api/core/v1/classification.rst
index ef5e58d1b..efff5e50f 100644
--- a/docs/en/rst/api/core/v1/classification.rst
+++ b/docs/en/rst/api/core/v1/classification.rst
@@ -64,9 +64,8 @@ name string The name of the classification.
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:
diff --git a/docs/en/rst/api/core/v1/comment.rst b/docs/en/rst/api/core/v1/comment.rst
index 60fabb93b..45f48c2ab 100644
--- a/docs/en/rst/api/core/v1/comment.rst
+++ b/docs/en/rst/api/core/v1/comment.rst
@@ -104,6 +104,20 @@ is_private boolean ``true`` if this comment is private (only visible to a
otherwise.
============= ======== ========================================================
+**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
@@ -159,6 +173,26 @@ name type description
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
@@ -198,6 +232,13 @@ limit int If provided will return no more than ``limit`` 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
@@ -240,3 +281,16 @@ remove array The tags to detach from the comment.
]
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.
diff --git a/docs/en/rst/api/core/v1/component.rst b/docs/en/rst/api/core/v1/component.rst
deleted file mode 100644
index aceada1a7..000000000
--- a/docs/en/rst/api/core/v1/component.rst
+++ /dev/null
@@ -1,65 +0,0 @@
-Components
-==========
-
-This part of the Bugzilla API allows you to deal with the available product
-components. You will be able to get information about them as well as manipulate
-them.
-
-Create Component
-----------------
-
-This allows you to create a new component in Bugzilla. You must be authenticated
-and be in the *editcomponents* group to perform this action.
-
-**Request**
-
-To create a new component:
-
-.. code-block:: text
-
- POST /rest/component
-
-.. code-block:: js
-
- {
- "product" : "TestProduct",
- "name" : "New Component",
- "description" : "This is a new component",
- "default_assignee" : "dkl@mozilla.com"
- }
-
-Some params must be set, or an error will be thrown. These params are
-shown in **bold**.
-
-==================== ======= ==================================================
-name type description
-==================== ======= ==================================================
-**name** string The name of the new component.
-**product** string The name of the product that the component must
- be added to. This product must already exist, and
- the user have the necessary permissions to edit
- components for it.
-**description** string The description of the new component.
-**default_assignee** string The login name of the default assignee of the
- component.
-default_cc array Each string 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 1 if you want to enable the component for bug
- creations. 0 otherwise. Default is 1.
-==================== ======= ==================================================
-
-**Response**
-
-.. code-block:: js
-
- {
- "id": 27
- }
-
-==== ==== ========================================
-name type description
-==== ==== ========================================
-id int The ID of the newly-added component.
-==== ==== ========================================
diff --git a/docs/en/rst/api/core/v1/field.rst b/docs/en/rst/api/core/v1/field.rst
index d97aa3050..a9ad65eff 100644
--- a/docs/en/rst/api/core/v1/field.rst
+++ b/docs/en/rst/api/core/v1/field.rst
@@ -185,6 +185,11 @@ can_change_to array For ``bug_status`` values, this is an array of
using this transition.
================= ======= =====================================================
+**Errors**
+
+* 51 (Invalid Field Name or Id)
+ You specified an invalid field name or id.
+
.. _rest_legal_values:
Legal Values
@@ -238,3 +243,11 @@ name type description
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.
diff --git a/docs/en/rst/api/core/v1/flagtype.rst b/docs/en/rst/api/core/v1/flagtype.rst
deleted file mode 100644
index 994ac27c8..000000000
--- a/docs/en/rst/api/core/v1/flagtype.rst
+++ /dev/null
@@ -1,373 +0,0 @@
-Flag Types
-==========
-
-This part of the Bugzilla API allows you to get and create bug and attachment
-flags.
-
-.. _rest_flagtype_get:
-
-Get Flag Type
--------------
-
-Get information about valid flag types that can be set for bugs and attachments.
-
-**Request**
-
-To get information about all flag types for a product:
-
-.. code-block:: text
-
- GET /rest/flag_type/(product)
-
-To get information about flag_types for a product and component:
-
-.. code-block:: text
-
- GET /rest/flag_type/(product)/(component)
-
-.. code-block:: js
-
- {
- "bug": [
- {
- "is_multiplicable": false,
- "is_requesteeble": false,
- "values": [
- "X",
- "?",
- "+",
- "-"
- ],
- "id": 11,
- "type": "bug",
- "is_active": true,
- "description": "Blocks the next release",
- "name": "blocker"
- },
- {
- "is_requesteeble": false,
- "is_multiplicable": false,
- "is_active": true,
- "description": "Regression found?",
- "name": "regression",
- "id": 10,
- "type": "bug",
- "values": [
- "X",
- "?",
- "+",
- "-"
- ]
- },
- ],
- "attachment": [
- {
- "is_requesteeble": true,
- "is_multiplicable": true,
- "name": "review",
- "is_active": true,
- "description": "Review the patch for correctness and applicability to the problem.",
- "type": "attachment",
- "id": 1,
- "values": [
- "X",
- "?",
- "+",
- "-"
- ]
- },
- {
- "name": "approval",
- "description": "Approve the patch for check-in to the tree.",
- "is_active": true,
- "values": [
- "X",
- "?",
- "+",
- "-"
- ],
- "type": "attachment",
- "id": 3,
- "is_multiplicable": false,
- "is_requesteeble": false
- }
- ]
- }
-
-You must pass a product name and an optional component name. If the product or
-component names contains a ``/`` character, up will need to url encode it.
-
-=========== ====== ============================================================
-name type description
-=========== ====== ============================================================
-**product** string The name of a valid product.
-component string An optional valid component name associated with the
- product.
-=========== ====== ============================================================
-
-**Response**
-
-An object containing two items, ``bug`` and ``attachment``. Each value is an
-array of objects, containing the following items:
-
-================ ======= ======================================================
-name type description
-================ ======= ======================================================
-id int An integer ID uniquely identifying this flag type.
-name string The name for the flag type.
-type string The target of the flag type which is either ``bug``
- or ``attachment``.
-description string The description of the flag type.
-values array String values that the user can set on the flag type.
-is_requesteeble boolean Users can ask specific other users to set flags of
- this type.
-is_multiplicable boolean Multiple flags of this type can be set for the same
- bug or attachment.
-================ ======= ======================================================
-
-Create Flag Type
-----------------
-
-Create a new flag type. You must be authenticated and be in the *editcomponents*
-group to perform this action.
-
-**Request**
-
-.. code-block:: text
-
- POST /rest/flag_type
-
-.. code-block:: js
-
- {
- "name" : "feedback",
- "description" : "This attachment needs feedback",
- "inclusions" : [ "WorldControl "],
- "target_type" : "attachment"
- }
-
-Some params must be set, or an error will be thrown. The required params are
-marked in **bold**.
-
-=========================== ======= ===========================================
-name type description
-=========================== ======= ===========================================
-**name** string The name of the new flag type.
-**description** string A description for the flag type.
-target_type string The new flag is either for a ``bug`` or an
- ``attachment``.
-inclusions array An array of strings or an object containing
- product names, and optionally component
- names. If you provide a string, the flag
- type will be shown on all bugs in that
- product. If you provide an object, the key
- represents the product name, and the value
- is the components of the product to be
- included.
-exclusions array An array of strings or an object containing
- product names. This uses the same format as
- ``inclusions``. This will exclude the flag
- from all products and components specified.
-sortkey int A number between 1 and 32767 by which this
- type will be sorted when displayed to users
- in a list; ignore if you don't care what
- order the types appear in or if you want
- them to appear in alphabetical order.
-is_active boolean Flag of this type appear in the UI and can
- be set. Default is ``true``.
-is_requestable boolean Users can ask for flags of this type to be
- set. Default is ``true``.
-cc_list array If the flag type is requestable, who should
- receive e-mail notification of requests.
- This is an array of e-mail addresses which\
- do not need to be Bugzilla logins.
-is_specifically_requestable boolean Users can ask specific other users to
- set flags of this type as opposed to just
- asking the wind. Default is ``true``.
-is_multiplicable boolean Multiple flags of this type can be set on
- the same bug. Default is ``true``.
-grant_group string The group allowed to grant/deny flags of
- this type (to allow all users to grant/deny
- these flags, select no group). Default is
- no group.
-request_group string If flags of this type are requestable, the
- group allowed to request them (to allow all
- users to request these flags, select no
- group). Note that the request group alone
- has no effect if the grant group is not
- defined! Default is no group.
-=========================== ======= ===========================================
-
-An example for ``inclusions`` and/or ``exclusions``:
-
-.. code-block:: js
-
- [
- "FooProduct"
- ]
-
- {
- "BarProduct" : [ "C1", "C3" ],
- "BazProduct" : [ "C7" ]
- }
-
-This flag will be added to **all** components of ``FooProduct``, components C1
-and C3 of ``BarProduct``, and C7 of ``BazProduct``.
-
-**Response**
-
-.. code-block:: js
-
- {
- "id": 13
- }
-
-======= ==== ==============================================
-name type description
-======= ==== ==============================================
-flag_id int ID of the new FlagType object is returned.
-======= ==== ==============================================
-
-.. _rest_flagtype_update:
-
-Update Flag Type
-----------------
-
-This allows you to update a flag type in Bugzilla. You must be authenticated
-and be in the *editcomponents* group to perform this action.
-
-**Request**
-
-.. code-block:: text
-
- PUT /rest/flag_type/(id_or_name)
-
-.. code-block:: js
-
- {
- "ids" : [13],
- "name" : "feedback-new",
- "is_requestable" : false
- }
-
-You can edit a single flag type by passing the ID or name of the flag type
-in the URL. To edit more than one flag type, you can specify addition IDs or
-flag type names using the ``ids`` or ``names`` parameters respectively.
-
-One of the below must be specified.
-
-============== ===== ==========================================================
-name type description
-============== ===== ==========================================================
-**id_or_name** mixed Integer flag type ID or name.
-**ids** array Numeric IDs of the flag types that you wish to update.
-**names** array Names of the flag types that you wish to update. If many
- flag types have the same name, this will change **all**
- of them.
-============== ===== ==========================================================
-
-The following parameters specify the new values you want to set for the flag
-types you are updating.
-
-=========================== ======= ===========================================
-name type description
-=========================== ======= ===========================================
-name string A short name identifying this type.
-description string A comprehensive description of this type.
-inclusions array An array of strings or an object containing
- product names, and optionally component
- names. If you provide a string, the flag
- type will be shown on all bugs in that
- product. If you provide an object, the key
- represents the product name, and the value
- is the components of the product to be
- included.
-exclusions array An array of strings or an object containing
- product names. This uses the same format as
- ``inclusions``. This will exclude the flag
- from all products and components specified.
-sortkey int A number between 1 and 32767 by which this
- type will be sorted when displayed to users
- in a list; ignore if you don't care what
- order the types appear in or if you want
- them to appear in alphabetical order.
-is_active boolean Flag of this type appear in the UI and can
- be set.
-is_requestable boolean Users can ask for flags of this type to be
- set.
-cc_list array If the flag type is requestable, who should
- receive e-mail notification of requests.
- This is an array of e-mail addresses
- which do not need to be Bugzilla logins.
-is_specifically_requestable boolean Users can ask specific other users to set
- flags of this type as opposed to just
- asking the wind.
-is_multiplicable boolean Multiple flags of this type can be set on
- the same bug.
-grant_group string The group allowed to grant/deny flags of
- this type (to allow all users to grant/deny
- these flags, select no group).
-request_group string If flags of this type are requestable, the
- group allowed to request them (to allow all
- users to request these flags, select no
- group). Note that the request group alone
- has no effect if the grant group is not
- defined!
-=========================== ======= ===========================================
-
-An example for ``inclusions`` and/or ``exclusions``:
-
-.. code-block:: js
-
- [
- "FooProduct",
- ]
-
- {
- "BarProduct" : [ "C1", "C3" ],
- "BazProduct" : [ "C7" ]
- }
-
-This flag will be added to **all** components of ``FooProduct``,
-components C1 and C3 of ``BarProduct``, and C7 of ``BazProduct``.
-
-**Response**
-
-.. code-block:: js
-
- {
- "flagtypes": [
- {
- "name": "feedback-new",
- "changes": {
- "is_requestable": {
- "added": "0",
- "removed": "1"
- },
- "name": {
- "removed": "feedback",
- "added": "feedback-new"
- }
- },
- "id": 13
- }
- ]
- }
-
-``flagtypes`` (array) Flag change objects containing the following items:
-
-======= ====== ================================================================
-name type description
-======= ====== ================================================================
-id int The ID of the flag type that was updated.
-name string The name of the flag type that was updated.
-changes object The changes that were actually done on this flag type.
- The keys are the names of the fields that were changed, and the
- values are an object with two items:
-
- * added: (string) The value that this field was changed to.
- * removed: (string) The value that was previously set in this
- field.
-======= ====== ================================================================
-
-Booleans changes will be represented with the strings '1' and '0'.
diff --git a/docs/en/rst/api/core/v1/general.rst b/docs/en/rst/api/core/v1/general.rst
index 814592f58..49d60de7e 100644
--- a/docs/en/rst/api/core/v1/general.rst
+++ b/docs/en/rst/api/core/v1/general.rst
@@ -201,8 +201,8 @@ would return something like:
**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.
diff --git a/docs/en/rst/api/core/v1/group.rst b/docs/en/rst/api/core/v1/group.rst
index e2c595240..13367e392 100644
--- a/docs/en/rst/api/core/v1/group.rst
+++ b/docs/en/rst/api/core/v1/group.rst
@@ -62,6 +62,17 @@ name type description
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
@@ -161,6 +172,10 @@ changes object The changes that were actually done on this group. The
values were removed.
======= ====== ================================================================
+**Errors**
+
+The same as :ref:`rest_group_create`.
+
.. _rest_group_get:
Get Group
@@ -276,3 +291,14 @@ disabled_text string A text field that holds the reason for disabling a user
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.
diff --git a/docs/en/rst/api/core/v1/product.rst b/docs/en/rst/api/core/v1/product.rst
index 95726a3a8..4819bbbbe 100644
--- a/docs/en/rst/api/core/v1/product.rst
+++ b/docs/en/rst/api/core/v1/product.rst
@@ -320,6 +320,23 @@ name type description
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
@@ -414,3 +431,18 @@ changes object The changes that were actually done on this product. The
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.
diff --git a/docs/en/rst/api/core/v1/user.rst b/docs/en/rst/api/core/v1/user.rst
index 7f835cc8a..bc5459892 100644
--- a/docs/en/rst/api/core/v1/user.rst
+++ b/docs/en/rst/api/core/v1/user.rst
@@ -52,6 +52,19 @@ token string Token which can be passed in the parameters as
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
@@ -154,6 +167,12 @@ name type desciption
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
@@ -238,6 +257,13 @@ changes object The changes that were actually done on this user. The keys
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
@@ -379,6 +405,23 @@ 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.
+
.. _rest_user_whoami:
Who Am I