cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a webi report based on universe using RESTful SDK

former_member204024
Participant
0 Kudos

The following workflow is used. Content type and SAP Logon token are passed in each request not mentioned below.

Post

http://server:6405/biprws/raylight/v1/documents/

<document> <name>REST Document</name> <folderId>410469</folderId> </document>

200 - Able to see a blank document in the folder.

Post

http://server:6405/biprws/raylight/v1/documents/410572/dataproviders

<dataprovider> <name>REST DP</name> <dataSourceId>310173</dataSourceId> </dataprovider>

200

Get

http://server:6405/biprws/raylight/v1/documents/410572/dataproviders/DP0

200

Able to see the query properties. Now how to add the objects in select clause and where clause.

I tried PUT

http://server:6405/biprws/raylight/v1/documents/410572/dataproviders/DP0

<dataprovider> <dictionary> <expression dataType="Numeric" qualification="Dimension"> <id>DS0.DOb9</id> <name>Month</name> </expression> </dictionary> </dataprovider>

Even I tried

PUT

http://server:6405/biprws/raylight/v1/documents/410572/dataproviders/DP0/specifications

<queryspec:QuerySpec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:queryspec="http://com.sap.sl.queryspec" dataProviderId="DP0"> <queriesTree xsi:type="queryspec:QueryOperatorNode" queryOperator="Union"> <children xsi:type="queryspec:QueryDataNode"> <bOQuery name="REST DP"> <resultObjects identifier="DS0.DOc4" name="Month Name" /> <conditionPart/> </bOQuery> </children> </queriesTree> </queryspec:QuerySpec>

Nothing helped me. Kindly guide me.

Accepted Solutions (1)

Accepted Solutions (1)

daniel_paulsen
Active Contributor

Hi Subramanian

After adding the dataprovider to the document, you will need to add the query specification with the query containing the result objects.

If you have a document designed using this dataprovider, you can retrieve the specification of that document to see what the body should look like. Your workflow would be:

  1. POST http://server:6405/biprws/raylight/v1/documents/
  2. POST http://server:6405/biprws/raylight/v1/documents/410572/dataproviders
  3. PUT http://server:6405/biprws/raylight/v1/documents/410572/dataproviders/DP0/specification
    the body of this PUT will have the query specification (similiar to the format you would retrieve from an existing document).
  4. PUT http://server:6405/biprws/raylight/v1/documents/410572 to save the changes

Dan

Answers (0)