Forum Discussion
Mike282
6 years agoHelper III
Connecting Jira to Power BI using the Web API
Hi all, I've recently been using Jira to manage my workload, utilising user stories, epics and sprints. I've been looking for a method to extract my user story and task data from a specific proje...
- 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
marineded
3 years agoRegular Visitor
I used the script that you gave us.
I created the table for the credentials but I have this error... don't find why !
Could someone knows how to do it?
Thank you