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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
MyThumbsClick
Helper II
Helper II

using a colon in a Query - Invalid Identifier

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

 

 

1 ACCEPTED SOLUTION

Got there in the end. I was missing query at the start of the filter. Thanks for your help

 

MyThumbsClick_0-1711612412479.png

 

View solution in original post

5 REPLIES 5
lbendlin
Super User
Super User

let
    Source = Json.Document(Web.Contents(FreshserviceBaseURL,
        [RelativePath="Agents",
        Query=[#"department_id": "12456798"]])) 
in 
    Source

Thanks. This is what im getting:

 

MyThumbsClick_0-1711579724306.png

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

 

MyThumbsClick_0-1711612412479.png

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.