Forum Discussion
MyThumbsClick
2 years agoHelper 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
Got there in the end. I was missing query at the start of the filter. Thanks for your help
5 Replies
- lbendlinSuper User
let Source = Json.Document(Web.Contents(FreshserviceBaseURL, [RelativePath="Agents", Query=[#"department_id": "12456798"]])) in Source- MyThumbsClickHelper II
Thanks. This is what im getting:
- lbendlinSuper User
let Source = Json.Document(Web.Contents(FreshserviceBaseURL, [RelativePath = "Agents", Query = [#"department_id" = "12456798"]])) in Source