You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.
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:
I have the same problem. I've tried with loops in Power Query but didn't work.
Did you find the solution ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.