cancel
Showing results for 
Search instead for 
Did you mean: 

Export to HTML throwing RWS 00058 Not acceptable, (RWS 00058)

Former Member
0 Kudos

Hi,

I am trying to export to HTML and it is throwing the above error.

The Header is "text/html" and file extension for download is also .html.

The GET request is ...raylight/v1/documents/docid

Anything i have to do or missing here?

Thanks,

Arun

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

If on 4.1. Use accept header as application/zip for zipped HTML if want to export a webi document in listing mode.


Else you can export a report in the webi document directly to html.

The GET request is ...raylight/v1/documents/docid/reports/reportid

Accept header is text/html

You can refer to the Restful guide for more details.

Thanks,

Prithvi

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Prithvi,

   I am trying to get the document in HTML and face the issue mentioned above. I have used "text/html" as the Accept header. My get request is just raylight/v1/documents/docid/

I do get a response when I try with appliaction/xml as Accept header, but the response code is 406 when I hit the same URL with text/html

  Any suggestion?

Thanks

Vish

daniel_paulsen
Active Contributor
0 Kudos

Hi Vish,

You cannot export the whole document to HTML directly as there can be multiple pages, so the for the URL you are using, the HTML export is a zip file with all of the pages zipped up.  As per the documentation, the Accept header should be "application/zip".

You can export  a report in listing mode as a single HTML file using:

GET  /raylight/v1/documents/<docId>/reports/<reportId>

this will work with Accept:  text/html

If you want individual pages instead of a long single page use:

GET  /raylight/v1/documents/<docId>/reports/<reportId>/pages/<pageNum>


See the following sections of the documentation:

  • Exporting a Document in Listing mode
  • Exporting a Report in Listing mode
  • Exporting a Report as a Series of Pages

Dan