This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreGet Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.
Hello,
Recently, I have been successful in pulling data using API calls with the following script
let
ClientId = "xxxxxxxx",
ClientSecret = "xxxxxxxxxxx",
Uri = "https://xxxxxxxxxxxxx",
dataURL = "https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
body ="{
""grant_type"": ""client_credentials"",
""client_id"": """ & ClientId & """,
""client_secret"": """ & ClientSecret & """
}",
getToken = Json.Document(
Web.Contents(
Uri,
[
RelativePath="xxxxxx/api/v2/oauth/token",
Headers = [#"Content-Type"="application/json"],
Content=Text.ToBinary(body)
]
)
),
token = getToken[token],
AuthHeaders = [Authorization = "Bearer " & token],
Response = Json.Document(Web.Contents(scheduleURL, [Headers = AuthHeaders])),
#"Converted to Table" = Table.FromList(Response, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"schedule_id", "name", "is_archived", "order", "positions"}, {"Column1.schedule_id", "Column1.name", "Column1.is_archived", "Column1.order", "Column1.positions"}),
#"Expanded Column1.positions" = Table.ExpandListColumn(#"Expanded Column1", "Column1.positions"),
#"Expanded Column1.positions1" = Table.ExpandRecordColumn(#"Expanded Column1.positions", "Column1.positions", {"position_id", "position_qualification_id", "label", "order"}, {"Column1.positions.position_id", "Column1.positions.position_qualification_id", "Column1.positions.label", "Column1.positions.order"}),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded Column1.positions1",{{"Column1.schedule_id", Int64.Type}, {"Column1.name", type text}, {"Column1.is_archived", type logical}, {"Column1.order", Int64.Type}, {"Column1.positions.position_id", Int64.Type}, {"Column1.positions.position_qualification_id", Int64.Type}, {"Column1.positions.label", type text}, {"Column1.positions.order", Int64.Type}})
in
#"Changed Type"
It works. However, now I try to call different API (different table) with multiple date parameters required (startDate and endDate). Can someone help me with that? I really appreciate it. Thanks in advance
Follow the documentation of the API you are querying?
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |