Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bugzilla REST API produces only a 404 error

Tags:

rest

bugzilla

I have Bugzilla installed on Windows 7, Apache 2.4. It is accessible at: http://localhost:80/bugzilla/ which means when I type that address in my browser, I see the bugzilla homepage, I can login as admin and everything is fine.

I read in Bugzilla's documentation that Bugzilla has a "native REST API" that can be used to interact with it. For example it is alleged that sending a GET to the address: /rest/version will return the version of the installed bugzilla; The problem is, it doesn't!

I construct a request like: http://localhost:80/bugzilla/rest/version and I get a 404 not found error. I get this exact result for "any" request out of the rest documentation examples.

What am I missing? What am I doing wrong?


Incidentally, checksetup.pl shows that my installation is missing these 3 packages:

perl-ldap mod_perl Apache-SizeLimit

Could this be the cause?


Update 1: perl-ldap (Net::LDAP) installed. But cheksetup.pl still shows it as not installed and the problem still exists.


Update 2: LDAP installed but the problem still exists :(

like image 249
Mostafa Zeinali Avatar asked Dec 29 '25 07:12

Mostafa Zeinali


1 Answers

My bugzilla installation also retuns "404 not found". I had to use this URL to work ok: http://localhost:80/bugzilla/rest.cgi/version

Bugzilla installation comes with a default .htaccess file that does the rewrite work:

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteOptions 
inherit RewriteRule ^rest/(.*)$ rest.cgi/$1 [NE] 
</IfModule> 

All I had to do: "a2enmod rewrite" and "service apache2 restart" to enable the apache module, then the URL "website/rest/version" works ok.

like image 148
pzn Avatar answered Dec 31 '25 00:12

pzn