Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

i am praticing from Jira and Postman trail version..trying to create Issue in Jira from Postman..I s

Jeevan Veedhi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 24, 2022
i am praticing from Jira and Postman trail version..trying to create Issue in Jira from Postman..I send this request POST:http://localhost:8080/rest/auth/1/session and got successful response and 
then i took the ID from the response and used to send 2nd request POST http://localhost:8080/rest/issue
 
then i got 404 error with below Json
 
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>Oops, you&#39;ve found a dead link. - JIRA</title><script type="text/javascript">contextPath = "";</script><link type='text/css' rel='stylesheet' href='/static-assets/metal-all.css' media='all'><script src='/static-assets/jquery-min.js'></script><script src='/static-assets/metal-all.js'></script><meta name="decorator" content="none" /></head><body class=" error-page error404"><script type="text/javascript">document.body.className += " js-enabled";</script><div id="page"><header id="header" role="banner" aria-label="Site"></header><div id="content"><div class="aui-page-panel" ><div class="aui-page-panel-inner"><main role="main" id="main" class="aui-page-panel-content lowerContent" ><div id="error-state"><span class="error-type"></span><h1>Oops, you&#39;ve found a dead link.</h1><ul><li>Go back to the <a href="javascript&colon;window.history.back()">previous page</a></li><li>Go to the <a href="/secure/MyJiraHome.jspa">Home Page</a></li></ul></div></main></div></div></div><footer id="footer" role="contentinfo"><section class="footer-body"><ul class="atlassian-footer">
    <li>
        Atlassian Jira <a class="seo-link" rel="nofollow" href="https://www.atlassian.com/software/jira">Project Management Software</a>
            </li>
    <li>
        <a id="about-link" rel="nofollow" href="/secure/AboutPage.jspa/secure/AboutPage.jspa">About Jira</a>
    </li>
    <li>
        <a id="footer-report-problem-link" rel="nofollow" href="/secure/CreateIssue!default.jspa">Report a problem</a>
    </li>
</ul>
    <p class="atlassian-footer">
        <span class="licensemessagered">
                Powered by a free Atlassian <a rel='nofollow' href='http: //www.atlassian.com/software/jira'>Jira evaluation license</a>. Please consider <a rel='nofollow' href='/plugins/servlet/applications/versions-licenses'>purchasing it</a> today.
 
        </span>
    </p>
<div id="footer-logo"><a href="http://www.atlassian.com/" rel="nofollow">Atlassian</a></div></section></footer></div></body></html>

2 answers

1 vote
Support Team [Clearvision]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 24, 2022

Hi Jeevan

Can you try

api/2/issue

e.g. http://localhost:8080/rest/api/2/issue

and see if that works for you

0 votes
Vishwas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 24, 2022

Hey @Jeevan Veedhi 

From the 404 error it says the endpoint you are specifying is incorrect.

URL should be http://localhost:8080/rest/api/2/issue/ or http://localhost:8080/rest/api/latest/issue/

Please check out this URL to create issue from REST API https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/#creating-an-issue-examples

A Sample example :

Request
curl \
   -D- \
   -u charlie:charlie \
   -X POST \
   --data {see below} \
   -H "Content-Type: application/json" \
   http://localhost:8080/rest/api/2/issue/
Input data
 

{ "fields": { "project": { "key": "TEST" }, "summary": "REST ye merry gentlemen.", "description": "Creating of an issue using project keys and issue type names using the REST API", "issuetype": { "name": "Bug" } } }

Suggest an answer

Log in or Sign up to answer