Query the BusinessObjects repository using REST SDK (RWS)
This blog describes about Query the BusinessObjects repository using BI Platform REST API.
API Details:
API URL | http://<host>:<port>/biprws/v1/cmsquery |
HTTP Methods | GET , POST |
Data Formats | Application/JSON, Application/XML |
Headers | x-sap-logontoken |
This RWS API introduced from SAP BOE 4.2 SP03.
Using cmsquery REST API one can easily query the BusinessObjects repository and get the required information which is similar to Query Builder. (AdminTools URL : http://<host>:<port>/AdminTools ) but using REST API the result will be in XML/JSON format.
Repository:
Table | Description | Type of Objects in Table |
---|---|---|
CI_SYSTEMOBJECTS | InfoObjects that the BI Platform uses | User, User Group, Server, Server Group,Folder, Connection, Calendar,Event |
CI_APPOBJECTS | InfoObjects that are used by documents | Universe |
CI_INFOOBJECTS | InfoObjects that are consumed by the end user | WebI, Crystal Report, FullClient, PowerPoint, Pdf, Excel, Word, Rtf, Txt,Program, Shortcut |
No need of any special rights to use this REST API ( Admin must enable to use Restful Web services application to user in CMC applications).The response of this API contains the data based on user rights.
Note: Using cmsquery REST API user can only query the information stored in the CMS database not from the File repository files.
Basic properties of InfoObject:
InfoObject property | Description |
---|---|
SI_ID | Integer – Unique id generated for the Infobject within the environment |
SI_NAME | String – Name of the InfoObject |
SI_KIND | String – Type of the Infoobject |
SI_CUID | String – Cluster Unique Identifier of the InfoObject |
SI_GUID | String – Global Unique Identifier of the InfoObject |
SI_RUID | String – Unique id of the Infobject within the Object package |
SI_PARENTID | Integer – Parent Objects SI_ID |
SI_OWNERID | Integer – SI_ID of the InfoObject’s owner |
SI_CREATION_TIME | Date and Time – Creation time of InfoObject |
SI_UPDATE_TS | Date and Time – Last updated time of InfoObject |
API WorkFlows (XML and JSON):
HTTP Method: GET Data format : JSON
HTTP Method: POST Data format : JSON
Response in JSON format:
HTTP Method: GET Data format : XML
HTTP Method: POST Data format : XML
Response in XML format:
Get x-sap-logontoken (Authectication):
Learn More:
https://help.sap.com/doc/220244879d104f2e8e8b37e0fa0bdd2d/4.2.3/en-US/sbo42sp3_bip_rest_ws_en.pdf
Very Informative!
Good info.
Great blog very informative!
Thank You Bharath,
Seeing that you are with SAP, do you know when we will be able to retrieve the subobjects (ie: SI_SCHEDULEINFO)?
The following query will filter based on the SI_SCHEDULEINFO.SI_SCHED_NOW object but it will not return any of the SI_SCHEDULEINFO objects in the select list.
SELECT SI_NAME, SI_KIND, SI_SCHEDULE_STATUS, SI_SCHEDULEINFO.SI_DESTINATIONS, SI_SCHEDULEINFO.SI_OWNER, SI_CREATION_TIME, SI_STARTTIME, SI_ENDTIME, SI_SCHEDULEINFO.SI_MACHINE_USED, SI_SCHEDULEINFO.SI_PID, SI_PARENT_FOLDER, SI_SCHEDULEINFO.SI_ENDTIME, SI_SCHEDULEINFO.SI_FORMAT_INFO, SI_STATUSINFO
FROM CI_INFOOBJECTS WHERE SI_SCHEDULE_STATUS = 3 AND SI_STARTTIME >= '2017.06.01.00.00.00' AND SI_SCHEDULEINFO.SI_SCHED_NOW = 0
Regards,
Greg
Hi Greg,
You will be able to retrieve the subobjects using "/cmsquery" RWS API from BOE 4.2 SP05 onwards.
-Bharath
Is this possible to get the data from the subfolders by using nested quries
NO.
Please write a script : Loop the response and call API for each subfolder.
Hello Bharath,
Do we have any alternative way for doing the same on 4.2 SP 02 ?
Thanks in advance.
You can use REST API or JAVA SDK, in both the ways, you have to write code.
Hello Bharath,
Is it possible to get tables, joins, aliases, derived tables, etc. from old universe model’s (i mean unv not unx).
Thanks.
This API gives metadata details. I think you should explore semantic layer APIs for your case.
The XML data being returned in this example is not valid XML as far as I can tell. The links in the 2-4 lines of the xml response you provide have ampserands in the href links. Those should not be permitted in valid XML. In the other API endpoint responses elsewhere in the RWS apis they return with the ampersands properly escaped as & but for some reason the cmsquery endpoint does not.