My company is in the process of an M&A and I am trying to access the acquired company's Confluence instance through the API. I have access to the site, in fact, I am the site administrator...
I can do all the stuff not working below on the parent company site.
And I can plug a API query using the merged company's Atlassian URL into the browser and get results...
https://xxxxxxxxx.atlassian.net/wiki/rest/api/space returns all the site spaces.
I made a token specifically for queries from the merged company, set it to base64encoded using my email:token format and pass it in the header as Authorization: Basic 64encoded-string
If I try to access using cURL or Python I get the same 'no soup for you' error:
{
"message": "Current user not permitted to use Confluence",
"statusCode": 403
}
My cURL code:
curl -D \
-X GET \
-H "Authorization: Basic a3RjQGthcmdvLmNvbTpldVFvbXhwd3RtaGpxxxxxxxxxxxxxx \
-H "Content-Type: application/json" \
"https://xxxxxxxx.atlassian.net/wiki/rest/api/space"| jq '.' -S
With Python I am using the Atlassian module. So initialize a Confluence class instance:
commConfluence = Confluence(
url='https://xxxxxxxx.atlassian.net',
username="ssuranie@kargo.com",
password="a3RjQGthcmdvLmNvbTpldVFvbXhwd3RtaGpBUUh1UW10VDVBNjQ=",
cloud=True)
and then I call it like:
dictPage = commConfluence.get_page_by_id(strId, expand="body.storage", status=None, version=None)
Again, I can get this to work on the parent company Atlassian address but not the merged company. Am I missing something here?
Thanks!
Hi @Steve Suranie ,
I am afraid, you forgot to mention about api token process
https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/
Hi Gonchik,
Not sure what you mean, I mentioned I have a token for the other site in my original post:
I made a token specifically for queries from the merged company, set it to base64encoded using my email:token format and pass it in the header as Authorization: Basic 64encoded-string
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.