]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1148577 - The API reST documentation should display the error codes/strings that...
authorDavid Lawrence <dkl@mozilla.com>
Thu, 18 Feb 2016 14:55:52 +0000 (14:55 +0000)
committerDavid Lawrence <dkl@mozilla.com>
Thu, 18 Feb 2016 14:55:52 +0000 (14:55 +0000)
r=gerv

13 files changed:
Bugzilla/WebService/Constants.pm
docs/en/rst/api/core/v1/attachment.rst
docs/en/rst/api/core/v1/bug-user-last-visit.rst
docs/en/rst/api/core/v1/bug.rst
docs/en/rst/api/core/v1/classification.rst
docs/en/rst/api/core/v1/comment.rst
docs/en/rst/api/core/v1/component.rst
docs/en/rst/api/core/v1/field.rst
docs/en/rst/api/core/v1/flagtype.rst
docs/en/rst/api/core/v1/general.rst
docs/en/rst/api/core/v1/group.rst
docs/en/rst/api/core/v1/product.rst
docs/en/rst/api/core/v1/user.rst

index 42aa600ee40a4cce81ff4366c7c6f035b4089a57..2387903bb24eeddee1c21a4fa1d9cf920111f879 100644 (file)
@@ -218,6 +218,9 @@ use constant WS_ERROR_CODE => {
     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,
index 6c80651c18646a5af5e47617b4ec6d03477b9f21..08bbaa088ad1fbf64afb497e47e3e5a87f38c78c 100644 (file)
@@ -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
@@ -223,6 +233,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
@@ -353,3 +393,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.
index 91974496807f6155d2545861f383fe815cad44c5..2c3782662809db7e00959c2957c58abd51175d7b 100644 (file)
@@ -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
index 78a79fd4560247128236809eb5682bed50e5d264..f4ca0dac4b58222ec9e497e20b1b4aabf0fa88a2 100644 (file)
@@ -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
@@ -656,6 +677,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
@@ -702,8 +763,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.
@@ -993,3 +1054,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.
index ef5e58d1b6267651116c25aa263f9d7b8322e4c3..efff5e50f0c49f18b950ba0e5f363c68f8f3dc57 100644 (file)
@@ -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:
index 0f7eef056ca37534475c6b1778c60505265d6150..f015491b4301232af49e303c641442a1337aafea 100644 (file)
@@ -108,6 +108,20 @@ is_markdown    boolean   ``true`` if this comment needs Markdown processing;
 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
@@ -163,6 +177,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
@@ -202,6 +236,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
@@ -244,3 +285,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.
index aceada1a7ccd824a9bfbceaa520b5da1f70ddaba..bc5120312c3d5b3533e91aac18f10cacd50c8ba9 100644 (file)
@@ -5,6 +5,8 @@ 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.
 
+.. _rest_create_component:
+
 Create Component
 ----------------
 
@@ -63,3 +65,166 @@ name  type  description
 ====  ====  ========================================
 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.
index d97aa3050850442ab91d31dc8e567832c5e840e3..a9ad65eff359f93a3f01c441442873499674203a 100644 (file)
@@ -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.
index 994ac27c84ab970bd3861e13f6d9cb25bf930896..d962f7d91ca9be929da0abcf9ffcc3889d35a9c5 100644 (file)
@@ -125,6 +125,15 @@ is_multiplicable  boolean  Multiple flags of this type can be set for the same
                            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
 ----------------
 
@@ -228,6 +237,32 @@ name     type  description
 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
@@ -371,3 +406,29 @@ changes  object  The changes that were actually done on this 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.
index ab6ad05e27b674b546a4000a88c0f3140067323a..f44b5b76f08e00e32a858177f3ae9fdcaf4aa9de 100644 (file)
@@ -210,8 +210,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.
index e2c5952404fe55edb01ca22ca759dff346dfb9d4..13367e392e397e8023b1129c0169ca4f40ded89a 100644 (file)
@@ -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.
index 95726a3a8acd4039b90d1d47f724b75ffc70fc4c..4819bbbbe93e8450154cbdbdbfca8390ab8438ba 100644 (file)
@@ -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.
index b6aaa43e15b9f17de224e6ba97b87e5b82d08cd2..0638ef758c75327b5d758fc6bac7243505c08824 100644 (file)
@@ -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
@@ -242,6 +261,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
@@ -382,3 +408,20 @@ and not in 'editusers' group, you will only be returned the ``id``, ``name``,
 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.