Background:
Attempting to use Automation action "Send web request". I am trying to modify https://confluence.atlassian.com/jirakb/how-to-create-and-link-remote-jira-issues-using-automation-1085209850.html to meet my needs. In that KB article, remote issue links are created
I created a Basic auth token in Jira Service Management (free cloud tier).
For a test, I attempted to call api GET /rest/api/3/issue/{issueIdOrKey}/remotelink
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-remote-links/#api-rest-api-3-issue-issueidorkey-remotelink-get
I added Authorization header with my email/token BASE64 encoded. The response is a 400 error. I can call that api using curl and the same header just fine.
I am testing using the "Validate your web request configuration" option on the "Send web request" page.
The 400 error only says "Bad Request".
Other api calls such as GET /rest/api/3/issue/{issueIdOrKey} do work fine.
Question:
Is this a limitation of the free tier of Jira Service Management? Not being to access GET /rest/api/3/issue/{issueIdOrKey}/remotelink api? Or something else?
That means you're sending something the server understands but rejects. What you can do is output the error message for a better understanding of the 400 errors.
I am just trying a GET request so there is no body being sent. The GET request url (and Authorization header) from the "Send web request" page in Jira Service Management were copied and run successfully from command line using curl.
The response payload from the Jira "Send web request page" "Validate your web configuration" run is an html page. Script tags removed, the html returned is:
<div class="aui-page-panel">
<div class="aui-page-panel-inner">
<section class="aui-page-panel-content">
<header class="aui-page-header">
<div class="aui-page-header-inner">
<div class="aui-page-header-main"><h1>Bad Request (400)</h1></div><!-- .aui-page-header-main -->
</div><!-- .aui-page-header-inner --></header><!-- .aui-page-header -->
<div class="aui-message aui-message-warning warning"><p>Encountered a <code>"400 - Bad
Request"</code> error while loading this page.</p>
<p>null</p>
<p><a href="/secure/MyJiraHome.jspa">Go to Jira home</a></p></div>
</section><!-- .aui-page-panel-content --> </div><!-- .aui-page-panel-inner --></div><!-- .aui-page-panel -->
</body>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you add the headers as
Authorization Basic Base64encodedString
OR
Authorization Bearer Base64encodedString
However, you say this works for GET issues. Which seems weird, if such errors are there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tried it and it works for me using automation, I get a 200 response. This is where you retrace your steps and revalidate your entire rules from scratch on the API. You also might want to try the remote link endpoint via curl and if it works via curl then most probably, it's not because it's a free tier.
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.