Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi
I have a query setup to a json API source and i want to filter the query by department ID. the API developer reference states the format as /api/v2/agents?query=department_id:123456 which works testing in a web browser. However the below Advanced Editor code fails with an invalid identifier. If i switch the : to a =, the query syntax is happy but fails to get contents because the API needs a :
Do you have any suggestions on how i can get around this?
let
Source = Json.Document(Web.Contents(FreshserviceBaseURL,
[RelativePath="/Agents?",
Query=[department_id: "12456798"]]))
in
Source
Solved! Go to Solution.
Got there in the end. I was missing query at the start of the filter. Thanks for your help
let
Source = Json.Document(Web.Contents(FreshserviceBaseURL,
[RelativePath="Agents",
Query=[#"department_id": "12456798"]]))
in
Source
Thanks. This is what im getting:
let
Source = Json.Document(Web.Contents(FreshserviceBaseURL,
[RelativePath = "Agents",
Query = [#"department_id" = "12456798"]]))
in
Source
Thanks. This passes sytnax verification but fails on the Get Web contents as the = needs to be a :
Its like i need to escape the : or something
Got there in the end. I was missing query at the start of the filter. Thanks for your help
Check out the July 2025 Power BI update to learn about new features.