Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Opsgenie integration with PowerBI using Rest API

I am trying to integrate Opsgenie alerts api in PowerBi using Web contents. But I facing challenges to fetch list of alerts lets say for last one months. As it limits the record to 100 for API call. Can you please help us with DAX query in powerBI to meet the requirement of fetching data for last month. can you please help on how we can use pagination as an option.

 

2 answers

1 vote
Robert Atlassian Team Sep 15, 2020

Hi @Ajaykumar Panchal !

 

A URL for the next set of alerts will be returned in the headers and body of your API call. We have documentation on pagination here:

 

https://docs.opsgenie.com/docs/pagination

Hi @Ajaykumar Panchal

I have the same problem. I've tried with loops in Power Query but didn't work.

Did you find the solution ?

 

let
 iterations = 10,          // Number of iterations
 url = 
  "https://api.opsgenie.com/v2/alerts?query=<enter your query here>",
 
 FnGetOnePage =
  (url) as record =>
   let
    Source = Json.Document(Web.Contents(url,[Headers=[Authorization="GenieKey XXXXXXXXXXXXXXXXXXXXXXXXX"])),
    data = try Source[data] otherwise null,
    next = try Source[paging][next] otherwise null,
    res = [Data=data, Next=next]
   in
    res,
 
 GeneratedList =
  List.Generate(
   ()=>[i=0, res = FnGetOnePage(url)],
   each [i]<iterations and [res][Data]<>null,
   each [i=[i]+1, res = FnGetOnePage([res][Next])],
   each [res][Data])
 in
  GeneratedList

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
Community showcase
Published in Opsgenie

New GitLab integration in Incident Investigation view

We launched the first version of the Incident investigation view in April of 2020 for Bitbucket Pipelines. Shortly after that, we added the ability to investigate deployment-related incidents in Opsg...

325 views 0 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you