Skip to main content

Get filter and contacts data from customer's API

This integration automates the update of slicer, filter and contact email information before every run of your report campaign. BI Helper calls your application APIs to fetch the latest slicer, filter and contact information and use them to generate PDFs and send emails. You can continue to use the scheduler, email body and other functionality provided in the BI Helper user interface.

Customizations#

With this integration, you can customize your job for:

  • File Name: You can define your file nomenclature for the PDF reports generated.

  • Email Subject: You can define your subject title.

  • Filters: You can provide any date range or any filters using the APIs and BI Helper will pull the correct values for them from your reporting system.

  • Folder Structure: If you want to store files in a specific folder format, you can define the folder structure in your file names and BI Helper will automatically create the folders and store your files as defined.

API Response Format#

Your API Endpoint should return the data in the below format. Please note:

  • All the fields given below are mandatory.
  • If statusCode is anything other than 200, the API response is considered a failure.
  • Make sure the filter_names are exactly as defined in your BI report.
  • API Authorization: See next topic.
In the following images and examples, please replace the Filter Names and Filter Values as per the format defined by Power BI or Tableau, in their PDF configuration instructions.
{  "statusCode": 200,  "body": {    "files_to_generate": [      {        "bcc_email": ["ishan@bihelper.tech","kiran@bihelper.tech"],        "cc_email": ["ishan@bihelper.tech"],        "to_email": ["ishan@vegasolutions.in"],        "filters": [          {            "filter_name": "District Manager",            "filter_value": "Annelie Zubar"          },          {            "filter_name": "Start Date",            "filter_value": "03/03/2019"          },          {            "filter_name": "End Date",            "filter_value": "04/04/2019"          }        ],        "file_name": "Annelie Zubar, 2019-04.pdf"      },      {        "bcc_email": ["ishan@bihelper.tech","kiran@bihelper.tech"],        "cc_email": ["ishan@bihelper.tech"],        "to_email": ["ishan@vegasolutions.in"],        "filters": [          {            "filter_name": "District Manager",            "filter_value": "Andrew Ma"          },          {            "filter_name": "Start Date",            "filter_value": "03/03/2019"          },          {            "filter_name": "End Date",            "filter_value": "04/04/2019"          }        ],        "file_name": "Andrew Ma, 2019-04.pdf"      },      {        "bcc_email": ["ishan@bihelper.tech","kiran@bihelper.tech"],        "cc_email": ["ishan@bihelper.tech"],        "to_email": ["ishan@vegasolutions.in"],        "filters": [          {            "filter_name": "District Manager",            "filter_value": "Ishan Rastogi"          },          {            "filter_name": "Start Date",            "filter_value": "03/03/2019"          },          {            "filter_name": "End Date",            "filter_value": "04/04/2019"          }        ],        "file_name": "Ishan Rastogi, 2019-04.pdf"      }    ]  }}

API Field Description#


{   "statusCode": <API Response Code. Only codes as 200 are accepted as a valid response> ,   "body": {       "files_generated": <List of Objects> [           {               "bcc_email": [<Comma separated list of contacts>],               "cc_email": [[<Comma separated list of contacts>],               "to_email": [[<Comma separated list of contacts>],               "filters": <List of filters to be applied> [                   {                       "filter_name": "Name of Filter as it appears in your BI Report",                        "filter_value": “Filter value to be applied to this filter",                   }               ],               "file_name": "The name you want to have for the file generated after the                             application of the above set of filters"           }       ]   }}

API Authorization#

info

In case you want to keep the API private, you can whitelist the API for the following BI Helper IP:
3.87.149.64.

On setting up the API Integration, you can view your secret token in the Generate PDF tab in https://portal.bihelper.tech.

When BI Helper calls your API, it will pass this secret token in an http header x-bihelper-token. This token needs to be captured in your API implementation and will check if the API is being called from the authorized source.

warning

DO NOT share this token with anyone. If you want to get the token reset, please write to us. BI Helper supports both GET and POST endpoints.

Demo endpoint#

Demo Endpoint https://28ldzt956a.execute-api.us-east-1.amazonaws.com/bihelper/filters?user=ishan@bihelper.tech
Secret Token: j6lndQDQqjcyE7CTSoITatDeD
Try API Here: https://reqbin.com/0kmuaffk

OR

curl --header "x-bihelper-token:j6lndQDQqjcyE7CTSoITatDeD" \https://28ldzt956a.execute-api.us-east-1.amazonaws.com/bihelper/filters?user=ishan@bihelper.tech