Trying to curl the API, getting 302 and 404 errors

Jedediah Gilchrist June 7, 2016

This question is in reference to Atlassian Developer Documentation: JIRA REST API Version 2 Tutorial

TOTALLY new to APIs but long time JIRA admin so bear with me.

 

Following the tutorial, I'm using this command:

 

curl -u USER:PASS http://HOSTNAME/jira/rest/api/2/issue/SE-1000

I know that SE-1000 exists but trying by the above I get

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://HOST/jira/rest/api/2/issue/SE-1000">here</a>.</p>
</body></html>

and when I change the HOST to IP (as suggested on a forum I googled) I get

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL IP/jira/rest/api/2/issue/SE-1000 was not found on this server.</p>
</body></html>

I must be missing something basic. Thanks in advance!

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Jedediah Gilchrist June 7, 2016

nevermind, I figured it out. accessed with https and passed with the -k flag since our local cert is expired on the test server that I was querying.

TAGS
AUG Leaders

Atlassian Community Events