on 01-24-2016 5:29 AM
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
hi Arun,
Can you please detail your "it doesn't work"?
Thanks,
eric
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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?
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
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.