Bugzilla 5.1 and the REST API

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

Bugzilla 5.1 and the REST API

Kevin Turner
Hello

Having just upgraded to 5.1 I want to activate the REST API.

I naively thought I would get this "out of the box" but it doesn't work on my installation - for example this just gives me a 404 error: http://<server>/bugzilla/rest/version<http://%3cserver%3e/bugzilla/rest/version>
so there is presumably some setup to do first.  Can somebody point me in the right direction?  Looking here doesn't really tell me what I am missing as far as I can see: http://bugzilla.readthedocs.org/en/latest/api/index.html

Thanks


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

RE: Bugzilla 5.1 and the REST API

Kevin Turner
Hi Thorsten

Thanks for the reply.   These are the only missing modules (none of which PPM seems to be able to find, but I doubt they are relevant):

* Daemon-Generic
* Mod_perl
* Apache-SizeLimit

I can see rest.cgi in my installation and I can see it does this:
BEGIN {
    if (!Bugzilla->feature('rest')) {
        ThrowUserError('feature_disabled', { feature => 'rest' });
    }
}

Where would I see the error that is thrown (if it gets this far)?

I am using IIS and I don't quite see how it maps the /rest/blah  endpoint to the rest.cgi executable?

Rgds
Kevin



-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Thorsten Schöning
Sent: 09 December 2015 14:04
To: [hidden email]
Subject: Re: Bugzilla 5.1 and the REST API

Guten Tag Kevin Turner,
am Mittwoch, 9. Dezember 2015 um 14:19 schrieben Sie:

> I naively thought I would get this "out of the box" but it doesn't
> work on my installation - for example this just gives me a 404
> error:

404 looks like a problem with your configuration of the web server and/or Bugzilla installation. Have a look at rest.cgi in the Bugzilla root dir, it throws a Bugzilla custom error if the feature is disabled.

