Forum Discussion
The 'Authorization' header is only supported when connecting anonymously from sonar cloud API
- 3 years ago
HI @Daryl-Lynch-Bzy ,
Its now working. i just removed authorization from power query as token is used for data source connection.
let
Source = Json.Document(Web.Contents("https://sonarcloud.io/api/measures/component?component=imonline_accountmanagement.webapi.reseller&me...")),
#"Converted to Table" = Table.FromRecords({Source}),
#"Expanded component" = Table.ExpandRecordColumn(#"Converted to Table", "component", {"id", "key", "name", "qualifier", "measures"}, {"component.id", "component.key", "component.name", "component.qualifier", "component.measures"}),
#"Expanded component.measures" = Table.ExpandListColumn(#"Expanded component", "component.measures"),
#"Expanded component.measures1" = Table.ExpandRecordColumn(#"Expanded component.measures", "component.measures", {"metric", "value", "bestValue"}, {"component.measures.metric", "component.measures.value", "component.measures.bestValue"}),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded component.measures1",{{"component.id", type text}, {"component.key", type text}, {"component.name", type text}, {"component.qualifier", type text}, {"component.measures.metric", type text}, {"component.measures.value", Int64.Type}, {"component.measures.bestValue", type logical}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"component.id", "component.key", "component.qualifier","component.measures.bestValue"})
in
#"Removed Columns"Thanks
Nihar
HI @Daryl-Lynch-Bzy ,
Its now working. i just removed authorization from power query as token is used for data source connection.
let
Source = Json.Document(Web.Contents("https://sonarcloud.io/api/measures/component?component=imonline_accountmanagement.webapi.reseller&me...")),
#"Converted to Table" = Table.FromRecords({Source}),
#"Expanded component" = Table.ExpandRecordColumn(#"Converted to Table", "component", {"id", "key", "name", "qualifier", "measures"}, {"component.id", "component.key", "component.name", "component.qualifier", "component.measures"}),
#"Expanded component.measures" = Table.ExpandListColumn(#"Expanded component", "component.measures"),
#"Expanded component.measures1" = Table.ExpandRecordColumn(#"Expanded component.measures", "component.measures", {"metric", "value", "bestValue"}, {"component.measures.metric", "component.measures.value", "component.measures.bestValue"}),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded component.measures1",{{"component.id", type text}, {"component.key", type text}, {"component.name", type text}, {"component.qualifier", type text}, {"component.measures.metric", type text}, {"component.measures.value", Int64.Type}, {"component.measures.bestValue", type logical}}),
#"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"component.id", "component.key", "component.qualifier","component.measures.bestValue"})
in
#"Removed Columns"
Thanks
Nihar