cancel
Showing results for 
Search instead for 
Did you mean: 

Saving the webi report using Rest-sdk

Former Member
0 Kudos

hi All,

I tried saving the opened webi report and tried to save the report using the restwebservice call in java

POST <webiURL>/documents/{documentId} 

and gave the following input "<document><name>test-gaurav</name><folderId>-1</folderId></document>"
but it throw the error
error   :: Error [error_code=WSR 00999, message=Internal error]
can we save the opened webi report with this service?
Thanks
Gaurav

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member197386
Active Contributor
0 Kudos

Hello,

According to the documentation, POST is for creating a new Webi document (an empty one or from an existing one).

Use PUT to simply save back your document to the CMS.

Regards,

Anthony

Former Member
0 Kudos

hi Anthony,

yes, I want to create a new webi report with the updated no. of columns after removal of the some of the columns and save to the new report name given in post request.

will this work using using this request?

Thanks

Gaurav

former_member197386
Active Contributor
0 Kudos

Hi Gaurav,

Ok, so if you want to create a new Webi document from an existing one, you have to use a POST with a payload like you did:

<document>

     <name>testgaurav</name>

     <folderId>-1</folderId>

</document>

You have to specifify what is the "source" Webi document to copy using the query parameter "sourceId" with the identifier.

Regards,

Anthony

Former Member
0 Kudos

Hi Gaurav,

A small doubt,

Did you open the Report in Webi and then Trying to save it using Restful SDK.

If that is the case you cannot do it.

Otherwise,

Try saving the report using a Put method instead of Post to save the report.

Rajesh

eric_festinger
Contributor
0 Kudos

hello Gaurav,

In addition to Dan's recommandation about WACS trace, which version are you running? (GET .../raylight/v1/about) ?

Thanks,

eric

daniel_paulsen
Active Contributor
0 Kudos

Hi Guarav,

You can't save a report to a folder with an ID of "1" as this is not a valid folder.  The infoobject ID 1 is reserved for the "Everyone" Group, so essentially you a tryinig to save a report to a Group.  Make sure you are using a valid folder ID that the logged on user has access to.

[edit]: 

Sorry about that.  Bad eyes and a tiny font on my screen.  I see now that you used "-1".  Yes this should work for saving the document back to the same folder with a different name.  If you enable the stack trace on the WACS server, you should get a better error.  Also, one thing to try is removing the hyphen from the new name (just to be sure that's not part of the issue).

Dan