Bug 972774

Summary: result of GET reports.xml|json should take accept header into account
Product: [Other] RHQ Project Reporter: Libor Zoubek <lzoubek>
Component: RESTAssignee: Heiko W. Rupp <hrupp>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.8CC: theute
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:

Description Libor Zoubek 2013-06-10 14:48:46 UTC
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: