Description of problem: Bugzilla REST comment API doesn't appear to be working. For example, this worked just a few days ago https://bugzilla.redhat.com/rest/bug?id=1981938/comment but now returns an error page. The API is documented here: https://bugzilla.redhat.com/docs/en/html/api/core/v1/comment.html?highlight=rest%20comment#get-comments Version-Release number of selected component (if applicable): 5.0.4.rh72 How reproducible: 100% Steps to Reproduce: 1. Browse to https://bugzilla.redhat.com/rest/bug?id=1981938/comment Actual results: " Bad Request The server was unable to process this request " Expected results: No error and comment data displayed Additional info: Seems to be a recent failure.
The format in the doc works for me: https://bugzilla.redhat.com/rest/bug/2099809/comment
AIUI you cannot switch between parameters and paths, once you use a parameter everything after that is a parameter. I could not find anything in the logs for the format you are using before this week. For a single bug you can use the format in #1, for multiple bugs you can use the include_fields parameter to only get comments. The payload is slightly different. e.g. https://bugzilla.redhat.com/rest/bug?id=2099809&include_fields=comments There is a bug in how the errors get returned to the user for this kind of error, that will need to be fixed either on this bug or another.
Thanks jfearn, but I still seem to be getting errors on commands that worked last week. For example, this worked last week: curl --compressed -X GET -H "Authorization Bearer <my_api_key>" https://bugzilla.redhat.com/rest/bug?id=1981938/comment but now returns an error. Even switching the URL to https://bugzilla.redhat.com/rest/bug/1981938 still results in an error. Did something change on the bugzilla instance? P.
(In reply to Prarit Bhargava from comment #3) > Thanks jfearn, but I still seem to be getting errors on commands that worked > last week. For example, this worked last week: > > curl --compressed -X GET -H "Authorization Bearer <my_api_key>" > https://bugzilla.redhat.com/rest/bug?id=1981938/comment > > but now returns an error. Even switching the URL to > https://bugzilla.redhat.com/rest/bug/1981938 still results in an error. > > Did something change on the bugzilla instance? > > P. Okay, I'm dumb and I forgot a ":". But ... I swear it worked without the colon. P.
Some REST requests that failed use to return a 200 with an error message, those things now return an error code with the error message. They didn't work, they required manual checking for the error.