Forum Discussion
Connecting Jira to Power BI using the Web API
- Anonymous6 years ago
Hi Mike282 ,
It seems like you are trying to stored web connector result in BASEURL parameters. (obviously, it require to stored your rest API link instead of web.contents result)
let BaseUrl = "https://companyname.atlassian.net/rest/api/3/search?jql=project in ('TEST')", JiraIDPerPage = 1000, GetJson = (Url) => let RawData = Web.Contents(Url,[Headers=[Authorization="Basic " & Credentials]]), Json = Json.Document(RawData) in Json, GetJiraIDCount = () => let Url = BaseUrl & "&maxResults=0", Json = GetJson(Url), Count = Json[#"total"] in Count, GetPage = (Index) => let Skip = "&startAt=" & Text.From(Index * JiraIDPerPage), Top = "&maxResults=" & Text.From(JiraIDPerPage), Url = BaseUrl & Skip & Top, Json = GetJson(Url), Value = Json[#"issues"] in Value, JiraIDCount = List.Max({ JiraIDPerPage, GetJiraIDCount() }), PageCount = Number.RoundUp(JiraIDCount / JiraIDPerPage), PageIndices = { 0 .. PageCount - 1 }, Pages = List.Transform(PageIndices, each GetPage(_)), JiraID = List.Union(Pages), Table = Table.FromList(JiraID, Splitter.SplitByNothing(), null, null, ExtraValues.Error), #"Expanded Column1" = Table.ExpandRecordColumn(Table, "Column1", {"id", "key", "fields"}, {"Column1.id", "Column1.key", "Column1.fields"}) in #"Expanded Column1"BTW, you can take a look at following link about getting more than 50 results from Jira rest API:
PowerBI content pack only pulling 50 rows from API
Regards,
Xiaoxin Sheng
Any help on this would be greatly appreciated. I'm unfamiliar with how I'd handle paging with the returned JSON. At the moment I only have 26 issues but I'd definitely go over the 50 issue mark and at that point I need to find a way to get results in the next page.
- antonstorozhuk3 years ago
Helper V
Hi Mike282
Would you consider trying alternative approach? We've built an app for this: Power BI Connector for Jira https://marketplace.atlassian.com/apps/1221150/power-bi-connector-for-jira?hosting=cloud&tab=overview it's available for Jira Cloud / Server / Data Center.
If you're a small team then it's always free for you. Also, you may DM me in case you need any assistance, we will be happy to help.
Best regards,
Anton
- Jeanxyz3 years ago
Power Participant
I tried the paid connector, but the issue is the connector is based on user license, we are a company of 100 users, but for some reason, the Jira cloud license is for 3000 users. As a result, we need to pay for a connector of 3000 users. That becomes very expensive. Or did I miss something about your pricing policy?