Hello! I am using this URL: 'https://honeywell.atlassian.net/rest/api/2/issue/' to create issues by passing data in JSON format.
The method used to work before we migrated from on-prem to cloud. However when I try to do the same in the cloud instance I am getting the following error:
Using Basic authorization
Alternatively, I tried the API Token using Bearer authorization but I'm getting this error:
Any help much appreciated!
Hi @Gomez de la Vega, Hernando
For Jira Cloud, you typically use API tokens instead of passwords for Basic authentication. Here’s how to set it up and make a successful POST request:
Step-by-Step Guide
1. Generate an API Token
1. Go to Atlassian API tokens.
2. Click Create API token.
3. Name your token and click Create.
4. Copy the token to use it in your requests.
2. Base64 Encode the Email and API Token
Combine your Atlassian account email and the API token in the format email:api_token and then Base64 encode this string.
You can use this site to encode: https://www.base64encode.org/
Checklist
•Ensure the API token is correct and active.
•Verify that the user has the necessary permissions in the Jira Cloud project.
• Use the correct endpoint URL: https://your-domain.atlassian.net/rest/api/2/issue/.
•Use Basic authentication with the encoded email:api_token string.
•Make sure your request headers include Content-Type: application/json.
By following these steps, you should be able to successfully create issues in Jira Cloud using the REST API. If you still encounter issues, please provide the exact error messages for further assistance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Caio!
On step 2, I am using Content-Type:application/json as you mentioned and email:password Authorization base64 encoded. The reply is HTTP 405 Method not allowed.
Since that didn't work, I tried the API Token via Bearer Authorization but it gives
So both steps have been tried without success. Not sure if this might be because it's a new Jira Cloud instance...
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.