I'm using the PowerBI-Javascript library to embed reports in my website. However, I don't know if it's possible to retrieve this .json file.
{
"type":"report",
"accessToken":"flVW00-mB5Lc4fE_ElSgpJ8_7ceL6T_ZL9C_pqbTu4",
"id":"c52af8ab-0468-4165-92af-dc39858d66ad",
"name":"Retail Analysis",
"webUrl":"https://app.powerbi.com/reports/c52af8ab-0468-4165-92af-dc39858d66ad",
"embedUrl":"https://embedded.powerbi.com/appTokenReportEmbed?reportId=c52af8ab-0468-4165-92af-dc39858d66ad"
}
In the demo of the library, the report link returns this json which then is used to load the report on the website. In my case I don't have a link that returns a json at all, but just a link to load the report immediately.
I want to know is there a way, for each created report, to generate a link that returns this json. (I'm asking because I'm not in charge of the Power BI report creation, only the website).
Thank you beforehand.
You can use:
https://api.powerbi.com/v1.0/myorg/dashboards
or
https://api.powerbi.com/v1.0/myorg/reports
These links can be accessed from Postman with a valid bearer token.
Related
I want to get the Bulk Report for "content_owner_estimated_revenue_a1" in Youtube's Reporting API.
I created a report making job with the jobs.create method in the official YouTube APIs Explorer.
https://developers.google.com/youtube/reporting/v1/reference/rest/v1/jobs/create
A few days later, I got the URL of the report with the method jobs.reports.get in the APIs Explorer as well, gave Bearer's access token and issued a get request to the URL to download the CSV.
https://developers.google.com/youtube/reporting/v1/reference/rest/v1/jobs.reports/get
However, I could only get a header of the following format, although it should contain data.
date,channel_id,video_id,claimed_status,uploader_type,country_code,estimated_partner_revenue,estimated_partner_ad_revenue,estimated_partner_ad_auction_revenue,estimated_partner_ad_reserved_revenue,estimated_youtube_ad_revenue,estimated_monetized_playbacks,estimated_playback_based_cpm,ad_impressions,estimated_cpm,estimated_partner_red_revenue,estimated_partner_transaction_revenue
Of course, I got the token with the content owner's account and also entered the ID in onBehalfOfContentOwner and made an API request.
I have also confirmed that the revenue is being generated from the channel analytics page in Youtube Studio.
How can I fix this problem?
I've recently published a specific PowerBI report and despite creating a 'Phone' View on PowerBI Desktop this didn't show up in the final embed code.
I've looked into PowerBI Embedded Playground and managed to generate the relevant access tokens and even try it out, but still couldn't figure out how to modify the code in such a way to generate a mobile view.
The questions and answers below somehow didn't give me the insight I needed, still somehow need some additional work:
Mobile view is not being shown for embedded powerbi report
Create Report in Embed View via PowerBI API
Power BI RS web embedding in mobile web browser
What do I need to do to get started? Which documentation do I need to look into exactly? I need to embed this report in a Sharepoint 2010 Page and I need it to be mobile responsive on page load and not via a seperate link.
This isn't related to the access token in any way. It is generated before configuring the embedding process. To embed the report in phone view, you must specify MobilePortrait layout type in the embed configuration, i.e. something like this:
var config = {
.....
settings: {
filterPaneEnabled: true,
navContentPaneEnabled: true,
layoutType: models.LayoutType.MobilePortrait <-- THIS ONE
}
};
If you omit layoutType, it will be shown in the landscape view (i.e. like in the desktop). For more information about the configuration see Embed Configuration Details, and for embedding in general you should start from Embedding Basics.
I want to get the embedded URL of my existing reports. Is there any option to get those URL in a list view?
As per i know, currently there is no api for retrieving all reports.
For more information, you can refer Power BI Api reference.
You can get a list of all reports which have embed code. However you need an extra click to get the embedded code.
I'm trying to pass a URL filter to a published report but am unable to get it to work.
The report:
https://app.powerbi.com/view?r=eyJrIjoiOGExYjhhYmMtZmU0OS00ZGJjLWE3YmUtNTM5MjM1OWIzZTA5IiwidCI6IjUyM...
I've tried using the method here: Passing parameters to Power BI filter programmatically by adding &filter=Table1/ZipKey eq '00001' to the end of the URL but that doesn't work.
It works for this link:
https://app.powerbi.com/groups/me/reports/8d3cbf1e-3d89-46d3-ac1a-b24d0784b125/ReportSection?filter=...
Any ideas? Is this not possible? If not, the end goal is to be able to embed this within another page, is there a different method I could use?
The URL you provided:
The report: https://app.powerbi.com/view?r=eyJrIjoiOGExYjhhYmMtZmU0OS00ZGJjLWE3YmUtNTM5MjM1OWIzZTA5IiwidCI6IjUyM [snip]
is a publish to web report. The query string filter option is not supported for publish to web reports.
If you want to do programmatically filter the report you should use one of our supported developer options:
A) https://powerbi.microsoft.com/en-us/documentation/powerbi-developer-integrate-report-load-report-iframe/
B) https://azure.microsoft.com/en-us/documentation/articles/power-bi-embedded-iframe/
The second link you provided is a URL directly to the www.powerbi.com, where the URL filter syntax is also supported. Based on that option A may be what you're looking for.
You wrote
&filter
.. but the syntax is :
?filter
I am looking for a list of countries/states/cities that can be used with Facebook Graph API when publishing targeted posts.
I found one JSON file available on this page but the file doesn't parse correctly and I also doubt whether it can be used for post targeting since the file is for advertisements.
Also, I am not sure whether the third party data like the one provided by MaxMind can be used directly with Facebook API.
Does anyone have such a list or can atleast point me to a right direction?
The answer is here: https://developers.facebook.com/docs/reference/ads-api/get-autocomplete-data/
To check what countries are available you could just get a response from this endpoint:
URL:
https://graph.facebook.com/API_VERSION/search?type=adgeolocation&location_types=['country']
HTTP_METHOD: GET
You also have to set your access token in the URL.
To just see the fields key and name and a larger quantity of countries without being paginated this would be the complete URL:
https://graph.facebook.com/API_VERSION/search?type=adgeolocation&location_types=['country']&fields=key,name&limit=1000
For countries: search?type=adgeolocation&location_types=['countries']&limit=1000
For regions: search?type=adgeolocation&location_types=['region']&limit=1000&country_code=PT
Hope that helps :)
Well, for countries you could always check the Facebook Internationalization Document.
The file Facebook publishes seems valid for city/state/country lookups. It provides the graph id you will need. And it seems to parse as valid json for me.
Ok. I was able to use the same JSON file I mentioned in my question. As I said in my response to #offbysome, previously I had saved the file by opening it in Google Chrome. But then I used Firefox and used the Right Click => Save File As option to save the file on disk. This file is actually a tar gz (which facebook wrongly names as .php file). After unzipping the file, I was able to use the same code posted in my comment to get the PHP array which I then imported to MySQL.