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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
jasonyeung87
Helper V
Helper V

Retrieving headers from API response using Value.Metadata

Hi,

I'm currently calling an API from FreshDesk to retrieve a list of tickets. The API only returns max 100 records due to pagination, but it mentions it would have a 'link' header defined in the response that contains the next page link. The info from this API is at https://developers.freshdesk.com/api/#pagination and the relevent info is:

freshdesk pagination header.JPG

I created a function that would access the API and return me the headers. Below is a code snippet from that function:

response = Web.Contents(url),
body = Json.Document(response),
headers = Value.Metadata(response)

 

I invoked the function and initially I got:

Power BI header 1.JPG

 

I clicked on the "Record" link (red arrow) to reveal the headers and I see the following:

Power BI header 2.JPG

 

However I can't find the "link" header that FreshDesk mentioned. I was wondering how do I retrieve this header?

 

Jason

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jasonyeung87 ,

 

There is a similar thread here, and presumably there should still be some limitations.
Solved: Retrieve API response headers

Hope it helps.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @jasonyeung87 ,

 

There is a similar thread here, and presumably there should still be some limitations.
Solved: Retrieve API response headers

Hope it helps.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Hi @Anonymous ,

 

thanks for your help. It looks like I'll create a custom connector for this.

 

I tried using a different method to fetch the records in the pages (e.g. https://www.youtube.com/watch?v=vhr4w5G8bRA). I managed to get this to work in Power BI Desktop but it doesn't allow me to setup data refresh when I published the report to Power BI Service. (Power BI Service doesn't support refresh of this data source).

 

Jason

 

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.