Bug 2099809
| Summary: | REST comment API returning 400 Bad Request | ||
|---|---|---|---|
| Product: | [Community] Bugzilla | Reporter: | Prarit Bhargava <prarit> |
| Component: | WebService | Assignee: | The Bugzilla Team 🤖 <bugbot> |
| Status: | CLOSED NOTABUG | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 5.0 | CC: | jfearn |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-08-18 04:10:42 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Prarit Bhargava
2022-06-21 18:18:14 UTC
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. |