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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
niculeica
Helper I
Helper I

Connect through REST API - authorization token

Hi! Has the token authorization been deprecated by any chance? Selecting From Web as data source -> Advanced, down in HTTP request header parameters I cannot see Authorization as dropdown option anymore.

 

niculeica_0-1732264989926.png

 

4 REPLIES 4
danextian
Super User
Super User

hi @niculeica 

I normally don't use that when connecting to an API. Assuming the result of an API request is a JSON file, try this:

let
    // Define the API base URL
    BaseUrl = "https://api.example.com/v1/data",
    
    // Define the Bearer token
    BearerToken = "your_bearer_token_here",
    
    // Set up the headers
    _Headers = [
        Authorization = "Bearer " & BearerToken,
        Accept = "application/json"
    ],
    
    // Make the API request
    Source = Web.Contents(
        BaseUrl,
        [
            Headers = _Headers 
        ]
    ),
    
    // Parse the response as JSON
    JsonResult = Json.Document(Source)
in
    JsonResult




Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi, @danextian,

 

Thank you for the swift reply here! I'm really novice with this connection type. I get what I would need to replace in the code you provided (I assume the code will be entered in a Blank Query, then chose JSON as option in Get data tab), but don't really have experience with JSON files.

 

I believe the JSON file's structure would be the one below, but do I need to declare each field's type or how do you go about creating the file itself?

 

[{
    "approved": false,
    "approvedBy": "",
    "category": 0,
    "comment": "",
    "date": "2021-04-13T03:14:00.000+03:00",
    "issueId": 12637,
    "issueKey": "BT-11",
    "projectKey": "BT",
    "timeSpent": 7200,
    "username": "557058:009e0ad2-70b5-4b95-862c-12355112323",
    "worklogId": 11649
}

 

@niculeica Can you ping me the API you are using here ? So, that I can see whether it is using Get or POST Request. Even the link to the documentation would suffice. Thanks 

 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hi, @Jai-Rathinavel,

 

This is the documentation link:  https://help.activitytimeline.com/at/rest-api#RESTAPI-SampleJava/C#codeofATRESTAPIusage

 

I was gonna go for Worklogs section, GET /rest/api/1/worklog/list?auth_token=YOUR_AUTH_TOKEN

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.