Power BI Exchange

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.
 View Only
  • 1.  Web API Call with Header

    Posted May 31, 2019 09:10 AM
    I am trying to connect Power BI to NOAA data - https://www.ncdc.noaa.gov/cdo-web/webservices/v2#gettingStarted

    I want to get a list of available locations for example: https://www.ncdc.noaa.gov/cdo-web/api/v2/locations

    I have requested a token and the instructions reference that the token has to be in the header, but I cannot figure out the proper way to get the header into the HTTP request header parameters.

    Any advice that can be provided is appreciated!

    Christy Miller

  • 2.  RE: Web API Call with Header

    Silver Contributor
    Posted Jun 03, 2019 06:33 AM
    Christy -- Insert your token value within the token step below:

        token = "<your token here>",
        endpoint = "locations",
        baseUrl = "https://www.ncdc.noaa.gov/cdo-web/api/v2/",
        url = Text.Combine({baseUrl,endpoint}),
        limit = 1000, // Defaults to 25, maximum is 1000.
        request = Web.Contents(
                Headers = [
                    token = token
                Query = [
                    limit = Text.From(limit)
        requestData = Json.Document(request),
        metadata = requestData[metadata],
        results = requestData[results],
        #"Converted to Table" = Table.FromRecords(results)
        #"Converted to Table"


    Tony McGovern
    co-Founder & Data Scientist
    Emdata Inc.

  • 3.  RE: Web API Call with Header

    Posted Jun 11, 2019 09:01 AM
    Is this something that you are putting in DAX as a table?

    Christy Miller

  • 4.  RE: Web API Call with Header

    Bronze Contributor
    Posted Jun 12, 2019 04:28 AM
    To get a full understanding of how to work with APIs in PowerQuery, you should watch Chris Webb's video here
    He has also written several excellent posts on his blog on how to work with web services.here and  here.
    Hope this will help.

    Bertrand d'Arbonneau