010-68421378
sales@cogitosoft.com
Your location:Home>News Center >New release

How to Install MySQL on Windows Using MySQL Installer

发布时间:2021/05/04 浏览量:582
Power BI REST API No Code Options

Microsoft’s Power BI REST API no-code option is extremely helpful as it allows calling Power BI REST API without writing a single line of code. Of course, you can call it programmatically using any programming language. Still, testing if Power BI Rest APIs are accepting requests and returning the right data, it is convenient to use the no-code options first. This article will explain how to do that.

Importing Data and Creating Reports

To illustrate the process, we start by importing a dummy dataset into the Power BI service. Then, we create dummy reports using that dataset. Finally, we’ll explore the usage of Power BI REST API No Code Options for accessing the dataset and reports.

 

Once you are there, you should see the following dashboard:

Download the CSV file. As it is defined in the dataset description, it “includes the information on over 9,000 animal bites which occurred near Louisville, Kentucky from 1985 to 2017, and the information on whether the animal was quarantined after the bite occurred and whether that animal was rabid.”

You need to create a Workspace before you can actually import the dataset. For that, click My workspace on the Dashboard.

To import the dataset, click New > Dataset:

Here you can import data from various sources such as services, flat file, databases etc. Since the dataset we want to import is a CSV file, click Get in Files section:

As you can see from the below screenshot, it is possible to import files from various sources. Our CSV file is stored on local drive. Hence, select Local File and browse to the necessary location of that CSV file:

Once you’ve imported the file, you should see it in the dataset list in the workspace. In our case, it is the Health_AnimalBites dataset:

Now we can create reports. Click three vertical dots next to the dataset name – and select Create report from the drop-down menu:

After that, you will get the Power BI reports View window with different types of visualization. In the Fields pane, you will see the columns of your CSV file:

To create a new report, select the visualization type and add column values to display.

Let’s plot a clustered column chart that shows gender count for all the species of animals:

When the report layout is fine for you, click Save and then give a name to that report. We save our report as specie_gender.

The saved report opens automatically.

Our example displays that the number of people bitten by male dogs is almost twice higher than those bitten by female dogs. At the same time, the ratio of people bitten by male and female cats is equal. One may assume that male dogs are more aggressive than female dogs while female and male cats are equally aggressive.

 

Calling Power BI Rest API with No-Code Options

We have set up our dataset and created reports. By default, Power BI provides REST API that you can apply to access datasets and reports using any programming language. However, Microsoft has made it easier. As we mentioned earlier, we can test the API and see if it delivers the desired results, and we won’t need to write a single line of code. If the results of your API call satisfy you, you can then call Power BI REST API programmatically.

Let’s see how we can access the Microsoft services to call Power BI rest API. Use the below link:

You will get to the following page:

You can see various options for making calls to Power BI Rest API.

Let’s try to get information about a specific dataset. To do so, click Datasets -> Get Dataset. On the right side, you will see the explanation on how to get the Dataset information.

To get the dataset via Power BI REST API, you need the dataset ID. You can find it by clicking the dataset name in your workspace in Power BI Service:

The {dataset_id} variable corresponds to your unique dataset ID. Copy and paste that dataset ID. Go back to Microsoft services for Power BI REST API page and paste the dataset ID into the datasetId field:

Click Run.

You will see the JSON response returned by your Power BI Server. It will include the dataset details along with the dataset name, ID, user who configured the dataset, etc.

Now you can see how simple it is to make a Power BI API call without having to write any code.

Let’s see another example – try to get a report. Click Reports > Get Report. In that window, click Try It: 

It will ask you to enter the ID of the report you want to access:

To get the report ID, go to the Power BI dashboard and select the report you want to get via a call to the Power BI Rest API. In our example, we are accessing the specie_gender report. 

 

The {report_id} is the ID of your report.

Enter that value into the reportID field and click Run.

You should see the following JSON response with the report name, the ID of the database containing the report, the web URL of the report, etc.

Conclusions

The Power BI Rest API no-code options are extremely powerful. They do lots of things above providing you with the information about datasets and reports on the Power BI Server. You can also update them at runtime, all without writing a single line of code.

下一篇:UFED Ultimate : 收集证据变得容易多了
上一篇:Wowza Streaming Engine的负载均衡(Load Balancing)概述

© Copyright 2000-2023  COGITO SOFTWARE CO.,LTD. All rights reserved