Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi All,
I am really stuck here at the moment and just need a pointer or hint or something to know where to look. I am calling an API from Canvas to get accounts, courses and enrollments. Accounts and courses is fine as I can loop through use the page=x parameter. However Enrollments changes that. The link to the next page is in the header under something called Link and uses something called a bookmark. I can not for the life of me work out how to make this work as I cant seem to see the 'link' anywhere in Power Query.
So this is a link to the API documentation. The one I am looking at is List Enrollments
Canvas LMS REST API Documentation (instructure.com)
If I call this in Postman I can see this (I have cut out most of the data for obvious reasons)
So I got this to try to see the header data
= (CourseID as text) =>
let
Source = Value.Metadata(Web.Contents(pURL&"/api/v1/courses/"&CourseID&"/enrollments?access_token="&pAccessToken))
in
Source
Which gives me this
and then if I expand the Headers record I get this. Nothing in here that shows the bokmark or the Link field
Any help would be greatly appreciated please.
You asked for Value.MetaData - that will not give you the payload of the request which has the data and pagination information.
Note that your approach will not work for scheduled refresh. Read about RelativePath.
I have looked into Relative path and I am fixing that thank you. Still haven't worked out how to get the header yet though with the link to the next bookmark.
Use Web.Contents directly. That should give you the header data and the payload.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
9 | |
6 | |
6 | |
6 | |
6 |
User | Count |
---|---|
9 | |
9 | |
8 | |
6 | |
6 |