Forum Discussion
Http Get with specifying 'all' for a required field
- Anonymous6 years ago
Hi parry2k : Thanks for the help! Really appreciate it.
For those newbees like me:
-I had to change the function in advance editor-> to change NoticeId type from text to number and use Number.toText(NoticeId) in the url.
-Also I copied my master data source into a 2nd table, renamed it and kept only Id Column. Then selected this table to -'Add Column', 'Invoke Custom Function' step to bring a table of records for each row/ Id on this 2nd table. After expanding the Column-> I selected which fields I need to show up in this table.
-I then added a 'Notice Details' page, added drill-through feature with 'Id', had a 'Table' visual to show info from the 2nd table [giving me the info form my api#2].
-Now I can drill-through on 'Id' from my first page/ Notice Summary: for a specific row/Id-> I go to the 'Notice Details' page and see the Details for that Notice!
Voila! 🙂
Hi parry2k , Hi all: Sorry for the confusion, I should have provided more info earlier.
There are two APIs (‘notice’ and ‘notice details’ ) I am trying to connect. Api#1 [notice] is my data source where I am doing “Get Data” via ‘Web’ providing the api url and Api-Key [using ‘Advanced’ feature]- get 50 most recent notices. I get the data and display them in a ‘Table’ visual. One of the fields is ‘Id', an unique field for each notice. When I click on a notice in the ‘Table’ visual, I want to see the ‘notice details’ depending on the 'Id'.
Api#2 [notice details] is what I provided the info for earlier. ‘Id’ is a required field for this Api#2 to get details for a specific notice [with that id]. Now, When I click on a specific notice on the table visual, I have the Id for that notice. I have added drill-through page with another ‘Table’ visual to display the ‘notice details’ info. I have created a measure:
Api Link for ABC Notice Detail = "https://api.abc.com/natgas/events/v1/notices/" & SELECTEDVALUE ('abc-notices_apiConnect'[Id] )
Added a button, ‘More info’ -> with Action-> Web Url and selected this measure for Conditional formatting. But clicking the button, I get ‘this page isn’t working right now’.
As mentioned earlier, I provided Api url and Api-key while I used the Api#1 as a data source. I am not using APi#2 as a data source [as I don’t know the Id ahead of time], but rather trying to connect later to get the details info. I am using the Api url in the measure, but don’t know how to pass the Api-Key- probably that’s why the error is happening.
Any idea how to resolve this issue or get the 'notice details' info to display in a visual ? Many thanks in advance.
Anonymous now it started making sense, so basically you make API #1 call to and get the IDs (50 ids) let's say and now you are dynamically creating this url to open the URL and see the list of the id (not in power bi) but it will be online, correct?