Technology Blog Posts by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member230921
Active Contributor
6,718
This blogs describes about BI Platform REST SDK (RWS) headers and query parameters.(BOE 4.2 SP03 + )

Headers:





















Accept

To mention the data format in response of the API

Possible values: Application/JSON or Application/XML

If user is not adding this header. default: Application/XML
Content-type

To mention the data format in request of the API

Possible values: Application/JSON or Application/XML
x-sap-logontoken

User must add this header in each APIs call apart from authentication APIS

(Learn more)
x-sap-pvl

User can mention the "Product View Locale" to get  Response in specific language.

(Make sure Language packs installed with BOE)

Note: All header keys are case insensitive and 2 header values are case sensitive(x-sap-logontoken and x-sap-pvl).

 

Query Parameters:


You can add query parameters to the uniform resource identifiers (URI) for REST API collection resources to tailor and filter the response output. All query parameter names and values are case-sensitive.

Example : http://host:port/biprws/v1/infostore?type=Folder

we can divide the BIP RWS query parameters into 3 types

- Paging

- Sorting

- Filtering

From BOE 4.2 SP03 and onwards all BI Platform REST APIs supports these parameters.
Paging:

There are 2 query parameters in paging.











page page number (integer)
pagesize number of objects in each page (Integer)

Example: http://host:port/biprws/v1/infostore?page=1&pagesize=30

If user is not passing "pagesize" parameter then default value is 50.Administrator can change this number in CMC.

CMC->Servers->Web Application Container Server->Right Click properties


Sorting:
















 sort=+ if parameter value prefixed with +, then Sorting orders is ascending
 sort=- if parameter value prefixed with +, then Sorting orders is descending
default no prefix in parameter value, default is ascending order

Example:http://host:port/biprws/v1/infostore?sort=+name
Filtering:

This is basically apply filters on list of objects in response based on the value provided in URL.

For example user wants to list only objects with parent ID 1234 from infostore.

http://host:port/biprws/v1/infostore?parentid=1234

Examples for Paging, Sorting and Filtering:


1. Top 10 objects modified recently from info store:

http://host:port/biprws/v1/infostore?pagesize=10&sort=-updated

2. Top 100 objects from BI Inbox

http://host:port/biprws/v1/inbox?pagesize=100&sort=-updated

3. Documents modified in the month of April 2017

http://host:port/biprws/v1/documents?updated=2017-04-01,2017-04-30&sort=-updated

4.Get list of deleted Webi documents

http://host:port/biprws/v1/recyclebin?kind=webi

 

Learn More:


https://help.sap.com/viewer/db6a17c0d1214fd6971de66ea0122378/4.2.4/en-US

https://blogs.sap.com/2017/04/21/session-management-in-bi-platform-rest-sdk-rws/

https://blogs.sap.com/2017/05/10/query-the-businessobjects-repository-using-bi-platform-rest-sdk-rws...
3 Comments
Nandan_Tadahal
Product and Topic Expert
Product and Topic Expert
Good info Bharath ! will there be similar enhancements done to OData services ?
former_member230921
Active Contributor
0 Kudos
OData Services introduced from BOE 4.2 SP04 and this services specific for BOE Integration with Fiori Launchpad.Filters are available in OData services also but not all like REST SDK.

Link : https://blogs.sap.com/2017/05/15/bi-platform-odata-service-for-sap-fiori-launchpad/  
former_member421729
Discoverer
0 Kudos
Hello Bharath,

 

I have a scneario with CORS headers added in the command line parameters of WACS Server on WIN 2019 Servers with BI 4.2SP8.Standalone CMS,Tomcat on a Separate Server.

 

When I run a test from the Tomcat Server using POSTMAN I am not getting the following values:

Access-Control-Allow-Credentials

Access-Control-Allow-Origin

Access-Control-Expose-Headers (this header contains X-SAP-LogonToken)

 

The same values are returning from our Tomcat Server on WIN 2012 Server.

Can you please advise if any configuration needs to be updated to resolve this issue?

 

Regards,

Shravan