Forum Discussion
Connect to Confluence (Atlassian)
japolo - Can I check that you are getting a result when you run it for the API?
"wiki/rest/api/user/current"Do you know that you can preview each of the "Applied Steps" in Power Query. What you can do is switch between the each step in the below to see when the error occurs.
Actually meant this:
let
#"Base URL" = "https://your-domain.atlassian.net/",
#"Relative Path" = "wiki/rest/api/user/current",
#"Get Contents" =
Web.Contents(#"Base URL",
[
RelativePath=#"Relative Path",
Headers=[Accept="application/json"] //delete this row
]
),
#"View Content Text" = Text.FromBinary(#"Get Contents"),
#"Web Page" = Web.Page(#"Get Contents")
in
#"Web Page" I think you need to stop using the Json.Document step.
Hi,
Yes, i've tested the different steps. The base URL and Relative Path returns what has already been added after the "=" symbol.
Testing the Get Content Step returns the base URL with the web symbol:
The View Content step returns the HTML code:
The Web page step prompts me to sign in with credentials. I use my e-mail and the created token in atlassian but it tells me the credentials are invalid so I guess the problem starts here. I've tried the "normal" name I have there as well and all kinds of other usernames and passwords as well but none works. Should it not be the username/e-mail with the created token? And i'm using the Basic one.
And the last step prompts that an error reason could be invalid credentials.
- Anonymous3 years agoNot applicable
Sorry japolo - I get the same error when trying to read an HTML page from Confluence. So, it looks like there is no access to read the Web.Page Contents when in HTML format. I can see the Binary Text in #"View Content Text" step, but this does not correlate to the objects on the screen because many of these are Java Scriyt(?) objects.
I think Confluence wants you extract the data via the REST API call only. I don't know what syntax you need to extract the page you are calling. Could you please post your question on the Altassian Developer forum (The Atlassian Developer Community). Hopefully, someone can then explain how to translate the Web URL into the Get Content API.
- japolo3 years agoFrequent Visitor
Hi Anonymous
I'll give that a try, thank for trying things and helping out, much appreciated!