Skip to content

Instantly share code, notes, and snippets.

@neeraj87
Created May 28, 2018 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neeraj87/8e048362089bf6c9683ff2fe17b5ffb9 to your computer and use it in GitHub Desktop.
Save neeraj87/8e048362089bf6c9683ff2fe17b5ffb9 to your computer and use it in GitHub Desktop.
JIRA API call to create ticket.txt
1. create basic authentication header : https://developer.atlassian.com/server/jira/platform/basic-authentication/
by base 64 encoded string of username:password (your jira username and password)
2. Add authorization header to the request:
Authorization: Basic ZnJlZDpmcmVk
3. Content-Type: application/json
4. request url: http://my-jira-url.com/rest/api/2/issue/
5. request body:
{
"fields": {
"project":
{
"key": "CRS"
},
"summary": "REST Bug EXAMPLE",
"description": "Creating an issue via REST API",
"issuetype": {
"name": "Bug"
}
}
}
In the issuetype there will be following three values:
Bug
Improvement
New Feature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment