Hello,
We have an external site on an external server that we would like to make calls to the Confluence-Cloud REST Api to return JSON data. Can I call our confluence cloud api's via Ajax from our external site? If so, how can I do this?
I have tried multiple ways but I either get CORS errors or possible authentication errors. All I want is to authenticate via anonymous user and (GET) read-only data back. How do I format this Ajax call?
Thanks,
Mike
You can, but you external site would need to do this using JWT https://developer.atlassian.com/static/connect/docs/latest/concepts/authentication.html
For client-side apps running in the browser, the all.js script creates the bridge to between your Confluence Cloud instance and your add-on. It won't work outside of Confluence.
Hey James, could you elaborate on this a bit? Once we have a JWT, how do we utilize that so that our site can pull data? We're missing the steps on what we need to configure within Confluence itself (cloud version) so that the link is made. We've circled through dozens of pages of their documentation, but none of it ties together coherently how to actually do this from A - Z. Thanks for any assistance you can provide!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to install a private add-on into Confluence Cloud, just as you would install a 3rd party add-on from the Atlassian Marketplace, but that's the easy bit - based on your description, it would just be an add-on descriptor.
When you install the add-on, it triggers an installation handshake that generates the shared secret. That shared secret needs to be stored so you can create a unique JWT token for each API call.
How you create that JWT token for the API call will depend on what programming language you are using on your server. E.g. this is a toolkit provided by Atlassian for Node.js https://bitbucket.org/atlassian/atlassian-connect-express that has functions to deal with JWT so you don't need to write them from scratch.
This is all covered in the Atlassian Connect documentation https://developer.atlassian.com/static/connect/docs/latest/index.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, James. I think it's that initial step of creating an add-on that's been eluding us. I guess we were thinking we're not really building an add-on, just trying to read data out.
We'll plug away with this extra clarity and see what progress we can make.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No problem. Confluence Cloud's security model does make it more difficult, but the upside is that its more secure
BTW you might like to join this mailing list https://groups.google.com/forum/#!forum/atlassian-connect-dev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.