Skip to main content

Need help in Query

  • May 27, 2024
  • 4 replies
  • 168 views

Hi all
I’m seeking assistance with updating a PowerBI query that integrates with the Monday.com API. , I need to update it to ensure it works with the latest API standards without changing the structure of the output, as all my PowerBI reports depend on it.

Here is the query that worked previously:

Content=Text.ToDate(“{”“query”“: “”{ boards (ids: 3796729499) { items { id name column_values { title text } parent_item {id} } } }”“}”)

Source = Web.Contents(“https://api.monday.com/” & “v2”,
[
Headers=[
#“Method”=“POST”,
#“Content-Type”=“application/json”,
#“Authorization”=“”
],
Content=Text.ToBinary(“{”“query”“: “”{ boards (ids: “”) { items { id name column_values { title text } } } }”“}”)
]
),
#“JSON” = Json.Document(Source,65001),
data = JSON[data],
boards = data[boards],
boards1 = boards{0},
items = boards1[items],

and

Content=Text.ToDate(“{”“query”“: “”{ boards (ids: 3796729499) { items { id name column_values { title text } parent_item {id} } } }”“}”)

Thank you so much

4 replies

Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • May 28, 2024

Hello there @suriyapong,

I do not have experience with Power BI, but on monday’s API’s end, you need to switch from using a boards → items structure, to a boards → items_page → items structure as explained here!

I hope that helps 😀

Cheers,
Matias


  • Author
  • New Participant
  • May 28, 2024

Hi @Matias.Monday

I changed it and it works in playground but when I change in powerBi. it’s not working

another question, Because I can’t remember what is the structure of data in 2023-07 but If I change regarding to the new version, the structure will be the same or not ?

thanks


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • May 28, 2024

Hello again @suriyapong,

The structure of the response changes because you are nesting a new object in between objects.

Would you be able to please fill this form (https://support.monday.com/hc/en-us/requests/new?ticket_form_id=13855862562962) adding as much information as possible to it so we can share this with someone in our team who has some experience with Power BI?


rachelatmonday
Forum|alt.badge.img
  • monday.com Team Member
  • July 23, 2024

Just FYI - this post doesn’t seem like a feature request, so I am updating the category so it gets in the right queue 😃