Power BI API Pagination - Missing Link headers

Jump to solution
gancw
Community Member

I am new to Canvas and trying to report the course enrollment in Power BI
Using the code below I managed to retrieve the first 10 records. The pagination is not working

 

canvas.png

I did some debugging and noticed the header returned from this code

headersResponse = Value.Metadata(response)[Headers],

does not have the Link header

canvas2.png

Does anyone know why the link header is missing ?


Labels (1)
0 Likes
1 Solution
James
Community Champion

@gancw 

I don't know much about Power BI, but this isn't really a question about Canvas as much as a question about Power BI. Because of that, I searched the web for your issue (not including Canvas in the search terms) and found people who had the same problem and the solutions that were given to them.

I found Retrieving headers from API response using Value.Metadata that describes the same issue you're having, including the headers. It linked to a solution at Retrieve API response headers that quoted another site that says Power Query, by design, does not allow you to see the response headers of your requests.

They offer suggestions such as creating a custom connector or using WebMethod.head() or Odata.Feed(). If those don't work, then Python or R scripts were suggested.

View solution in original post