Bug 972774 - result of GET reports.xml|json should take accept header into account
result of GET reports.xml|json should take accept header into account
Status: NEW
Product: RHQ Project
Classification: Other
Component: REST (Show other bugs)
4.8
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: ---
Assigned To: Heiko W. Rupp
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-10 10:48 EDT by Libor Zoubek
Modified: 2015-11-01 19:45 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Libor Zoubek 2013-06-10 10:48:46 EDT
Description of problem: When I have a REST client which understands JSON or XML and goes to /reports server returns a page with links to reports. Those reports only support .csv format. Client has no glue about that and when he follows those links, he get's 503 from server (because it sends "accepts : application/json")

Version-Release number of selected component (if applicable):

How reproducible:always


Actual results:
1. do GET /rest/reports.html

server returns this:

 <li>
    <a href="http://localhost:7080/rest/reports/alertDefinitions.csv">alertDefinitions</a>
 </li>

2. do GET /rest/reports.xml

server returns this:
<link href="http://localhost:7080/rest/reports/alertDefinitions" rel="alertDefinitions"/>

then, if you do GET /rest/reports/alertDefinitions with "accept: application/xml" header, server returns 500

Expected results: We should either implement XML/JSON support for all reports or provide links, which are correct (possibly no links for client talking in XML)


Additional info:

Note You need to log in before you can comment on or make changes to this bug.