Running a Report Within an Application

This RESTful web service can be used to run a report stored in an application.

HTTP Method: POST

REST URL Format:

http://host:port/ibi_apps/rs/ibfs/EDA/NodeName/Appname/FexName

where:

host

Is the name of the system where WebFOCUS is installed.

port

Is the port number used by WebFOCUS.

NodeName

Is the name of the Reporting Server Node. For more information, see Listing WebFOCUS Reporting Server Nodes.

Appname

Is the name of the application containing the files to be listed. For more information, see Listing Applications.

FexName

Is the name of the WebFOCUS report as defined in the name attribute when listing files within an application. For more information, see Listing Files Within an Application.

Body Format:

IBIRS_action=run&IBIRS_clientPath=clientPath&IBIRS_htmlPath=htmlPath&userName=Userid
&password=Password&parmNameN=parmValueN

where:

clientPath

Is the path to the client application making the RESTful web service calls to WebFOCUS. For example:

http://myapplication.maj.com/Sales/Monthly.aspx

The parameter is used when the initial WebFOCUS report contains drill-down links or is defined as an On-Demand Paging report.

When you click on a drill-down link or pages in an On-Demand Paging report, the request will be routed to the client application, as defined by the clientPath value, instead of WebFOCUS. All of the parameter names and values are sent with the request. The client application will then have to redirect the request to the following URL, which is the WebFOCUS environment:

http://host:port/ibi_apps/rs/ibfs
htmlPath

Is the path to the WebFOCUS ibi_html directory structure. For example:

http://localhost:8080/ibi_apps/ibi_html

The ibi_html directory can be copied from the WebFOCUS directory structure to another location and then have the IBIRS_htmlPath parameter point to that new location.

This parameter is optional and is mainly used when running reports that need to access images and JavaScript that are packaged with WebFOCUS (for example, On-Demand Paging reports). For an example of its usage, see Visual Basic .NET and Java Code Examples.

Userid

Is the Reporting Server user ID. If the Reporting Server is running with Security Off or the Reporting Server sign in credentials are configured in the WebFOCUS Reporting Server Client settings, then this parameter does not have to be sent in the REST request.

Password

Is the Reporting Server password. If the Reporting Server is running with Security Off or the Reporting Server sign in credentials are configured in the WebFOCUS Reporting Server Client settings, then this parameter does not have to be sent in the REST request.

parmNameN

Is the name of the defined parameter that will be passed to the Reporting Server.

Note: The number of defined parameters can vary and depend on the number of parameters within the WebFOCUS report. For example, a WebFOCUS report that requires two parameters will also require these parameters and corresponding values to be set in the body of this RESTful web service (&parmName1=parmValue1&parmName2=parmValue2). In a different WebFOCUS report, there could be as many parameters as required (three, four, five, and so on).

parmValueN

Is the value of the defined parameter that will be passed to the Reporting Server.

Example:

In the following example, the Sales_for_a_Specific_Country report is being executed only for Japan.

Request:

http://localhost:8080/ibi_apps/rs/ibfs/EDA/EDASERVE/ibisamp/carinst.fex

Body:

IBIRS_action=run&COUNTRY=JAPAN

Response:

The response is a report in either HTML, Excel, PDF, active report, or a graph.


WebFOCUS