Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Feature change during CHANGE-2046

Dheeraj S Gaddi September 5, 2025

We pull data from Jira to PowerBI using rest API Search functionality with below API call 

We used https://**Our*Company**.atlassian.net/rest/api/latest/search?jql=project%20in%20(**Our*Project)&fields=(Fields*) to get below details for pagenation.

"expand": "schema,names",
"startAt": 0,
"maxResults": 100,
"total": 5081,

But recently Jira has migrated to below link

https://**Our*Company**.atlassian.net/rest/api/latest/search/jql?jql=project%20in%20(**Our*Project)&fields=(Fields*)

Which is not fetching any of header details(MaxResult or total) hence we are not able to pull data into PowerBI. Can you suggest how we can get header details with search rest API functionality ?

1 answer

1 accepted

1 vote
Answer accepted
Matteo Vecchiato
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 5, 2025

Hi @Dheeraj S Gaddi

Welcome to Atlassian community and thank you for your question.

Try with the new parameters is last and nextpageToken, as indicated in the API doc: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-search/#api-rest-api-3-search-jql-get 

The new API for Jql searchabia not performing very well, we hope it will be improved.

Regards 

Dheeraj S Gaddi September 10, 2025

@Matteo Vecchiato Thank you Very much.

I was able to use "Is Last" and "Next page Token" to create pagination, it was bit of work but jql works fine. 

Richard Cieslik September 16, 2025

Could you share the syntax you used? I am in the same boat, and can't get pagination to work,

Thanks! 

Dheeraj S Gaddi September 26, 2025

let
BaseUrl = "https://Company.com/rest/api/3/search/jql",
JQL = "project = *Project_Name* ORDER BY created DESC",
MaxResults = 100,
AuthHeader = "Basic " & Binary.ToText(Text.ToBinary("Email:API Token"), BinaryEncoding.Base64),

// Function to fetch one page
GetPage = (nextPageToken as nullable text) as record =>
let
QueryParams =
if nextPageToken = null then
[
jql = JQL,
maxResults = Text.From(MaxResults),
fields = "Fields_Required"
]
else
[
jql = JQL,
maxResults = Text.From(MaxResults),
nextPageToken = nextPageToken,
fields = "Fields_Required"
],

Source = Json.Document(
Web.Contents(
BaseUrl,
[
Headers = [
Authorization = AuthHeader,
Accept = "application/json"
],
Query = QueryParams
]
)
),
Issues = try Source[issues] otherwise {},
Token = if Record.HasFields(Source, "nextPageToken") then Source[nextPageToken] else null,
Result = [Issues=Issues, NextToken=Token]
in
Result,

// Loop through ALL pages safely
AllPages = List.Generate(
() => GetPage(null),
each _ <> null,
each if _[NextToken] <> null then GetPage(_[NextToken]) else null,
each _[Issues]
),

Combined = List.Combine(AllPages),

// Always create a table with predictable column name
IssuesTable = if List.Count(Combined) > 0
then Table.FromList(Combined, Splitter.SplitByNothing(), {"Issue"}, null, ExtraValues.Error)
else #table({"Issue"}, {}),

Expanded = Table.ExpandRecordColumn(IssuesTable, "Issue", {"id", "key", "fields"}, {"id","key","fields"}),

// Expand your requested fields
Final = Table.ExpandRecordColumn(
Expanded,
"fields",
{"Fields_Required"},
{"Fields_Required"}
)
in
Final

Dheeraj S Gaddi September 26, 2025

Change Bold letter to your requirement and set authentication in data source to anonymous 

Sorry for delayed response

Richard Cieslik September 28, 2025

Appreciated!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events