Skip to Content

Headers and Query Parameters in BI Platform REST SDK (biprws)

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/

2 Comments
You must be Logged on to comment or reply to a post.