Bugzilla::Webservice::Product - The Product API
This part of the Bugzilla API allows you to list the available Products and get information about them.
See Bugzilla::WebService for a description of how parameters are passed, and what STABLE, UNSTABLE, and EXPERIMENTAL mean.
Although the data input and output is the same for JSON-RPC, XML-RPC and REST, the directions for how to access the data via REST is noted in each method where applicable.
EXPERIMENTAL
Returns a list of the ids of the products the user can search on.
GET /product_selectable
the returned data format is same as below.
A hash containing one item,
ids,
that contains an array of product ids.
EXPERIMENTAL
Returns a list of the ids of the products the user can enter bugs against.
GET /product_enterable
the returned data format is same as below.
A hash containing one item,
ids,
that contains an array of product ids.
UNSTABLE
Returns a list of the ids of the products the user can search or enter bugs against.
GET /product_accessible
the returned data format is same as below.
A hash containing one item,
ids,
that contains an array of product ids.
EXPERIMENTAL
Returns a list of information about the products passed to it.
Note: Can also be called as "get_products" for compatibility with Bugzilla 3.0 API.
To return information about a specific groups of products such as accessible,
selectable,
or enterable:
GET /product?type=accessible
To return information about a specific product by id or name:
GET /product/<product_id_or_name>
You can also return information about more than one specific product by using the following in your query string:
GET /product?ids=1&ids=2&ids=3 or GET /product?names=ProductOne&names=Product2
the returned data format is same as below.
In addition to the parameters below, this method also accepts the standard include_fields and exclude_fields arguments.
This RPC call supports sub field restrictions.
idsAn array of product ids
namesAn array of product names
typeThe group of products to return.
Valid values are: accessible (default),
selectable,
and enterable.
type can be a single value or an array of values if more than one group is needed with duplicates removed.
A hash containing one item,
products,
that is an array of hashes.
Each hash describes a product,
and has the following items:
idint An integer id uniquely identifying the product in this installation only.
namestring The name of the product.
This is a unique identifier for the product.
descriptionstring A description of the product,
which may contain HTML.
is_activeboolean A boolean indicating if the product is active.
default_bug_typestring The default type for bugs filed under this product.
default_milestonestring The name of the default milestone for the product.
has_unconfirmedboolean Indicates whether the UNCONFIRMED bug status is available for this product.
classificationstring The classification name for the product.
componentsarray An array of hashes,
where each hash describes a component,
and has the following items:
idint An integer id uniquely identifying the component in this installation only.
namestring The name of the component.
This is a unique identifier for this component.
descriptionstring A description of the component,
which may contain HTML.
default_assigned_tostring The login name of the user to whom new bugs will be assigned by default.
default_bug_typestring The default type for bugs filed under this component.
default_qa_contactstring The login name of the user who will be set as the QA Contact for new bugs by default.
triage_ownerstring The login name of the user who is named as the Triage Owner of the component.
sort_keyint Components,
when displayed in a list,
are sorted first by this integer and then secondly by their name.
is_activeboolean A boolean indicating if the component is active.
Inactive components are not enabled for new bugs.
flag_typesA hash containing the two items bug and attachment that each contains an array of hashes,
where each hash describes a flagtype,
and has the following items:
idint Returns the ID of the flagtype.
namestring Returns the name of the flagtype.
descriptionstring Returns the description of the flagtype.
cc_liststring Returns the concatenated CC list for the flagtype,
as a single string.
sort_keyint Returns the sortkey of the flagtype.
is_activeboolean Returns whether the flagtype is active or disabled.
Flags being in a disabled flagtype are not deleted.
It only prevents you from adding new flags to it.
is_requestableboolean Returns whether you can request for the given flagtype (i.e.
whether the '?' flag is available or not).
is_requesteebleboolean Returns whether you can ask someone specifically or not.
is_multiplicableboolean Returns whether you can have more than one flag for the given flagtype in a given bug/attachment.
grant_groupint the group id that is allowed to grant/deny flags of this type.
If the item is not included all users are allowed to grant/deny this flagtype.
request_groupint the group id that is allowed to request the flag if the flag is of the type requestable.
If the item is not included all users are allowed request this flagtype.
versionsarray An array of hashes,
where each hash describes a version,
and has the following items: name,
sort_key and is_active.
milestonesarray An array of hashes,
where each hash describes a milestone,
and has the following items: name,
sort_key and is_active.
Note, that if the user tries to access a product that is not in the list of accessible products for the user, or a product that does not exist, that is silently ignored, and no information about that product is returned.
names was added as an input parameter.classification,
components,
versions,
milestones,
default_milestone and has_unconfirmed were added to the fields returned by get as a replacement for internals,
which has been removed.flag_types was added to the fields returned by get.EXPERIMENTAL
This allows you to create a new product in Bugzilla.
POST /product
The params to include in the POST body as well as the returned data format, are the same as below.
Some params must be set, or an error will be thrown. These params are marked Required.
nameRequired string The name of this product.
Must be globally unique within Bugzilla.
descriptionRequired string A description for this product.
Allows some simple HTML.
versionRequired string The default version for this product.
has_unconfirmedboolean Allow the UNCONFIRMED status to be set on bugs in this product.
Default: true.
classificationstring The name of the Classification which contains this product.
default_bug_typestring The default type for bugs filed under this product.
Each component can override this value.
default_milestonestring The default milestone for this product.
Default: '---'.
is_openboolean True if the product is currently allowing bugs to be entered into it.
Default: true.
create_seriesboolean True if you want series for New Charts to be created for this new product.
Default: true.
A hash with one element, id. This is the id of the newly-filed product.
You must specify an existing classification name.
You must specify a non-blank name for this product.
The name specified for this product was longer than the maximum allowed length.
You specified the name of a product that already exists. (Product names must be globally unique in Bugzilla.)
You must specify a description for this product.
You must specify a version for this product.