Use Bugzilla REST API to Insert Existing Product "Version"
David Miller
justdave at bugzilla.org
Wed Mar 5 10:50:16 UTC 2025
OK, I finally got a chance to play around with this, and... you're
correct, it's not implemented. The API is indeed there under the hood,
but it's not exposed in the REST interface. This is probably an
oversight and we should fix it. But I started looking into what would
be needed to fix it, and discovered that perhaps maybe it wasn't
implemented because "version" already exists as an object type in the
REST API, and it's the version of Bugzilla, not a product version.
Maybe we can make it be "versions" with an "s"? Or maybe we just
overload it and you get the Bugzilla version if you don't specify
anything after it and there's no payload, and if there's a payload then
we treat it like a product version object?
Anyhow, I filed this at https://bugzilla.mozilla.org/show_bug.cgi?id=1951899
On 3/3/25 7:08 PM, Dave Miller wrote:
> I'm planning to experiment with this later tonight and see what I can
> figure out. Sorry for the delay, I was buried with end-of-the-month
> paperwork and haven't had a chance to play yet.
>
>
> On March 3, 2025 5:33:56 PM EST, David Wright
> <David_Wright at phoenix.com> wrote:
>
> Hello,
>
> Any update for our follow up questions?
>
> Thanks in advance for the support!
>
> Thanks,
>
> David Wright
>
> Phoenix Technologies
>
> *From:*David Wright
> *Sent:* Tuesday, February 25, 2025 10:47 AM
> *To:* 'Dave Miller' <justdave at bugzilla.org>; support-list at bugzilla.org
> *Subject:* RE: Use Bugzilla REST API to Insert Existing Product
> "Version"
>
> Thanks Dave, that is helpful. Glad to hear it should be possible.
>
> Some follow up questions from our dev working on this issue:
>
> I need more information to proceed. The link referenced in your
> comment redirects to what appears to be a code snippet of a Perl
> script working on the backend, but I need info on how to work with
> the product out of band through REST API calls.
>
> I’ve listed some of the questions below that I wasn't able to find
> an answer to in the docs:
>
> * What is the REST URI to call to work with versioning
> information for a particular product?
> * What is the payload to be passed when making the call for the
> below items?
> o Adding a new version to a product
> o Updating an existing version in a product
> o Deleting an existing version from the product
>
> Thanks,
>
> Dave
>
> *From:*support-list <support-list-bounces at bugzilla.org> *On Behalf
> Of *Dave Miller
> *Sent:* Monday, February 24, 2025 4:55 PM
> *To:* support-list at bugzilla.org
> *Subject:* Re: Use Bugzilla REST API to Insert Existing Product
> "Version"
>
> [Caution, this message was sent from an external sender.]
>
> A version is its own object type.
>
> https://bugzilla.readthedocs.io/en/latest/integrating/api/Bugzilla/Version.html
>
> You can create a new version there by passing the version name and
> the ID of the product to attach it to.
>
> The function docs look like they're missing, but it's in the
> example at the top.
>
> On February 24, 2025 7:11:03 PM EST, David Wright
> <David_Wright at phoenix.com> wrote:
>
> Hello,
>
> We are trying to Automate insertion of a Product “Version”
> instead of having to do it manually.
>
>
> According to the Bugzilla API manual, this does not seem to be
> an option for UPDATING, only CREATING a new product.
>
> https://bugzilla.readthedocs.io/en/latest/integrating/api/Bugzilla/WebService/Product.html
>
> But maybe we are looking at the wrong documenation or
> misunderstanding.
>
> Is there any way we can use the Bugzilla REST API to insert a
> new version for an *existing* product?
>
> This is the current manual process:
>
> Thanks,
>
> David Wright
>
> Phoenix Technologies
>
> --
> Sent from my Android phone with K-9 Mail. Please excuse my brevity.
>
> _______________________________________________
> support-list mailing list
> support-list at bugzilla.org
> https://lists.bugzilla.org/listinfo/support-list
--
[Bugzilla Logo]
*Dave Miller*
Project Leader
*Bugzilla Project*
https://bugzilla.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bugzilla.org/pipermail/support-list/attachments/20250305/70541e23/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mQj60EMtx5vtmwpF.png
Type: image/png
Size: 7345 bytes
Desc: not available
URL: <http://lists.bugzilla.org/pipermail/support-list/attachments/20250305/70541e23/attachment-0001.png>
More information about the support-list
mailing list