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
Holguinmora
Helper I
Helper I

Get Api Data from Web Api Connection

Hi to all

 

I´m new on Power Bi, I just made a connection to a Web API but I have not figure out what to do to get the data.

 

The connection is telling me that the Api has Total Count 117 lines and the LastTimeStamp is 4702396173 (Metadata fields) according to the APi description from the next table:

 

What should be the next steps to be able to get the data from ClienId, TimeStamp, Code, ect...?

 

{
    "MetaCollectionResult":
    {
        "TotalCount":0,
        "LastTimeStamp":0
    },
    "Clients":
    [
        {
            "ClientID":0,
            "TimeStamp":0,
            "Code":null,
            "Name":null,
            "Active":false,
            "Tag":null,
            "Territory":null,
            "RepresentativeCode":null,
            "RepresentativeName":null,
            "StreetAddress":null,
            "ZIP":null,
            "ZIPExt":null,
            "City":null,
            "State":null,
            "Country":null,
            "Email":null,
            "Phone":null,
            "Mobile":null,
            "Website":null,
            "ContactName":null,
            "ContactTitle":null,
            "Note":null,
            "Status":null,
            "PriceLists":
            [
            ],
            "CustomFields":
            [
                {
                    "Field":null,
                    "Value":null
                },
                {
                    "Field":null,
                    "Value":null
                }
            ]
        },
        {
            "ClientID":0,
            "TimeStamp":0,
            "Code":null,
            "Name":null,
            "Active":false,
            "Tag":null,
            "Territory":null,
            "RepresentativeCode":null,
            "RepresentativeName":null,
            "StreetAddress":null,
            "ZIP":null,
            "ZIPExt":null,
            "City":null,
            "State":null,
            "Country":null,
            "Email":null,
            "Phone":null,
            "Mobile":null,
            "Website":null,
            "ContactName":null,
            "ContactTitle":null,
            "Note":null,
            "Status":null,
            "PriceLists":
            [
            ],
            "CustomFields":
            [
                {
                    "Field":null,
                    "Value":null
                },
                {
                    "Field":null,
                    "Value":null
                }
            ]
        }
    ]
}

 

1 ACCEPTED SOLUTION
JasonTX
Resolver I
Resolver I

Go to Power Query and select the correct query. You should see something like this:

 Capture1.PNG

Click List. 

 

 

Capture2.PNG

Then click 'To Table' on the top left. Click 'OK' on the prompted window. You should see this as below

 

Capture3.PNG

 

Click this button circled above. Uncheck the option in the 'Use original column name as prefix' then click OK. You will see several more columns that have this option as well once it is expanded. That is because there is a nested list. Do the same for those columns and make sure to click 'Expand to New Rows'.

 

Hope this helps!

View solution in original post

3 REPLIES 3
JasonTX
Resolver I
Resolver I

Go to Power Query and select the correct query. You should see something like this:

 Capture1.PNG

Click List. 

 

 

Capture2.PNG

Then click 'To Table' on the top left. Click 'OK' on the prompted window. You should see this as below

 

Capture3.PNG

 

Click this button circled above. Uncheck the option in the 'Use original column name as prefix' then click OK. You will see several more columns that have this option as well once it is expanded. That is because there is a nested list. Do the same for those columns and make sure to click 'Expand to New Rows'.

 

Hope this helps!

Hello

 

I’m trying to get datas from a web service, but without success.

The procedure I am following is:

 

 

The API documentation shows the following PHP

 

<?php

    $curl = curl_init();

    curl_setopt_array($curl, array(

        CURLOPT_URL => "https://{api_address}/v2/extratos/:id",

        CURLOPT_RETURNTRANSFER => true,

        CURLOPT_ENCODING => "",

        CURLOPT_MAXREDIRS => 10,

        CURLOPT_TIMEOUT => 30,

        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,

        CURLOPT_CUSTOMREQUEST => "GET",

        CURLOPT_HTTPHEADER => array(

            "Access-Token: SEU (Access-Token) DE ACESSO ",

            "Secret-Access-Token: SEU (Secret-Access-Token) DE ACESSO",

            "Content-Type: application/json"

        ),

    ));

 

    $response = curl_exec($curl);

    $erro = curl_error($curl);

?>

 

Does anyone can help me?

It worked perfectly!!!!!

 

Thank you very much!!!!!

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.

Top Solution Authors
Top Kudoed Authors