cancel
Showing results for 
Search instead for 
Did you mean: 

Refresh and export webi

Former Member
0 Kudos

Hi,

I can export a webi document as it is but i want to refresh and export a webi document. There is only one parameter with Language = En, which is default. I tried the below in GET, it doesn't work. http://servername:6405/biprws/raylight/v1/documents/1234/parameters?lovInfo=false.

Do i have to use PUT while refreshing?

Any suggestions appreciated.

Thanks,
Arun

Accepted Solutions (1)

Accepted Solutions (1)

eric_festinger
Contributor

hi Arun,

Can you please detail your "it doesn't work"?

Thanks,

eric

Former Member
0 Kudos

Hi Eric,

Sorry, i should have explained it. I am getting the below error messages

<error>
    <error_code>RWS 00058</error_code>
    <message>Not acceptable, (RWS 00058)</message>
</error>

Also i have a question, do i need to upload any xml into the code with parameters while running the JSP? Also for refresh do i need to have both PUT and GET in the code?

Thanks,
Arun

daniel_paulsen
Active Contributor
0 Kudos

Hi Arun,

That error message RWS 00058 suggests an incorrect value on the Accept header.  When calling the /parameters API it should be application/xml or application/json.

If you want to change a parameter value and refresh, than you need to use a PUT with:

/documents/<docId>/parameters  (with or without lovInfo)

and provide the answer to the parameter in the body of the request.  You don't need to use a GET if you already know what to provide in the request.  the GET will simply return a list of parameters so you can determine what parameter will need to be answered when refreshing the document.

Dan

Former Member
0 Kudos

Thanks Dan. I am able to get the output in xml and see the parameters and value. But for refreshing and exporting to xls or pdf if i keep the header like put.addHeader("Accept", "application/pdf"); it shows the same above error.

I need to pass parameters, refresh and export to xls/pdf and i give PUT like this "http://servername:6405/biprws/raylight/v1/documents/1234/parameters?Choose language='EN'".

Is it the correct way of doing  this?

daniel_paulsen
Active Contributor
0 Kudos

Hi Arun,

No, that is not correct.  I think you might be confusing the "<optional_parameters>" in the documentation (which are for formatting: dpi, orientation, scaling etc) with parameters in the report.


To refresh with a parameter value and export, your steps would be as follows:

(I'm assuming "Choose Language" is your prompt question and "EN" is the answer

1. Refresh with new value

PUT (Accept: application/xml)   .../documents/<docID>/parameters

body:

<parameters>

   <parameter>

        <id>0<id>                                         <--  assuming this is the correct ID

        <name>Choose Language</name>     <-- assuming this is the param name (tag not req'd)

        <answer>

          <values>

              <value>EN</value>

           <values>

       </answer>

   </parameter>

</parameters>

2. Export to PDF

GET (Accept: application/pdf)   .../documents/<docID>

Dan

Former Member
0 Kudos

Thanks Dan. That is helpful, will work on the PUT and GET code and update.

Answers (0)