Forums

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

Can't create an issue using REST API

bahjat murrad January 19, 2021

I am unable to create an issue using REST API calls.

I've tried a few things, using the CURL command, using the JIRA package for PIP. I always seem to get the error "Basic authentication with passwords is deprecated.". It's kind of ironic because i'm using the documentation that Atlassian have provided. i'm also not using my username and password. I'm using my username and my API token (as suggested via the documentation). 

I'm not quite sure what i'm doing wrong because according to the documentation and others (not from my company). If i go onto my companies jira instance and follow it up with /rest/api/3 i should see a page. However for my company i get an error, 404 page not found

1 answer

0 votes
Dirk Ronsmans
Community Champion
January 19, 2021

Can you try to see if your endpoint is there using

https://yourhostname/rest/api/3/issue/createmeta

basic authentication is deprecated with username/password but should work with username:api token

Are you sending it in a header? Cause then you would need to base64 encode it.

bahjat murrad January 19, 2021

Thanks for replying.

I believe the end point is there because when i added the /rest/api/3/issue/createmeta i see json text on the screen. 

The header i am sending in using curl just states that the contents are json content (as specified in this web page) https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/ 

Daniel Ebers
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 20, 2021

You linked the documentation for Server but the Community states you are using Cloud.
https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/

Have you double checked with the Cloud documentation also?

If it should not work could you please show us your request (with all credentials anonymized) as well as the output?
So, first the endpoint is complaining about basic auth but then bringing up an error 404?-This is rather unusual.

Could you please confirm the Jira instance that is causing pain is a Cloud one? Just to make sure we are not looking into a Server related question.

bahjat murrad January 20, 2021

Thanks @Daniel Ebers  for the reply. I see what you mean by server based and cloud based JIRA instances. 

We have a JIRA instance based on the cloud server. I'm using the new documentation that you sent me the link for however i can't seem to log into the rest api at all. <local.url>/rest/api/3/issue.  I get an error 405, however if i add /createmeta , it returns JSON format webpage. 

 

I'm trying to do this example here. 

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/

Daniel Ebers
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 20, 2021

Could you please show "in code" how you actually do the login?
If needed, you can add screenshots if this is easier.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events