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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
InnaS
Frequent Visitor

Pulling data from the API that serves pages using nextPageToken

Hi, 

I'm trying to pull the data from the newest Jira cloud API (v3) and they produce a json that looks like this:

{

issues: [

1,

2,

3

], 

nextPageToken : "string"

}

 

nextPageToken is nullable, that is it is absent on the last page of the result.

 

I'm having trouble with the function that gets the next page which looks like this:

 

// Function to fetch data using next page token
FetchJiraData = (NextPageToken as nullable text) =>
let
ApiUrl = if NextPageToken = null then
BaseUrl & "jql=project=myproj&maxResults=" & Number.ToText(PageSize)
else
//NextPageToken, // Use nextPage URL
BaseUrl & "jql=project=myproj&maxResults=" & Number.ToText(PageSize) & "nextPageToken=" & NextPageToken, // Use nextPage URL
Source = Json.Document(Web.Contents(ApiUrl, headers)),

Issues = try Source[issues] otherwise {},
NextPageToken = try Source[nextPageToken] otherwise null

in
[Data = Issues, NextToken = NextPageToken]

 

When calling the function, I get

Expression.Error: We cannot convert a value of type Record to type Function.
Details:
Value=[Record]
Type=[Type]

 

Any help will be appreciated!

 

P.S. I did try both ChatGPT and Copilot and neither helped.

 

Thank you!

1 ACCEPTED SOLUTION

Hi @InnaS ,

Thanks for reaching out. For a deeper investigation and a more tailored solution, We suggest raising a support ticket with Microsoft Fabric Support. This way, the team can analyze your situation in detail and provide the best possible guidance.

 

To raise a support ticket for Fabric and Power BI, kindly follow the steps outlined in the following guide: How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn

 

Feel free to let us know if you need any help with the process.

Regards,

Yugandhar.

View solution in original post

4 REPLIES 4
V-yubandi-msft
Community Support
Community Support

Hi @InnaS ,

We are following up once again regarding your query. Could you please confirm if the issue has been resolved through the support ticket with Microsoft?

If the issue has been resolved, we kindly request you to share the resolution or key insights here to help others in the community. If we don’t hear back, we’ll go ahead and close this thread.

Should you need further assistance in the future, we encourage you to reach out via the Microsoft Fabric Community Forum and create a new thread. We’ll be happy to help.

 

Thank you for your understanding and participation.

InnaS
Frequent Visitor

Hi @V-yubandi-msft ,

thank you for trying.

Unfortunately, the answer is irrelevant to the question: I've asked about pulling the data that is served with nextPageToken, not start page and not the number of pages.

Thanks.

Hi @InnaS ,

Thanks for reaching out. For a deeper investigation and a more tailored solution, We suggest raising a support ticket with Microsoft Fabric Support. This way, the team can analyze your situation in detail and provide the best possible guidance.

 

To raise a support ticket for Fabric and Power BI, kindly follow the steps outlined in the following guide: How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn

 

Feel free to let us know if you need any help with the process.

Regards,

Yugandhar.

V-yubandi-msft
Community Support
Community Support

Hi @InnaS ,

 

Thank you for reaching out to the Microsoft Fabric community.

We suggest trying this alternative approach in place of your current function. It has proven effective for some users, but we'd love to hear if it works for your specific case. Please give it a try and let us know if you require any further assistance.

 

 

Vyubandimsft_0-1739188707419.png

 

If my response solved your query, please mark it as the Accepted solution to help others find it easily!

And if my answer was helpful, I'd really appreciate a 'Kudos'.

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors