I'm new to APIs and how it is implemented in Jira. I've read the articles online, but I am having some issues accessing the localhost. How can I use the API with cURL to create an issue?
Hello Fariha,
See this REST API documentation on creating an issue. Create a an API token here. I found it easies to use Postman to generate the authorization hash. Choose basic authorization and enter your Atlassian username and API token. See this on generating curl code in Postman.
A basic curl script looks something like:
curl --location --request POST 'https://<your prefix here>.atlassian.net/rest/api/2/issue' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <auth hash goes here>' \
--data-raw '{
"fields": {
"summary": "summary goes here",
"issuetype": {
"id": "10002"
},
"project": {
"id": "10000"
}
}
}'
Please let the Community know how it goes.
Regards,
Hyrum
Thanks for the response! I have created a token. I'm running into the issue where the localhost is not being found when I put in that. For instance, when I press "Send" in Postman, it says "Could not get any response." Is this an issue with not having started Jira or something?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Discover how Atlassian is revolutionizing service management with cutting-edge solutions for AI-powered support, HR Service Management, or DevOps connectivity.
Register here ⬇️Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.