Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

REST API Use with cURL

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?

1 answer

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?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
Community showcase
Published in Trello

🏊‍♀️ Atlympic Event: Trello

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

87 views 0 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you