While doing cookie based authentication with Jira getting 404 error while accessing resource "https://testhappiestminds.atlassian.net/jira/rest/auth/1/session"
@SagarThe resource you trying to access is removed from Jira Cloud in favor of API tokens, OAuth, or Atlassian Connect.
Here is deprecation/removal notice by Atlassian - https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-basic-auth-and-cookie-based-auth/
I suggest you to use basic authentication which is documented here - https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-basic-authentication/
Thanks for the information.
I was going through basic authentication documentation which was referred by you and I found here also they are trying to access resource "/rest/api/2/issue". Hence again, I am getting 404 error. Could you please help me here. Actually I wanted to create an issue in JIra using Api's which they have exposed.As we need to do authentication before we create issues, I am using above steps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Below is sample bash file that you can use to create issue in Jira. Please replace,
Please save this as "sample.sh" and execute.
#!/bin/bash
curl --request POST \
--url 'https://testhappiestminds.atlassian.net/rest/api/3/issue' \
--user '<EMAIL>:<API_TOKEN>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"fields": {
"project": {
"key": "<PROJECT_KEY>"
},
"summary": "<ISSUE_SUMMARY>",
"issuetype": {
"name": "<ISSUE_TYPE_NAME>"
},
}
}'
Note - I have seen that you are adding 'jira' context path after site address before 'rest', this is not correct. API path for JIRA cloud is 'SITE_ADDRESS/rest/api/3/...'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also take a look at this API documentation - https://developer.atlassian.com/cloud/jira/platform/rest/v3/?utm_source=%2Fcloud%2Fjira%2Fplatform%2Frest%2F&utm_medium=302#api-rest-api-3-issue-post
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.