I’m trying to run some tests on my backend for a Connect app, but I would like to use Postman for this rather than a bunch of lengthy scripts ran from the server itself.
Any advice? I’ve only been able to find ways to send requests to the Confluence Cloud server, but not vice versa.
I guess it depends on the type of requests from Confluence you are trying to emulate.
If it is just webhooks, the easiest solution might be to trigger the events that cause the webhooks on the cloud instance, e.g create a page using the REST API. To do this you would just need an API Token.
If you want to replicate frontend requests, (e.g. those with a token created by AP.context.getToken), you will need some extra utility to generate a correct JWT token (assuming you have access to the shared secret) for the cloud instance. In this case the JWT could be shared between multiple requests. Since the QSH claim is not based on the url.
If you want to replicate other requests - such as for a macro - you will need to also correctly set the QSH claim of the JWT token - this means you will have to correctly generate a JWT for each request. I guess you could accomplish this with a pre-request script in PostMan.