Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.
×I have created a Jira PAT, and am able to use it successfully in Postman to get the results of a search filter. However, when I transfer this same GET to HTTP (for use in Microsoft Flow), I get this returned in the body and nothing else:
<html>
<head><title>302 Found</title></head>
<body>
<center><h1>302 Found</h1></center>
</body>
</html>
I'm not super familiar with PATs or HTTP GETs, but my Googling tells me there's some kind of authentication step I'm missing. I'm passing the PAT as a bearer token in the header as "Authorization" but nothing else. Can anyone help me figure out what I'm missing or doing wrong? Is it reasonable to expect to be able to do an HTTP GET with PATs?
Thank you all!
Hey there. It sounds like your Jira instance is behind a firewall (you indicated it works over VPN).
So you've probably correctly deduced the issue:
it may not be possible to do this from outside our network via Microsoft Flow/PowerAutomate.
The only workaround would be if your IT/Networking team would be willing to open up the Jira ports to specific IP addresses used by your automations. There's details on this here:
Hi, @Erin Leiker - welcome to the Community!
It's been many years since I've worked in a server/data center environment, so I'm kind of rusty.
I did some quick googling of the Server REST API and how to use PATs, and I'm wondering if it's possible that when you generated your token, you set it to expire? If not, what response do you get if you try following the cURL example in the PAT documentation?
curl -H "Authorization: Bearer <yourToken>" https://{confluenceBaseUrl}/rest/api/content
If this is for testing purposes (i.e. not production code) you could also try basic authentication.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi! I did not set the token to expire, no. When I run the cURL you posted nothing is returned, but when I change the URL and run this I get the response I expect (the filter contains one test ticket and I see that ticket's details), same as in Postman:
curl -H "Authorization: Bearer <myToken>" https://{myJiraBaseUrl}/rest/api/2/search?jql=filter={myFilterId}
I suspect it's because our Jira instance uses a separate authentication process. When I'm connected to the company's network Postman (and that cURL) return what I expect, but when I'm disconnected from the VPN I get the same redirect HTML I posted originally. I'm thinking it may not be possible to do this from outside our network via Microsoft Flow/PowerAutomate.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm. That's beyond my experience after so many years. I'll see if I can find another community leader who has experience with this.
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.