cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AhmadAbbadi Frequent Visitor
Frequent Visitor

Cant Refresh Data Using Gateway from REST API / Jira

All went well to get the data from Jira REST API but couldnet connect to gateway to refresh data !!!

Error Message below

 

You can't schedule refresh for this dataset because the following data sources currently don't support refresh:

  • Data source for Query1111.jpg

Thanks

 

3 REPLIES 3
Moderator v-yuezhe-msft
Moderator

Re: Cant Refresh Data Using Gateway from REST API / Jira

@AhmadAbbadi,

Do you use parameter to get JIRA data in Power BI Desktop? Could you please share the M code in Advanced Editor of your query in Power BI Desktop?

When you use source parameter to get data dynamically in Power BI Desktop, it is not supported to refresh the dataset in Power BI Service, you would need to make changes to the M code as described in this similar blog: http://blog.datainspirations.com/2018/02/17/dynamic-web-contents-and-power-bi-refresh-errors/.

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AhmadAbbadi Frequent Visitor
Frequent Visitor

Re: Cant Refresh Data Using Gateway from REST API / Jira

Thanks in advanced. the code below: let Source = Json.Document(Web.Contents("https://XXX.atlassian.net/rest/api/2/search")), #"Converted to Table" = Record.ToTable(Source), #"Transposed Table" = Table.Transpose(#"Converted to Table"), #"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table", [PromoteAllScalars=true]), #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"expand", type text}, {"startAt", Int64.Type}, {"maxResults", Int64.Type}, {"total", Int64.Type}, {"issues", type any}}), #"Removed Other Columns" = Table.SelectColumns(#"Changed Type",{"total"}), #"total" = #"Removed Other Columns"{0}[total], #"startAt List" = List.Generate(()=>0, each _ < #"total", each _ +100), #"Converted to Table1" = Table.FromList(#"startAt List", Splitter.SplitByNothing(), null, null, ExtraValues.Error), #"Renamed Columns" = Table.RenameColumns(#"Converted to Table1",{{"Column1", "startAt"}}), #"Added Custom" = Table.AddColumn(#"Renamed Columns", "URL", each "https://XXX.atlassian.net/rest/api/2/search?maxResults=100&startAt=" & Text.From([startAt])), data = List.Transform(#"Added Custom"[URL], each Json.Document(Web.Contents(_))), #"Converted to Table2" = Table.FromList(data, Splitter.SplitByNothing(), null, null, ExtraValues.Error), #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table2", "Column1", {"expand", "startAt", "maxResults", "total", "issues"}, {"Column1.expand", "Column1.startAt", "Column1.maxResults", "Column1.total", "Column1.issues"}), #"Expanded Column1.issues" = Table.ExpandListColumn(#"Expanded Column1", "Column1.issues"), #"Expanded Column1.issues1" = Table.ExpandRecordColumn(#"Expanded Column1.issues", "Column1.issues", {"expand", "id", "self", "key", "fields"}, {"Column1.issues.expand", "Column1.issues.id", "Column1.issues.self", "Column1.issues.key", "Column1.issues.fields"}), #"Expanded Column1.issues.fields" = Table.ExpandRecordColumn(#"Expanded Column1.issues1", "Column1.issues.fields", in #"Renamed Columns1"
AhmadAbbadi Frequent Visitor
Frequent Visitor

Re: Cant Refresh Data Using Gateway from REST API / Jira

I didnt get how to user that code in my query to be honest !!!