Integration with PowerBI for dashboarding

I am trying to create dashboards regarding incidents in Power BI.
I have the API key from Pager Duty but I am clueless about the process of how to integrate with Power BI.
I try to use get data function and enter URL api.pagerduty.com/incidents but I get an error.

If someone could provide me the steps on how to. it would be great.

1 Like

How are you configuring PowerBI’s get data function to query and process PagerDuty incidents?

Doug

I am using Web as source and I enter the URL https://api.pagerduty.com/incidents and hit OK.

Do I need to create a custom connector using powerapps and then get the data from there?

More than likely you’ll need to configure your Power BI connector with the proper headers as shown below:

1 Like

Thanks for the explanation.
I can get the data in Pager duty using these headers but when I enter the same header in PowerBI (Get Data from web) i get this error.


image

Do we need to create a custom connector in Power Apps to pull data from PagerDuty and then import that into PowerBi?

I am new to this, its just little confusing to me.

Thanks!

1 Like

Give it a try without the Content-Type field. I would assume you’ll need something in PowerBI world that can transform the PagerDuty data into a format that maps it in for use. You’ll get all of the raw JSON from the API, and I assume PowerBI would expect table/spreadsheet like columns/rows.

Doug

1 Like

I followed steps as Mr. Amber did, But i got message as unable to connect. let me know how can i proceedunableto%20connect

1 Like

I don’t see the Authorization header listed, did you leave it out on purpose?

I got the connection figured out. Turns out that i just needed a Power BI update.

My next problem is that the /incidents API call only gives top 25 results, how can I get all incident data?

Just 25 incidents data is not helpful for tracking purpose over time and we populate 25 incidents within Hours. Is there a workaround this?

1 Like

Congrats!

Yes, you’ll need to pass in an additional parameter with your query called ‘limit’. With the limit parameter you get up to 100 incidents per query. You’ll also likely need to use pagination so you can iterate and get all of the incidents over your desired time period. Check out this section of our documentation: https://developer.pagerduty.com/docs/rest-api-v2/pagination/

1 Like

Hi Doug,
thank you for the information.

The pagination documentation is very thin and I doubt any person with no experience with scripting will ever understand it because the loop is needed to be programmed in Javascript or python.

Is there a way to find a step by step tutorial on this. I searched google and found barely anything.

I want something like a pagination 101 for dummies because none of my team members in Data analytics department are aware of this process.

If PowerBI doesn’t have support for API pagination, you may need something in front of that to gather and prepare the data for ingestion. It may be best for you to reach out to your PagerDuty Account Team and ask them to set up some time for us to help you in more detail.