<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>I missed your inquiry about POST in my reply to you yesterday...</p>
<p>When you do a POST, all of the parameters for the request can be
sent in the body of the request as JSON.</p>
<p>See
<a class="moz-txt-link-freetext" href="https://bugzilla.readthedocs.io/en/latest/api/core/v1/general.html">https://bugzilla.readthedocs.io/en/latest/api/core/v1/general.html</a></p>
<p>If you have a more-specific question than that, just ask :)<br>
</p>
<div class="moz-cite-prefix">On 9/29/23 11:46 AM, Dave Miller wrote:<br>
</div>
<blockquote type="cite"
cite="mid:2C04FC3E-7D80-4C38-B879-14457471AB3A@bugzilla.org">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator"
content="Microsoft Word 15 (filtered medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}.MsoChpDefault
{mso-style-type:export-only;}div.WordSection1
{page:WordSection1;}</style>
<div dir="auto">The error message embedded in that HTML is
indicating that the REST interface is not enabled on that
Bugzilla installation. As far as I know it's automatically
enabled if the prerequisites are installed so the server is
probably missing some Perl modules. Running checksetup.pl on the
command line (on the server) should tell you which ones.</div>
<br>
<br>
<div class="gmail_quote">
<div dir="auto">On September 28, 2023 10:00:16 PM EDT, Humberto
Baruch Olguin Lesdesma <a class="moz-txt-link-rfc2396E" href="mailto:baruch_001@outlook.es"><baruch_001@outlook.es></a> wrote:</div>
<blockquote class="gmail_quote"
style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="WordSection1">
<p class="MsoNormal">I'm sharing my function for making a
GET request to the Bugzilla API. However, the response
only provides an HTML code and not the expected format as
outlined in the documentation. Could you please advise on
potential issues and how to rectify them? Additionally, I
would like to inquire about the process for a POST method.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Use Adonis.js</p>
<p class="MsoNormal">const baseUrl =
`<a class="moz-txt-link-freetext" href="http://localhost/bugzilla/rest/bug/">http://localhost/bugzilla/rest/bug/</a>`</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> const user =
'<a class="moz-txt-link-abbreviated" href="mailto:baruch_001@outlook.es">baruch_001@outlook.es</a>';</p>
<p class="MsoNormal"> const password =
my_password;</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> await axios.get(baseUrl, {</p>
<p class="MsoNormal"> auth: {</p>
<p class="MsoNormal"> username: usuario,</p>
<p class="MsoNormal"> password:
contraseña</p>
<p class="MsoNormal"> }</p>
<p class="MsoNormal"> })</p>
<p class="MsoNormal"> .then(response => {</p>
<p class="MsoNormal"> if (response.status
=== 200) {</p>
<p class="MsoNormal"> const bugData =
response.data;</p>
<p class="MsoNormal"> console.log(bugData);</p>
<p class="MsoNormal"> } else {</p>
<p class="MsoNormal">
console.error(`Error: ${response.status}`);</p>
<p class="MsoNormal"> }</p>
<p class="MsoNormal"> })</p>
<p class="MsoNormal"> .catch(error => {</p>
<p class="MsoNormal">
console.error('Error:', error);</p>
<p class="MsoNormal"> });</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Response:</p>
<p class="MsoNormal"><!DOCTYPE html></p>
<p class="MsoNormal"><html lang="en"></p>
<p class="MsoNormal"> <head></p>
<p class="MsoNormal"> <title>Error</title></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <meta
http-equiv="Content-Type" content="text/html;
charset=UTF-8"></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><link
href="data/assets/2f5735cf3abd04bddc8e363a8613a9f5.css"
rel="stylesheet" type="text/css"></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><script type="text/javascript"
src="data/assets/1b4e898422a669ab82b604a2c23edce5.js"></script></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <script
type="text/javascript"></p>
<p class="MsoNormal"> <!--</p>
<p class="MsoNormal"> YAHOO.namespace('bugzilla');</p>
<p class="MsoNormal"> YAHOO.util.Event.addListener =
function (el, sType, fn, obj, overrideContext) {</p>
<p class="MsoNormal"> if ( ("onpagehide" in
window || YAHOO.env.ua.gecko) && sType ===
"unload") { sType = "pagehide"; };</p>
<p class="MsoNormal"> var capture = ((sType ==
"focusin" || sType == "focusout") &&
!YAHOO.env.ua.ie) ? true : false;</p>
<p class="MsoNormal"> return
this._addListener(el, this._getType(sType), fn, obj,
overrideContext, capture);</p>
<p class="MsoNormal"> };</p>
<p class="MsoNormal"> if ( "onpagehide" in window ||
YAHOO.env.ua.gecko) {</p>
<p class="MsoNormal">
YAHOO.util.Event._simpleRemove(window, "unload",</p>
<p class="MsoNormal">
YAHOO.util.Event._unload);</p>
<p class="MsoNormal"> }</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> function
unhide_language_selector() {</p>
<p class="MsoNormal"> YAHOO.util.Dom.removeClass(</p>
<p class="MsoNormal"> 'lang_links_container',
'bz_default_hidden'</p>
<p class="MsoNormal"> );</p>
<p class="MsoNormal"> }</p>
<p class="MsoNormal">
YAHOO.util.Event.onDOMReady(unhide_language_selector);</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> var BUGZILLA = {</p>
<p class="MsoNormal"> param: {</p>
<p class="MsoNormal"> cookiepath: '\/',</p>
<p class="MsoNormal"> maxusermatches: 1000</p>
<p class="MsoNormal"> },</p>
<p class="MsoNormal"> constant: {</p>
<p class="MsoNormal"> COMMENT_COLS: 80</p>
<p class="MsoNormal"> },</p>
<p class="MsoNormal"> string: {</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> attach_desc_required:</p>
<p class="MsoNormal"> "You must enter a
Description for this attachment.",</p>
<p class="MsoNormal"> component_required:</p>
<p class="MsoNormal"> "You must select a
Component for this bug.",</p>
<p class="MsoNormal"> description_required:</p>
<p class="MsoNormal"> "You must enter a
Description for this bug.",</p>
<p class="MsoNormal"> short_desc_required:</p>
<p class="MsoNormal"> "You must enter a
Summary for this bug.",</p>
<p class="MsoNormal"> version_required:</p>
<p class="MsoNormal"> "You must select a
Version for this bug."</p>
<p class="MsoNormal"> }</p>
<p class="MsoNormal"> };</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> // --></p>
<p class="MsoNormal"> </script></p>
<p class="MsoNormal"><script type="text/javascript"
src="data/assets/d41d8cd98f00b204e9800998ecf8427e.js"></script></p>
<p class="MsoNormal"> <link rel="search"
type="application/opensearchdescription+xml"</p>
<p class="MsoNormal"> title="Bugzilla"
href="./search_plugin.cgi"></p>
<p class="MsoNormal"> <link rel="shortcut icon"
href="images/favicon.ico"></p>
<p class="MsoNormal"> </head></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <body</p>
<p class="MsoNormal"> class="localhost-bugzilla
yui-skin-sam"></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <div id="header"><div
id="banner"></p>
<p class="MsoNormal"> </div></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <div id="titles"></p>
<p class="MsoNormal"> <span id="title">Bugzilla
– Error</span></p>
<p class="MsoNormal"> </div></p>
<p class="MsoNormal"> <div id="common_links"><ul
class="links"></p>
<p class="MsoNormal"> <li><a
href="./">Home</a></li></p>
<p class="MsoNormal"> <li><span
class="separator">| </span><a
href="enter_bug.cgi">New</a></li></p>
<p class="MsoNormal"> <li><span
class="separator">| </span><a
href="describecomponents.cgi">Browse</a></li></p>
<p class="MsoNormal"> <li><span
class="separator">| </span><a
href="query.cgi">Search</a></li></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <li class="form"></p>
<p class="MsoNormal"> <span class="separator">|
</span></p>
<p class="MsoNormal"> <form action="buglist.cgi"
method="get"</p>
<p class="MsoNormal"> onsubmit="if
(this.quicksearch.value == '')</p>
<p class="MsoNormal"> { alert('Please enter
one or more search terms first.');</p>
<p class="MsoNormal"> return false; }
return true;"></p>
<p class="MsoNormal"> <input type="hidden"
id="no_redirect_top" name="no_redirect" value="0"></p>
<p class="MsoNormal"> <script
type="text/javascript"></p>
<p class="MsoNormal"> if (history &&
history.replaceState) {</p>
<p class="MsoNormal"> var no_redirect =
document.getElementById("no_redirect_top");</p>
<p class="MsoNormal"> no_redirect.value = 1;</p>
<p class="MsoNormal"> }</p>
<p class="MsoNormal"> </script></p>
<p class="MsoNormal"> <input class="txt" type="text"
id="quicksearch_top" name="quicksearch"</p>
<p class="MsoNormal"> title="Quick Search"
value=""></p>
<p class="MsoNormal"> <input class="btn" type="submit"
value="Search"</p>
<p class="MsoNormal">
id="find_top"></form></p>
<p class="MsoNormal"> <a
href="page.cgi?id=quicksearch.html" title="Quicksearch
Help">[?]</a></li></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <li><span
class="separator">| </span><a
href="report.cgi">Reports</a></li></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <li></li></p>
<p class="MsoNormal"> <li
id="new_account_container_top"></p>
<p class="MsoNormal"> <span class="separator">|
</span></p>
<p class="MsoNormal"> <a
href="createaccount.cgi">New Account</a></p>
<p class="MsoNormal"> </li></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <li
id="mini_login_container_top"></p>
<p class="MsoNormal"> <span class="separator">|
</span></p>
<p class="MsoNormal"> <a id="login_link_top"
href="rest?GoAheadAndLogIn=1"</p>
<p class="MsoNormal"> onclick="return
show_mini_login_form('_top')">Log In</a></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <form action="rest" method="POST"</p>
<p class="MsoNormal"> class="mini_login
bz_default_hidden"</p>
<p class="MsoNormal"> id="mini_login_top"></p>
<p class="MsoNormal"> <input id="Bugzilla_login_top"
required</p>
<p class="MsoNormal"> name="Bugzilla_login"
class="bz_login"</p>
<p class="MsoNormal"> type="email" placeholder="Email
Address"></p>
<p class="MsoNormal"> <input class="bz_password"
name="Bugzilla_password" type="password"</p>
<p class="MsoNormal"> id="Bugzilla_password_top"
required</p>
<p class="MsoNormal"> placeholder="Password"></p>
<p class="MsoNormal"> <input type="hidden"
name="Bugzilla_login_token"</p>
<p class="MsoNormal"> value=""></p>
<p class="MsoNormal"> <input type="submit"
name="GoAheadAndLogIn" value="Log in"</p>
<p class="MsoNormal"> id="log_in_top"></p>
<p class="MsoNormal"> <a href="#" onclick="return
hide_mini_login_form('_top')">[x]</a></p>
<p class="MsoNormal"> </form></p>
<p class="MsoNormal"></li></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <li id="forgot_container_top"></p>
<p class="MsoNormal"> <span class="separator">|
</span></p>
<p class="MsoNormal"> <a id="forgot_link_top"
href="rest?GoAheadAndLogIn=1#forgot"</p>
<p class="MsoNormal"> onclick="return
show_forgot_form('_top')">Forgot Password</a></p>
<p class="MsoNormal"> <form action="token.cgi"
method="post" id="forgot_form_top"</p>
<p class="MsoNormal"> class="mini_forgot
bz_default_hidden"></p>
<p class="MsoNormal"> <label
for="login_top">Login:</label></p>
<p class="MsoNormal"> <input name="loginname"
size="20" id="login_top" required</p>
<p class="MsoNormal"> type="email"
placeholder="Your Email Address"></p>
<p class="MsoNormal"> <input id="forgot_button_top"
value="Reset Password" type="submit"></p>
<p class="MsoNormal"> <input type="hidden" name="a"
value="reqpw"></p>
<p class="MsoNormal"> <input type="hidden"
id="token_top" name="token"</p>
<p class="MsoNormal">
value="1695951637-0JUfFUYnFYxFqnY8TzMtXGfvnNA-Pcqhv-3yw9CYBEQ"></p>
<p class="MsoNormal"> <a href="#" onclick="return
hide_forgot_form('_top')">[x]</a></p>
<p class="MsoNormal"> </form></p>
<p class="MsoNormal"> </li></p>
<p class="MsoNormal"></ul></p>
<p class="MsoNormal"> </div></p>
<p class="MsoNormal"> </div></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <div id="bugzilla-body"></p>
<p class="MsoNormal"><div id="error_msg"
class="throw_error"></p>
<p class="MsoNormal"> The REST Interface feature is not</p>
<p class="MsoNormal"> available in this Bugzilla.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"></div></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><p id="post_err_msg"></p>
<p class="MsoNormal"> Please press <b>Back</b>
and try again.</p>
<p class="MsoNormal"></p></p>
<p class="MsoNormal"></div></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <div id="footer"></p>
<p class="MsoNormal"> <div
class="intro"></div></p>
<p class="MsoNormal"><ul id="useful-links"></p>
<p class="MsoNormal"> <li id="links-actions"><ul
class="links"></p>
<p class="MsoNormal"> <li><a
href="./">Home</a></li></p>
<p class="MsoNormal"> <li><span
class="separator">| </span><a
href="enter_bug.cgi">New</a></li></p>
<p class="MsoNormal"> <li><span
class="separator">| </span><a
href="describecomponents.cgi">Browse</a></li></p>
<p class="MsoNormal"> <li><span
class="separator">| </span><a
href="query.cgi">Search</a></li></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <li class="form"></p>
<p class="MsoNormal"> <span class="separator">|
</span></p>
<p class="MsoNormal"> <form action="buglist.cgi"
method="get"</p>
<p class="MsoNormal"> onsubmit="if
(this.quicksearch.value == '')</p>
<p class="MsoNormal"> { alert('Please enter
one or more search terms first.');</p>
<p class="MsoNormal"> return false; }
return true;"></p>
<p class="MsoNormal"> <input type="hidden"
id="no_redirect_bottom" name="no_redirect" value="0"></p>
<p class="MsoNormal"> <script
type="text/javascript"></p>
<p class="MsoNormal"> if (history &&
history.replaceState) {</p>
<p class="MsoNormal"> var no_redirect =
document.getElementById("no_redirect_bottom");</p>
<p class="MsoNormal"> no_redirect.value = 1;</p>
<p class="MsoNormal"> }</p>
<p class="MsoNormal"> </script></p>
<p class="MsoNormal"> <input class="txt" type="text"
id="quicksearch_bottom" name="quicksearch"</p>
<p class="MsoNormal"> title="Quick Search"
value=""></p>
<p class="MsoNormal"> <input class="btn" type="submit"
value="Search"</p>
<p class="MsoNormal">
id="find_bottom"></form></p>
<p class="MsoNormal"> <a
href="page.cgi?id=quicksearch.html" title="Quicksearch
Help">[?]</a></li></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <li><span
class="separator">| </span><a
href="report.cgi">Reports</a></li></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <li></li></p>
<p class="MsoNormal"> <li
id="new_account_container_bottom"></p>
<p class="MsoNormal"> <span class="separator">|
</span></p>
<p class="MsoNormal"> <a
href="createaccount.cgi">New Account</a></p>
<p class="MsoNormal"> </li></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <li
id="mini_login_container_bottom"></p>
<p class="MsoNormal"> <span class="separator">|
</span></p>
<p class="MsoNormal"> <a id="login_link_bottom"
href="rest?GoAheadAndLogIn=1"</p>
<p class="MsoNormal"> onclick="return
show_mini_login_form('_bottom')">Log In</a></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <form action="rest" method="POST"</p>
<p class="MsoNormal"> class="mini_login
bz_default_hidden"</p>
<p class="MsoNormal"> id="mini_login_bottom"></p>
<p class="MsoNormal"> <input
id="Bugzilla_login_bottom" required</p>
<p class="MsoNormal"> name="Bugzilla_login"
class="bz_login"</p>
<p class="MsoNormal"> type="email" placeholder="Email
Address"></p>
<p class="MsoNormal"> <input class="bz_password"
name="Bugzilla_password" type="password"</p>
<p class="MsoNormal">
id="Bugzilla_password_bottom" required</p>
<p class="MsoNormal"> placeholder="Password"></p>
<p class="MsoNormal"> <input type="hidden"
name="Bugzilla_login_token"</p>
<p class="MsoNormal"> value=""></p>
<p class="MsoNormal"> <input type="submit"
name="GoAheadAndLogIn" value="Log in"</p>
<p class="MsoNormal"> id="log_in_bottom"></p>
<p class="MsoNormal"> <a href="#" onclick="return
hide_mini_login_form('_bottom')">[x]</a></p>
<p class="MsoNormal"> </form></p>
<p class="MsoNormal"></li></p>
<p class="MsoNormal"> <li
id="forgot_container_bottom"></p>
<p class="MsoNormal"> <span class="separator">|
</span></p>
<p class="MsoNormal"> <a id="forgot_link_bottom"
href="rest?GoAheadAndLogIn=1#forgot"</p>
<p class="MsoNormal"> onclick="return
show_forgot_form('_bottom')">Forgot Password</a></p>
<p class="MsoNormal"> <form action="token.cgi"
method="post" id="forgot_form_bottom"</p>
<p class="MsoNormal"> class="mini_forgot
bz_default_hidden"></p>
<p class="MsoNormal"> <label
for="login_bottom">Login:</label></p>
<p class="MsoNormal"> <input name="loginname"
size="20" id="login_bottom" required</p>
<p class="MsoNormal"> type="email"
placeholder="Your Email Address"></p>
<p class="MsoNormal"> <input
id="forgot_button_bottom" value="Reset Password"
type="submit"></p>
<p class="MsoNormal"> <input type="hidden" name="a"
value="reqpw"></p>
<p class="MsoNormal"> <input type="hidden"
id="token_bottom" name="token"</p>
<p class="MsoNormal">
value="1695951637-0JUfFUYnFYxFqnY8TzMtXGfvnNA-Pcqhv-3yw9CYBEQ"></p>
<p class="MsoNormal"> <a href="#" onclick="return
hide_forgot_form('_bottom')">[x]</a></p>
<p class="MsoNormal"> </form></p>
<p class="MsoNormal"> </li></p>
<p class="MsoNormal"></ul></p>
<p class="MsoNormal"> </li></p>
<p class="MsoNormal"></ul></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <div
class="outro"></div></p>
<p class="MsoNormal"> </div></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> </body></p>
<p class="MsoNormal"></html></p>
<p class="MsoNormal">Enviado desde <a
href="https://go.microsoft.com/fwlink/?LinkId=550986"
moz-do-not-send="true">
Correo</a> para Windows</p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
</div>
<div dir="auto">
<div class="k9mail-signature">-- <br>
Sent from my Android phone with K-9 Mail. Please excuse my
brevity.</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre wrap="" class="moz-quote-pre">_______________________________________________
support-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:support-list@bugzilla.org">support-list@bugzilla.org</a>
<a class="moz-txt-link-freetext" href="https://lists.bugzilla.org/listinfo/support-list">https://lists.bugzilla.org/listinfo/support-list</a>
</pre>
</blockquote>
<div class="moz-signature">-- <br>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
</div>
<div class="moz-signature"
signature-switch-id="b0b24bd1-735c-4a02-9f5d-e2b2e9b4f40d">
<div>
<table style="width: 300px; border-style: none;"
cellpadding="3px" border="0px">
<tbody>
<tr>
<td style="width: 106px;"><img alt="[Bugzilla Logo]"
src="cid:part1.LG2LEgj4.yuJ2GBF5@bugzilla.org"
width="100" height="100"></td>
<td>
<div><strong><span style="font-size: 13pt;">Dave Miller</span></strong></div>
<div>Project Leader</div>
<div><strong>Bugzilla Project</strong></div>
<div><a href="https://bugzilla.org/"
rel="nofollow
noopener noreferrer" target="_blank"
class="moz-txt-link-freetext">https://bugzilla.org/</a></div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>