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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Robbe
Regular Visitor

Web.Contents Call, not working

Hi all,

 

I'm trying to do an API call that should send the following Call : 

https://<<BASE-URL>>/rest/insight/1.0/iql/objects?objectSchemaId=3&iql=objectId=3

As documented here: Solved: Insight Rest API to query custom attributes (atlassian.com) 

 

I currently have the following : 

let
    FetchPage = (url as text, pageSize as number, skipRows as number) as table =>
    let

        contents = Web.Contents(URL&"/rest/insight/1.0/iql/",[
            RelativePath  = "objects" ,
            Query = [
                        objectSchemaId = "3" , 
                        iql = objectId = "7249" , 
                        maxResults= Text.From(pageSize), 
                        startAt = Text.From(skipRows)]]),

        json = Json.Document(contents),
        Value = json[issues],
        table = Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
    in
        table meta [skipRows = skipRows + pageSize, total = 500]
in
    FetchPage

 

The main issue I think is the fact that the line  "iql = objectId = "7249" has a double "=". 
Any Idea how I should fix my Call ? 

 

Robbe

5 REPLIES 5
ImkeF
Community Champion
Community Champion

Hi @Robbe ,
how did you write it?:
so: "iql=[objectId=7249]"

or so: "iql=[objectId=""7249""]"

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Robbe
Regular Visitor

Hi, 
As soon as I put the "=" between quotations it switches the "=" to "%5B"

Robbe_0-1666343316391.png

 

The other suggestions you gave : 

Robbe_1-1666343474926.png

 

Resulted still into this: 
Are you sure the nested Queries work ? 

Robbe_2-1666343505980.png

 

Robbe

 

Robbe
Regular Visitor

@ImkeF , 
Also when trying to add it hardcoded, it auto converts the "=". 

Robbe_0-1666307727080.png

how do I get this trough ? 

 

Robbe

 

Robbe
Regular Visitor

Hi @ImkeF , 

Thank you for your reply! 
I indeed tried that aswell, but I got the following error :

Robbe_0-1666255563694.png

 

let
    FetchPage = (url as text, pageSize as number, skipRows as number) as table =>
    let

        contents = Web.Contents(URL&"/rest/insight/1.0/iql/",[
            RelativePath  = "objects" ,
            Query = [
                        objectSchemaId = "3" , 
                        iql = [objectId = "7249"],
                        maxResults= Text.From(pageSize), 
                        startAt = Text.From(skipRows)]]),

        json = Json.Document(contents),
        Value = json[issues],
        table = Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
    in
        table meta [skipRows = skipRows + pageSize, total = 500]
in
    FetchPage

 

 

Any ideas? 

 

Robbe

ImkeF
Community Champion
Community Champion

Hi @Robbe ,
if a nested record is required here, you could try the following:

 iql = [objectId = "7249"] , 

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.