Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello!
I have been going through the various documentations and links already provided i nthe various other posts about this topic, mainly this one: Chris Webb's BI Blog: Working with Web Services in Power Query Chris Webb's BI Blog (crossjoin.co.uk...
I keep getting an error message to which I do not have the knowledge to solve myself. I still new to Power BI.
When I make a custom query in the PQE with this format:
= Web.Contents("https://www.devstack.vwgroup.com/jira/secure/BOARDNAMEHERE",
[Query=[ #"filter"="", #"orderBy"=""],
ApiKeyName=[#"APIToken" ="APIKEYHERE"] ])
I get the following error:
The token is made of numbers and text.
How can I solve this?
Solved! Go to Solution.
Hi @Anonymous - I start by creating an API token following these instuctions: Manage API tokens for your Atlassian account | Atlassian Support. When it comes to using the Token, there are two options for extracting JIRA data:
let
Source =
Csv.Document(
Web.Contents("https://######.atlassian.net/sr/jira.issueviews:searchrequest-csv-all-fields/{id####}/SearchRequest-{id####}.csv"),
[Delimiter=",", Encoding=65001, QuoteStyle=QuoteStyle.Csv]
),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true])
in
#"Promoted Headers"
Note this example would store a data source connection for the fully specified csv file url. You can make this relative path.
This provide a big flat csv table with single row for each issue. While this is good, it is not great for columns with multiple values. If you have 3 watchers for example, there will be 3 columns (watcher, watcher2, watcher3).
This is an example for the API call.
let
#"JIRA Rest API URL Path" = "https://######.atlassian.net/rest/api/3/",
#"Relative Path" = "/project/search",
#"Max Results Per API Call" = 50,
#"Initial API Call" = Web.Contents(
#"JIRA Rest API URL Path",
[
RelativePath=#"Relative Path",
Headers=[Accept="application/json"],
Query=[startAt="0"]
]
),
#"Open Initial API Call" = Json.Document(#"Initial API Call"),
#"Get Total Items" = #"Open Initial API Call"[total],
#"Number of API Calls" = Number.IntegerDivide(#"Get Total Items", #"Max Results Per API Call") + 1,
#"Run API Calls" =
let
#"Start At List" = List.Generate(() => 0, each _ < #"Number of API Calls" * 50 , each _ + 50 ),
#"Call API" = List.Transform( #"Start At List" , each
Web.Contents(
#"JIRA Rest API URL Path",
[
RelativePath=#"Relative Path",
Headers=[Accept="application/json"],
Query=[startAt=Text.From(_)]
])
),
#"Open Json" = List.Transform( #"Call API" , each Json.Document(_) ),
#"Get values" = List.Transform( #"Open Json" , each _[values] ),
#"Get Lists" = List.Combine(#"Get values"),
#"Converted to Table" = Table.FromList(#"Get Lists", Splitter.SplitByNothing(), type table[Records to Expand=Record.Type], null, ExtraValues.Error)
in
#"Converted to Table",
To use this call the following data source credentials are required for "https://######.atlassian.net/rest/api/3/"
Hi @Anonymous - I start by creating an API token following these instuctions: Manage API tokens for your Atlassian account | Atlassian Support. When it comes to using the Token, there are two options for extracting JIRA data:
let
Source =
Csv.Document(
Web.Contents("https://######.atlassian.net/sr/jira.issueviews:searchrequest-csv-all-fields/{id####}/SearchRequest-{id####}.csv"),
[Delimiter=",", Encoding=65001, QuoteStyle=QuoteStyle.Csv]
),
#"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true])
in
#"Promoted Headers"
Note this example would store a data source connection for the fully specified csv file url. You can make this relative path.
This provide a big flat csv table with single row for each issue. While this is good, it is not great for columns with multiple values. If you have 3 watchers for example, there will be 3 columns (watcher, watcher2, watcher3).
This is an example for the API call.
let
#"JIRA Rest API URL Path" = "https://######.atlassian.net/rest/api/3/",
#"Relative Path" = "/project/search",
#"Max Results Per API Call" = 50,
#"Initial API Call" = Web.Contents(
#"JIRA Rest API URL Path",
[
RelativePath=#"Relative Path",
Headers=[Accept="application/json"],
Query=[startAt="0"]
]
),
#"Open Initial API Call" = Json.Document(#"Initial API Call"),
#"Get Total Items" = #"Open Initial API Call"[total],
#"Number of API Calls" = Number.IntegerDivide(#"Get Total Items", #"Max Results Per API Call") + 1,
#"Run API Calls" =
let
#"Start At List" = List.Generate(() => 0, each _ < #"Number of API Calls" * 50 , each _ + 50 ),
#"Call API" = List.Transform( #"Start At List" , each
Web.Contents(
#"JIRA Rest API URL Path",
[
RelativePath=#"Relative Path",
Headers=[Accept="application/json"],
Query=[startAt=Text.From(_)]
])
),
#"Open Json" = List.Transform( #"Call API" , each Json.Document(_) ),
#"Get values" = List.Transform( #"Open Json" , each _[values] ),
#"Get Lists" = List.Combine(#"Get values"),
#"Converted to Table" = Table.FromList(#"Get Lists", Splitter.SplitByNothing(), type table[Records to Expand=Record.Type], null, ExtraValues.Error)
in
#"Converted to Table",
To use this call the following data source credentials are required for "https://######.atlassian.net/rest/api/3/"
Hi @Anonymous - could you please try the following options:
1. use this code:
= Web.Contents(
"https://www.devstack.vwgroup.com/jira/secure/BOARDNAMEHERE",
[
Query=[ #"filter"="", #"orderBy"=""],
Headers=[#"APIToken" = "APIKEYHERE"]
]
)
2. Remove the API token from the Web.Contents altogether, so that it is included in the Data Source Connection as Web Api.
Out of interest, are you connecting to JIRA? Your url includes JIRA but it does follow the normal convention. I have used something like (https://xxxx.atlassian.com/). When I use "Basic" authentication provide the Username and APIToken provide by JIRA.
Hi @Daryl-Lynch-Bzy,
thanks for the reply.
Unfortunately when I try the above method I still get an Error:
But if you say that you have already achieved to connect to JIRA boards (without the connector from the marketplace) then I am very interested in how you did that!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
26 | |
12 | |
11 | |
11 | |
8 |
User | Count |
---|---|
53 | |
28 | |
16 | |
14 | |
13 |