Web Reports - API

Tony Coffman -

The Web Reports API allows developers and users to call Web Reports from their native applications or bookmark their favorite reports with predefined parameters.

Web Reports API Call Syntax

Server URL/api/APIController/ReportName/ConnectionProfile/ReportType/Parameters

  • Server URL/api/: Web address to the Web Reports application on the IIS Server hosting the Web Reports API.

  • APIController: API Controller Name used to display the report's output.
    • FinishedReport - Calls the Finished Report Controller.
    • Visualize - Calls the Data Visualization Controller.

  • ReportName: Name of the VDM Report to be executed.

  • ConnectionProfile: Database Connection Profile that will be used when executing the Report.

  • ReportType: Report type that will be displayed in browser.
    • Finished Report - Displays the report in browser for Finished Reports.
    • Visualize - Displays the report in browser for Visualize.

  • Parameters: Parameters provide variable input to the report at the time of execution and is an optional component of the Web Reports API call. If the parameter values are not included in the Web Reports API call, and the report does have parameters, the user will be prompted by the Web Reports server for input. The parameter's "Datatype" and "Object Identifier" properties defined within the Report's settings determine if the parameter values provided in the API call require single quotes around Date and String values.  
    • Parameter?ParameterName=ParameterValue

      • Single Value Example for Dates: In the image below the parameter "CallDate" has a defined Datatype of "DateTime" and Object Identifier of " ' " (single quote).  This property configuration tells VDM that the expected parameter value's Dataype is a DateTime and to place single quotes around the provided value.  In this scenario the Web Reports API expects the following format: Parameter?CallDate=2016-09-07
      • If the Datatype was set to None the Web Reports API would expect the following format: Parameter?CallDate='2016-09-07'

      • Single Value Example for Strings: In the image below the parameter "CallType" has a defined Datatype of "String" and Object Identifier of " ' " (single quote).  This property configuration tells VDM that the expected parameter value's Dataype is a String and to place single quotes around the provided value.  In this scenario the Web Reports API expects the following format: Parameter?CallType=IN
      • If the Datatype was set to None the Web Reports API would expect the following format: Parameter?CallType='IN'
         
      • Single Value Example for Numerics: In the image below the parameter "CallType" has a defined Datatype of "Integer" and Object Identifier of " ' " (single quote).  Parameters with Datatype's of Integer and Decimal ignore the Object Identifier as the expected value is a numeric. In this scenario the Web Reports API expects the following format: Parameter?CallType=10

 

      • Multi Value Example for Dates, Strings or Numerics with a property Type of "IN": The Web Reports API ignores the "Dataype" and "Object Identifier" properties when used with a property Type of "IN".  

        • When the parameter's Type is set to "IN" the Web Reports API expects the following format for Strings values: Parameter?CallType=('IN','MA','UM')
        • When the parameter's Type is set to "IN" the Web Reports API expects the following format for Date values: Parameter?CallType=('2016-09-01','2016-09-02','2016-09-03')
        • When the parameter's Type is set to "IN" the Web Reports API expects the following format for Numeric values: Parameter?CallType=(10,20,30)


      • Multi Value Example for Dates, Strings or Numerics with a property Type of "IN No Parenthesis": The Web Reports API ignores the "Dataype" and "Object Identifier" properties when used with a property Type of "IN No Parenthesis".  

        • When the parameter's Type is set to "In No Parenthesis" the Web Reports API expects the following format for Strings values: Parameter?CallType='IN','MA','UM'
        • When the parameter's Type is set to "In No Parenthesis" the Web Reports API expects the following format for Date values: Parameter?CallType='2016-09-01','2016-09-02','2016-09-03'
        • When the parameter's Type is set to "In No Parenthesis" the Web Reports API expects the following format for Numeric values: Parameter?CallType=10,20,30

 

If you'd like to run the sample Web Reports API below, you must first register a user account at our Demo Site. Please follow this link.


Below is an example Web Reports API call for a Finished Report with parameter values:

  • Server URL/api/: https://license.bridgeworksllc.com/WebReports/api/
  • APIController: FinishedReport?
  • ReportName: report=ContactAnalytics-InboundCallAnalysis-Hourly.vdm&
  • ConnectionProfile: FACSLocal&
  • ReportType: Finished Report
  • Parameters: Parameters=Parameter?CallType=('IN','MA','UM')Parameter?CallDate=2016-09-07

https://license.bridgeworksllc.com/WebReports/api/FinishedReport?report=SampleWRAPIReport.vdm&Connection=FACSLocal&Type=Finished%20Report&Parameters=Parameter?CallType=('IN','MA','UM')Parameter?CallDate=2016-09-07

 

Below is an example Web Reports API call for a Data Visualization with parameter values:

  • Server URL/api/: https://license.bridgeworksllc.com/WebReports/api/
  • APIController: Visualize?
  • ReportName: report=ContactAnalytics-InboundCallAnalysis-Hourly.vdm&
  • ConnectionProfile: FACSLocal&
  • ReportTypeVisualize
  • ParametersParameters=Parameter?CallType=('IN','MA','UM')Parameter?CallDate=2016-09-07

https://license.bridgeworksllc.com/WebReports/api/Visualize?report=SampleWRAPIReport&Connection=FACSLocal&Type=Visualize&Parameters=Parameter?CallType=('IN','MA','UM')Parameter?CallDate=2016-09-07

 

Below is an example Web Reports API call for a Finished Report without passing parameter values:

  • Server URL/api/: https://license.bridgeworksllc.com/WebReports/api/
  • APIController: FinishedReport?
  • ReportName: report=SampleWRAPIReport.vdm&
  • ConnectionProfile: FACSLocal&
  • ReportType: Finished Report

https://license.bridgeworksllc.com/WebReports/api/FinishedReport?report=SampleWRAPIReport.vdm&Connection=FACSLocal

Have more questions? Submit a request

Comments

Powered by Zendesk