Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
xuandungpy
Frequent Visitor

Create report realtime from api link with post method and json paramater

How to retrieve the following data to generate the PowerBI report real-time in 10 second from the api link with post method (http: //daviddung.com:3006/xdapi/Solieugiaoban) with the json string variable:
{
 "Value": {
  "IDLoaiVP": {
   "xq": 33,
   "sa": 36,
   "sat": 75,
   "ct": 63,
   "mri": 47,
   "dsa": 51,
   "ecg":35,
   "lx":32,
   "ns":34
  },
  "ListMaKP": "",
  "ListCDCS": "2",
  "Ngay": "14/04/2017"
 },
 "Key": "6MVB2P/hb7AzsTw7npN1jJ02BcIrR4a8kZpTCm4XeaBUjPxzkka+JAY58Spb0LveE6Z1EbdwZZ5b3H++AMRQHn"
}

IDLoaiVP, ListMaKP, ListCDCS, Right variables: will be changed to get dynamic data.

The returned json data is as follows:
{
  "Value": [
    {
      "MaKP": "039",
      "TenKP": "NTH1",
      "Khambenh": 100,
      "Benhcu": 0,
      "Nhapvien": 0,
      "CSCI": 0,
      "Chuyenkhoa": 0,
      "Chuyenvien": 0,
      "Tuvong": 0,
      "Xuatvien": 0,
      "Hienco": 0,
      "SLVP": {
        "xq": 0,
        "sa": 26,
        "sat": 0,
        "ct": 0,
        "mri": 0,
        "dsa": 0,
        "ecg": 3,
        "lx": 0,
        "ns": 22
      }
    },
    {
      "MaKP": "121",
      "TenKP": "NT3",
      "Khambenh": 28,
      "Benhcu": 0,
      "Nhapvien": 0,
      "CSCI": 0,
      "Chuyenkhoa": 0,
      "Chuyenvien": 0,
      "Tuvong": 0,
      "Xuatvien": 0,
      "Hienco": 0,
      "SLVP": null
    }
  ],
  "ErrorMessage": null
}

2 REPLIES 2
Eric_Zhang
Employee
Employee

@xuandungpy

For real time purpose, you can check Real-time streaming in Power BI.

 

As to how to feed the dataset with your data from your api, you'll have to build the bridge, maybe by using a C# console app calling the post API every 10 seconds and keep pushing data to Power BI.

Hi @Eric_Zhang

 

I have a C # console app that calls API logging every 10 seconds to push data into the dataset in power bi but error: The operation has time out
If I turn off the application and reboot then it works for a short time, then the error again.
How to fix

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.