Besides that, the feature is automatically enabled if all needed modules are available, so have a look at the output of checksetup.pl to see if optional modules related to JSON and REST are missing.
Additionally Bugzilla::Install::Requirements provides OPTIONAL_MODULES with hints which package is needed for which features, your keyword is "rest" again.

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail: [hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

RE: Bugzilla 5.1 and the REST API

Kevin Turner
OK - some more progress.

I have the rewrite rule in place, but I still get an error (I guess it would be just the same as me using a URL of /rest.cgi/version)

My REST client in this case is simply my browser, but now rather than an HTTP 404 I get an HTTP 500.   The difficulty is trying to find out why  :(



-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Thorsten Schöning
Sent: 09 December 2015 14:39
To: [hidden email]
Subject: Re: Bugzilla 5.1 and the REST API

Guten Tag Kevin Turner,
am Mittwoch, 9. Dezember 2015 um 15:23 schrieben Sie:

> Where would I see the error that is thrown (if it gets this far)?

In your REST client.

> I am using IIS and I don't quite see how it maps the /rest/blah
> endpoint to the rest.cgi executable?

Sounds like you missed the following:

https://bugzilla.readthedocs.org/en/5.0/installing/iis.html#enable-rewrite-rules-for-rest

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail: [hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

RE: Bugzilla 5.1 and the REST API

Kevin Turner
I think this is dead in the water also.

I am assuming as basic test of /rest/version should return something useful (as opposed to an HTTP 500) and it seems nigh on impossible to fatheom out why the HTTP 500 error occurs.

I guess I might have to resort to Apache on Windows to get to the bottom of it.

-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Kevin Turner
Sent: 09 December 2015 14:55
To: Thorsten Schöning <[hidden email]>; [hidden email]
Subject: RE: Bugzilla 5.1 and the REST API

OK - some more progress.

I have the rewrite rule in place, but I still get an error (I guess it would be just the same as me using a URL of /rest.cgi/version)

My REST client in this case is simply my browser, but now rather than an HTTP 404 I get an HTTP 500.   The difficulty is trying to find out why  :(



-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Thorsten Schöning
Sent: 09 December 2015 14:39
To: [hidden email]
Subject: Re: Bugzilla 5.1 and the REST API

Guten Tag Kevin Turner,
am Mittwoch, 9. Dezember 2015 um 15:23 schrieben Sie:

> Where would I see the error that is thrown (if it gets this far)?

In your REST client.

> I am using IIS and I don't quite see how it maps the /rest/blah
> endpoint to the rest.cgi executable?

Sounds like you missed the following:

https://bugzilla.readthedocs.org/en/5.0/installing/iis.html#enable-rewrite-rules-for-rest

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail: [hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

RE: Bugzilla 5.1 and the REST API

Kevin Turner
In reply to this post by Kevin Turner
OK I found (by accident) a way to get Bugzilla to spew its errors out on the browser.  I simply inserted this line into the api_server subroutine in Bugzilla.pm:
say "content-type:text/plain\n";

That then caused the rest of the stuff to render on my page:

http://<server>/rest/version

<h1>Software error:</h1>
<pre>Attempt to reload Test/Taint.pm aborted.
Compilation failed in require at Bugzilla/API/1_0/Util.pm line 23.
BEGIN failed--compilation aborted at Bugzilla/API/1_0/Util.pm line 23.
Compilation failed in require at Bugzilla/API/1_0/Server.pm line 15.
BEGIN failed--compilation aborted at Bugzilla/API/1_0/Server.pm line 15.
</pre>
<p>
For help, please send mail to this site's webmaster, giving this error message
and the time and date of the error.

</p>
<h1>Software error:</h1>
<pre>[Thu Dec 10 15:14:47 2015] rest.cgi: Attempt to reload Test/Taint.pm aborted.
[Thu Dec 10 15:14:47 2015] rest.cgi: Compilation failed in require at Bugzilla/API/1_0/Util.pm line 23.
[Thu Dec 10 15:14:47 2015] rest.cgi: BEGIN failed--compilation aborted at Bugzilla/API/1_0/Util.pm line 23.
[Thu Dec 10 15:14:47 2015] rest.cgi: Compilation failed in require at Bugzilla/API/1_0/Server.pm line 15.
[Thu Dec 10 15:14:47 2015] rest.cgi: BEGIN failed--compilation aborted at Bugzilla/API/1_0/Server.pm line 15.
Compilation failed in require at C:/Perl64/lib/Module/Runtime.pm line 317.
</pre>
<p>
For help, please send mail to this site's webmaster, giving this error message
and the time and date of the error.

</p>
[Thu Dec 10 15:14:47 2015] rest.cgi: [Thu Dec 10 15:14:47 2015] rest.cgi: Attempt to reload Test/Taint.pm aborted.
[Thu Dec 10 15:14:47 2015] rest.cgi: [Thu Dec 10 15:14:47 2015] rest.cgi: Compilation failed in require at Bugzilla/API/1_0/Util.pm line 23.
[Thu Dec 10 15:14:47 2015] rest.cgi: [Thu Dec 10 15:14:47 2015] rest.cgi: BEGIN failed--compilation aborted at Bugzilla/API/1_0/Util.pm line 23.
[Thu Dec 10 15:14:47 2015] rest.cgi: [Thu Dec 10 15:14:47 2015] rest.cgi: Compilation failed in require at Bugzilla/API/1_0/Server.pm line 15.
[Thu Dec 10 15:14:47 2015] rest.cgi: [Thu Dec 10 15:14:47 2015] rest.cgi: BEGIN failed--compilation aborted at Bugzilla/API/1_0/Server.pm line 15.
[Thu Dec 10 15:14:47 2015] rest.cgi: Compilation failed in require at C:/Perl64/lib/Module/Runtime.pm line 317.

-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Kevin Turner
Sent: 09 December 2015 14:55
To: Thorsten Schöning <[hidden email]>; [hidden email]
Subject: RE: Bugzilla 5.1 and the REST API

OK - some more progress.

I have the rewrite rule in place, but I still get an error (I guess it would be just the same as me using a URL of /rest.cgi/version)

My REST client in this case is simply my browser, but now rather than an HTTP 404 I get an HTTP 500.   The difficulty is trying to find out why  :(



-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Thorsten Schöning
Sent: 09 December 2015 14:39
To: [hidden email]
Subject: Re: Bugzilla 5.1 and the REST API

Guten Tag Kevin Turner,
am Mittwoch, 9. Dezember 2015 um 15:23 schrieben Sie:

> Where would I see the error that is thrown (if it gets this far)?

In your REST client.

> I am using IIS and I don't quite see how it maps the /rest/blah
> endpoint to the rest.cgi executable?

Sounds like you missed the following:

https://bugzilla.readthedocs.org/en/5.0/installing/iis.html#enable-rewrite-rules-for-rest

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail: [hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: Bugzilla 5.1 and the REST API

Gervase Markham
In reply to this post by Kevin Turner
On 10/12/15 10:19, Kevin Turner wrote:
> http://<server>/rest/version

BTW, you know you don't use the actual string "version", right, but a
version number? In fact, I think versioning is not implemented, so the
correct URL is something like:

http://<server>/rest/bug/125

Gerv


_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

RE: Bugzilla 5.1 and the REST API

Kevin Turner
In reply to this post by Kevin Turner
I think there is some sort of issue with the fact that I have Strawberry Perl installed so to ensure I was "clean" I uninstalled Strawberry Perl and then cleared out /bugzilla/lib

After that I tried http://<server>/rest/version and got a (badly formatted) web page saying that "the rest feature was not enabled".

I then installed JSON-RPC and got the same error.

I then installed Test-Taint and now I get a 404 error:

A REST API resource was not found for 'GET /bugzilla/rest.cgi/version'

Does anybody know what modules are "must haves" for REST to work?


-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Kevin Turner
Sent: 10 December 2015 15:19
To: [hidden email]
Subject: RE: Bugzilla 5.1 and the REST API

OK I found (by accident) a way to get Bugzilla to spew its errors out on the browser.  I simply inserted this line into the api_server subroutine in Bugzilla.pm:
say "content-type:text/plain\n";

That then caused the rest of the stuff to render on my page:

http://<server>/rest/version

<h1>Software error:</h1>
<pre>Attempt to reload Test/Taint.pm aborted.
Compilation failed in require at Bugzilla/API/1_0/Util.pm line 23.
BEGIN failed--compilation aborted at Bugzilla/API/1_0/Util.pm line 23.
Compilation failed in require at Bugzilla/API/1_0/Server.pm line 15.
BEGIN failed--compilation aborted at Bugzilla/API/1_0/Server.pm line 15.
</pre>
<p>
For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.

</p>
<h1>Software error:</h1>
<pre>[Thu Dec 10 15:14:47 2015] rest.cgi: Attempt to reload Test/Taint.pm aborted.
[Thu Dec 10 15:14:47 2015] rest.cgi: Compilation failed in require at Bugzilla/API/1_0/Util.pm line 23.
[Thu Dec 10 15:14:47 2015] rest.cgi: BEGIN failed--compilation aborted at Bugzilla/API/1_0/Util.pm line 23.
[Thu Dec 10 15:14:47 2015] rest.cgi: Compilation failed in require at Bugzilla/API/1_0/Server.pm line 15.
[Thu Dec 10 15:14:47 2015] rest.cgi: BEGIN failed--compilation aborted at Bugzilla/API/1_0/Server.pm line 15.
Compilation failed in require at C:/Perl64/lib/Module/Runtime.pm line 317.
</pre>
<p>
For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.

</p>
[Thu Dec 10 15:14:47 2015] rest.cgi: [Thu Dec 10 15:14:47 2015] rest.cgi: Attempt to reload Test/Taint.pm aborted.
[Thu Dec 10 15:14:47 2015] rest.cgi: [Thu Dec 10 15:14:47 2015] rest.cgi: Compilation failed in require at Bugzilla/API/1_0/Util.pm line 23.
[Thu Dec 10 15:14:47 2015] rest.cgi: [Thu Dec 10 15:14:47 2015] rest.cgi: BEGIN failed--compilation aborted at Bugzilla/API/1_0/Util.pm line 23.
[Thu Dec 10 15:14:47 2015] rest.cgi: [Thu Dec 10 15:14:47 2015] rest.cgi: Compilation failed in require at Bugzilla/API/1_0/Server.pm line 15.
[Thu Dec 10 15:14:47 2015] rest.cgi: [Thu Dec 10 15:14:47 2015] rest.cgi: BEGIN failed--compilation aborted at Bugzilla/API/1_0/Server.pm line 15.
[Thu Dec 10 15:14:47 2015] rest.cgi: Compilation failed in require at C:/Perl64/lib/Module/Runtime.pm line 317.

-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Kevin Turner
Sent: 09 December 2015 14:55
To: Thorsten Schöning <[hidden email]>; [hidden email]
Subject: RE: Bugzilla 5.1 and the REST API

OK - some more progress.

I have the rewrite rule in place, but I still get an error (I guess it would be just the same as me using a URL of /rest.cgi/version)

My REST client in this case is simply my browser, but now rather than an HTTP 404 I get an HTTP 500.   The difficulty is trying to find out why  :(



-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Thorsten Schöning
Sent: 09 December 2015 14:39
To: [hidden email]
Subject: Re: Bugzilla 5.1 and the REST API

Guten Tag Kevin Turner,
am Mittwoch, 9. Dezember 2015 um 15:23 schrieben Sie:

> Where would I see the error that is thrown (if it gets this far)?

In your REST client.

> I am using IIS and I don't quite see how it maps the /rest/blah
> endpoint to the rest.cgi executable?

Sounds like you missed the following:

https://bugzilla.readthedocs.org/en/5.0/installing/iis.html#enable-rewrite-rules-for-rest

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail: [hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

RE: Bugzilla 5.1 and the REST API

Kevin Turner
I have figured out how to get the errors that bugzilla sends displayed on the browser rather than the vanilla error pages that IIS wants to display.
I then went to IIS and edited the "Error pages" feature for my bugzilla virtual directory.  You basically double click on the feature and you get a list of error pages.
Right click and take the "Edit feature settings" option.
Select "Detailed errors"
This ensures that bugzillas errors do not get overwritten by the generic errors from IIS

So now I see:

{
   "code" : "32614",
   "documentation" : "http://www.bugzilla.org/docs/tip/en/html/api/",
   "error" : true,
   "message" : "A REST API resource was not found for 'GET /bugzilla/rest.cgi/version'."
}


So closer - but no cigar (yet).


-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Kevin Turner
Sent: 10 December 2015 16:14
To: [hidden email]
Subject: RE: Bugzilla 5.1 and the REST API

I think there is some sort of issue with the fact that I have Strawberry Perl installed so to ensure I was "clean" I uninstalled Strawberry Perl and then cleared out /bugzilla/lib

After that I tried http://<server>/rest/version and got a (badly formatted) web page saying that "the rest feature was not enabled".

I then installed JSON-RPC and got the same error.

I then installed Test-Taint and now I get a 404 error:

A REST API resource was not found for 'GET /bugzilla/rest.cgi/version'

Does anybody know what modules are "must haves" for REST to work?


-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Kevin Turner
Sent: 10 December 2015 15:19
To: [hidden email]
Subject: RE: Bugzilla 5.1 and the REST API

OK I found (by accident) a way to get Bugzilla to spew its errors out on the browser.  I simply inserted this line into the api_server subroutine in Bugzilla.pm:
say "content-type:text/plain\n";

That then caused the rest of the stuff to render on my page:

http://<server>/rest/version

<h1>Software error:</h1>
<pre>Attempt to reload Test/Taint.pm aborted.
Compilation failed in require at Bugzilla/API/1_0/Util.pm line 23.
BEGIN failed--compilation aborted at Bugzilla/API/1_0/Util.pm line 23.
Compilation failed in require at Bugzilla/API/1_0/Server.pm line 15.
BEGIN failed--compilation aborted at Bugzilla/API/1_0/Server.pm line 15.
</pre>
<p>
For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.

</p>
<h1>Software error:</h1>
<pre>[Thu Dec 10 15:14:47 2015] rest.cgi: Attempt to reload Test/Taint.pm aborted.
[Thu Dec 10 15:14:47 2015] rest.cgi: Compilation failed in require at Bugzilla/API/1_0/Util.pm line 23.
[Thu Dec 10 15:14:47 2015] rest.cgi: BEGIN failed--compilation aborted at Bugzilla/API/1_0/Util.pm line 23.
[Thu Dec 10 15:14:47 2015] rest.cgi: Compilation failed in require at Bugzilla/API/1_0/Server.pm line 15.
[Thu Dec 10 15:14:47 2015] rest.cgi: BEGIN failed--compilation aborted at Bugzilla/API/1_0/Server.pm line 15.
Compilation failed in require at C:/Perl64/lib/Module/Runtime.pm line 317.
</pre>
<p>
For help, please send mail to this site's webmaster, giving this error message and the time and date of the error.

</p>
[Thu Dec 10 15:14:47 2015] rest.cgi: [Thu Dec 10 15:14:47 2015] rest.cgi: Attempt to reload Test/Taint.pm aborted.
[Thu Dec 10 15:14:47 2015] rest.cgi: [Thu Dec 10 15:14:47 2015] rest.cgi: Compilation failed in require at Bugzilla/API/1_0/Util.pm line 23.
[Thu Dec 10 15:14:47 2015] rest.cgi: [Thu Dec 10 15:14:47 2015] rest.cgi: BEGIN failed--compilation aborted at Bugzilla/API/1_0/Util.pm line 23.
[Thu Dec 10 15:14:47 2015] rest.cgi: [Thu Dec 10 15:14:47 2015] rest.cgi: Compilation failed in require at Bugzilla/API/1_0/Server.pm line 15.
[Thu Dec 10 15:14:47 2015] rest.cgi: [Thu Dec 10 15:14:47 2015] rest.cgi: BEGIN failed--compilation aborted at Bugzilla/API/1_0/Server.pm line 15.
[Thu Dec 10 15:14:47 2015] rest.cgi: Compilation failed in require at C:/Perl64/lib/Module/Runtime.pm line 317.

-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Kevin Turner
Sent: 09 December 2015 14:55
To: Thorsten Schöning <[hidden email]>; [hidden email]
Subject: RE: Bugzilla 5.1 and the REST API

OK - some more progress.

I have the rewrite rule in place, but I still get an error (I guess it would be just the same as me using a URL of /rest.cgi/version)

My REST client in this case is simply my browser, but now rather than an HTTP 404 I get an HTTP 500.   The difficulty is trying to find out why  :(



-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Thorsten Schöning
Sent: 09 December 2015 14:39
To: [hidden email]
Subject: Re: Bugzilla 5.1 and the REST API

Guten Tag Kevin Turner,
am Mittwoch, 9. Dezember 2015 um 15:23 schrieben Sie:

> Where would I see the error that is thrown (if it gets this far)?

In your REST client.

> I am using IIS and I don't quite see how it maps the /rest/blah
> endpoint to the rest.cgi executable?

Sounds like you missed the following:

https://bugzilla.readthedocs.org/en/5.0/installing/iis.html#enable-rewrite-rules-for-rest

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail: [hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

RE: Bugzilla 5.1 and the REST API

Kevin Turner
Yes but it doesn't make sense, because according to the documentation there should be a "version" API.  For example:
https://bugzilla.mozilla.org/rest/version

My problem is trying to determine why it doesn't seem to be able to find any API resources.

Even
http://<server>/rest/bug/125

returns the same thing:

"A REST API resource was not found for 'GET /bugzilla/rest.cgi/bug"

-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Thorsten Schöning
Sent: 10 December 2015 17:12
To: [hidden email]
Subject: Re: Bugzilla 5.1 and the REST API

Guten Tag Kevin Turner,
am Donnerstag, 10. Dezember 2015 um 17:42 schrieben Sie:

>    "message" : "A REST API resource was not found for 'GET /bugzilla/rest.cgi/version'."

Did you pay attention to what Gervase wrote:

> On 10/12/15 10:19, Kevin Turner wrote:
>> http://<server>/rest/version

> BTW, you know you don't use the actual string "version", right, but a
> version number? In fact, I think versioning is not implemented, so the
> correct URL is something like:

> http://<server>/rest/bug/125

> Gerv

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail: [hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

RE: Bugzilla 5.1 and the REST API

Kevin Turner
According to the code in server.pm  there is a subroutine called "_find_resources"

That appears to find a set of API resources in \Bugzilla\API\1_0\Resource\
So in there we have Bug,pm, BugUserLastVisit.pm, Bugzilla.pm   etc

Each API resource exposes a set of URL regular expressions - so these are the URLs that are considered valid for the API.

So if I enter http://<server>/rest/version then it should find the Bugzilla.pm API as a valid match. This is because one of the regular expressions exposed by Bugzilla.pm is    (?^:^/version$)

However, this if statement fails:
if (my @matches = ($self->api_path =~ $regex)) {

So
$self->api_path = "/bugzilla/rest.cgi/version"
and
$regex = (?^:^/version$)
and
($self->api_path =~ $regex) is false


Am I missing something or is this just a bug?   Basically the URL does not match any of the APIs



-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Kevin Turner
Sent: 10 December 2015 17:18
To: Thorsten Schöning <[hidden email]>; [hidden email]
Subject: RE: Bugzilla 5.1 and the REST API

Yes but it doesn't make sense, because according to the documentation there should be a "version" API.  For example:
https://bugzilla.mozilla.org/rest/version

My problem is trying to determine why it doesn't seem to be able to find any API resources.

Even
http://<server>/rest/bug/125

returns the same thing:

"A REST API resource was not found for 'GET /bugzilla/rest.cgi/bug"

-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Thorsten Schöning
Sent: 10 December 2015 17:12
To: [hidden email]
Subject: Re: Bugzilla 5.1 and the REST API

Guten Tag Kevin Turner,
am Donnerstag, 10. Dezember 2015 um 17:42 schrieben Sie:

>    "message" : "A REST API resource was not found for 'GET /bugzilla/rest.cgi/version'."

Did you pay attention to what Gervase wrote:

> On 10/12/15 10:19, Kevin Turner wrote:
>> http://<server>/rest/version

> BTW, you know you don't use the actual string "version", right, but a
> version number? In fact, I think versioning is not implemented, so the
> correct URL is something like:

> http://<server>/rest/bug/125

> Gerv

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail: [hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

RE: Bugzilla 5.1 and the REST API

Kevin Turner
OK I will try 5.0.1 and see if that bears fruit :)   Thanks for the pointer.

-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Thorsten Schöning
Sent: 10 December 2015 19:17
To: [hidden email]
Subject: Re: Bugzilla 5.1 and the REST API

Guten Tag Kevin Turner,
am Donnerstag, 10. Dezember 2015 um 18:50 schrieben Sie:

> Am I missing something or is this just a bug?   Basically the URL does not match any of the APIs

If your provided path and regexp is correct, this looks like a bug to me as well.

I just wondered why things look different than in my Bugzilla: Are you aware that you are using a development version of Bugzilla? The most current stable version is 5.0.1 and especially the path thing and regexp looks a bit different there. Maybe the paths were changed and you are really the first using that part of the code with URLs like yours? REST is available in 5.0.1 as well.

https://www.bugzilla.org/releases/5.0/release-notes.html#feat_webservices

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail: [hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

RE: Bugzilla 5.1 and the REST API

Kevin Turner
OK different error with 5.0.1

rest.cgi: Can't locate Bugzilla/WebService/Server/REST.pm in @INC (you may need to install the Bugzilla::WebService::Server::REST module)

So is there a module I need to install with ppm?    There is nothing relevant being reported by checksetup.pl




-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Kevin Turner
Sent: 10 December 2015 19:28
To: Thorsten Schöning <[hidden email]>; [hidden email]
Subject: RE: Bugzilla 5.1 and the REST API

OK I will try 5.0.1 and see if that bears fruit :)   Thanks for the pointer.

-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Thorsten Schöning
Sent: 10 December 2015 19:17
To: [hidden email]
Subject: Re: Bugzilla 5.1 and the REST API

Guten Tag Kevin Turner,
am Donnerstag, 10. Dezember 2015 um 18:50 schrieben Sie:

> Am I missing something or is this just a bug?   Basically the URL does not match any of the APIs

If your provided path and regexp is correct, this looks like a bug to me as well.

I just wondered why things look different than in my Bugzilla: Are you aware that you are using a development version of Bugzilla? The most current stable version is 5.0.1 and especially the path thing and regexp looks a bit different there. Maybe the paths were changed and you are really the first using that part of the code with URLs like yours? REST is available in 5.0.1 as well.

https://www.bugzilla.org/releases/5.0/release-notes.html#feat_webservices

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail: [hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

RE: Bugzilla 5.1 and the REST API

Kevin Turner
Scratch that - so I wiped the machine completely and reinstalled 5.0.1 from scratch.

http://server/rest/version

Same error as 5.1.0:

{
   "code" : 32614,
   "documentation" : "http://www.bugzilla.org/docs/tip/en/html/api/",
   "error" : true,
   "message" : "A REST API resource was not found for 'GET /bugzilla/rest.cgi/version'."
}

Very frustrating indeed!!


-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Kevin Turner
Sent: 10 December 2015 22:06
To: [hidden email]
Subject: RE: Bugzilla 5.1 and the REST API

OK different error with 5.0.1

rest.cgi: Can't locate Bugzilla/WebService/Server/REST.pm in @INC (you may need to install the Bugzilla::WebService::Server::REST module)

So is there a module I need to install with ppm?    There is nothing relevant being reported by checksetup.pl




-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Kevin Turner
Sent: 10 December 2015 19:28
To: Thorsten Schöning <[hidden email]>; [hidden email]
Subject: RE: Bugzilla 5.1 and the REST API

OK I will try 5.0.1 and see if that bears fruit :)   Thanks for the pointer.

-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Thorsten Schöning
Sent: 10 December 2015 19:17
To: [hidden email]
Subject: Re: Bugzilla 5.1 and the REST API

Guten Tag Kevin Turner,
am Donnerstag, 10. Dezember 2015 um 18:50 schrieben Sie:

> Am I missing something or is this just a bug?   Basically the URL does not match any of the APIs

If your provided path and regexp is correct, this looks like a bug to me as well.

I just wondered why things look different than in my Bugzilla: Are you aware that you are using a development version of Bugzilla? The most current stable version is 5.0.1 and especially the path thing and regexp looks a bit different there. Maybe the paths were changed and you are really the first using that part of the code with URLs like yours? REST is available in 5.0.1 as well.

https://www.bugzilla.org/releases/5.0/release-notes.html#feat_webservices

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail: [hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

RE: Bugzilla 5.1 and the REST API

Kevin Turner
The code is basically the same in 5.0.1 as it is in 5.1.0

if (@matches = ($path =~ $regex)) {
     Match!!
}

I put some debug statements in:

-------------------------------------------------------------
The value of $path is "/bugzilla/rest.cgi/version"
The webservice being checked is Bugzilla::WebService::Bugzilla
       The regex being compared is (?^:^/version$)
       Result is no match!
-------------------------------------------------------------

I don't know enough about Perl and the RegExp syntax here to know if this is expected or not - but clearly the intention is for
"/bugzilla/rest.cgi/version" and (?^:^/version$) to match but it doesn't :(





-----Original Message-----
From: Kevin Turner
Sent: 10 December 2015 23:56
To: Kevin Turner <[hidden email]>; [hidden email]
Subject: RE: Bugzilla 5.1 and the REST API

Scratch that - so I wiped the machine completely and reinstalled 5.0.1 from scratch.

http://server/rest/version

Same error as 5.1.0:

{
   "code" : 32614,
   "documentation" : "http://www.bugzilla.org/docs/tip/en/html/api/",
   "error" : true,
   "message" : "A REST API resource was not found for 'GET /bugzilla/rest.cgi/version'."
}

Very frustrating indeed!!


-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Kevin Turner
Sent: 10 December 2015 22:06
To: [hidden email]
Subject: RE: Bugzilla 5.1 and the REST API

OK different error with 5.0.1

rest.cgi: Can't locate Bugzilla/WebService/Server/REST.pm in @INC (you may need to install the Bugzilla::WebService::Server::REST module)

So is there a module I need to install with ppm?    There is nothing relevant being reported by checksetup.pl




-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Kevin Turner
Sent: 10 December 2015 19:28
To: Thorsten Schöning <[hidden email]>; [hidden email]
Subject: RE: Bugzilla 5.1 and the REST API

OK I will try 5.0.1 and see if that bears fruit :)   Thanks for the pointer.

-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+kevin.turner=[hidden email]] On Behalf Of Thorsten Schöning
Sent: 10 December 2015 19:17
To: [hidden email]
Subject: Re: Bugzilla 5.1 and the REST API

Guten Tag Kevin Turner,
am Donnerstag, 10. Dezember 2015 um 18:50 schrieben Sie:

> Am I missing something or is this just a bug?   Basically the URL does not match any of the APIs

If your provided path and regexp is correct, this looks like a bug to me as well.

I just wondered why things look different than in my Bugzilla: Are you aware that you are using a development version of Bugzilla? The most current stable version is 5.0.1 and especially the path thing and regexp looks a bit different there. Maybe the paths were changed and you are really the first using that part of the code with URLs like yours? REST is available in 5.0.1 as well.

https://www.bugzilla.org/releases/5.0/release-notes.html#feat_webservices

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail: [hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.

___________________________________________
This email has been scanned by iomartcloud.
http://www.iomartcloud.com/


________________________________

NOTICE: The information in this electronic mail transmission is intended by CoralTree Systems Ltd for the use of the named individuals or entity to which it is directed and may contain information that is privileged or otherwise confidential. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email or by telephone, so that the sender's address records can be corrected.



--------------------------------------------------------------------------------


CoralTree Systems Limited
25 Barnes Wallis Road
Segensworth East, Fareham
PO15 5TT

Company Registration Number 5021022.
Registered Office:
12-14 Carlton Place
Southampton, UK
SO15 2EA
VAT Registration Number 834 1020 74.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: Bugzilla 5.1 and the REST API

Wayne Allen
In reply to this post by Gervase Markham
On Thursday, December 10, 2015 at 8:08:33 AM UTC-8, Gervase Markham wrote:

> On 10/12/15 10:19, Kevin Turner wrote:
> > http://<server>/rest/version
>
> BTW, you know you don't use the actual string "version", right, but a
> version number? In fact, I think versioning is not implemented, so the
> correct URL is something like:
>
> http://<server>/rest/bug/125
>
> Gerv

Just to clarify you do actually use the actual string "version" as this will report the version of Bugzilla running.  https://bugzilla.mozilla.org/rest/version
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|

Re: Bugzilla 5.1 and the REST API

Gervase Markham
On 11/12/15 04:59, Wayne Allen wrote:
> Just to clarify you do actually use the actual string "version" as
> this will report the version of Bugzilla running.
> https://bugzilla.mozilla.org/rest/version

Yes, sorry, my mistake. :-|

Gerv


_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.