Create a Jira ticket with an API
Objective
Send a payload to an api that will create an issue here
Notes
The documentation may NOT apply to both Jira Server and Jira Cloud
Jira Cloud Documentation
Create an issue Jira Cloud platform Developer Reference
Jira Server Documentation
Getting started
visit the following links inside your browser:
https://lowranceworks.atlassian.net/rest/api/2/issue/createmeta
- to see stuff
https://lowranceworks.atlassian.net/rest/api/2/issue/createmeta?projectKeys=FP&expand=projects.issuetypes.fields
- to see stuff under your project (FP = project key)
the links above used the api version 2, let's use the newest version (3)
https://lowranceworks.atlassian.net/rest/api/3/issue/createmeta
https://lowranceworks.atlassian.net/rest/api/3/issue/createmeta?projectKeys=FP&expand=projects.issuetypes.fields
{
"fields": {
"project":
{
"key": "FP"
},
"summary": "Issue created via REST.",
"description": "bla bla bla goes here",
"issuetype": {
"name": "Test bug"
}
}
}
create an issue POST https://lowranceworks.atlassian.net/rest/api/3/issue/
{
"fields": {
"project": {
"key": "FP"
},
"summary": "Jira Rest API via Postman.",
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "description"
}
]
}
]
},
"issuetype": {
"name": "Story"
}
}
}
results in error:
{
"errorMessages": [],
"errors": {
"summary": "Field 'summary' cannot be set. It is not on the appropriate screen, or unknown.",
"description": "Field 'description' cannot be set. It is not on the appropriate screen, or unknown."
}
}
Learning how to talk to the api