Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×I am using a service account and have the use case of creating ticket and comments on behalf of another user via REST API. Currently, I am unable to figure out any API example or way to do the same.
@Jan Klan @Adrián Eduardo Giacometti Brussolo did you find a way to use the API to create tickets on-behalf of existing users?
Hi @AVNISH ANAND -- Welcome to the Atlassian Community!
You may want to search in the developer community for ideas about this topic:
https://community.developer.atlassian.com/
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Bill, with all the due respect, that's a pretty useless answer as the general community is now so bloated and full of out-of-date answers that it is not particularly easy to find anything there.
For other people finding this question, here is how far I made it, maybe it will help somebody, or maybe somebody could kick me even further:
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post describes vaguely how to create an issue.
1) First, follow the beginning of that description to get to a point where you have your user credentials
2) Then, replace the xxx with your actual values, and run:
curl --request GET \
--url 'https://xxx.atlassian.net/rest/api/3/issue/createmeta' \
--user 'xxx:xxx' \
--header 'Accept: application/json'
-> it will tell you what are the `issuetype.id`, `project.id` numbers you want in the next step.
3) Run
curl --request POST \
--verbose \
--url 'https://xxx.atlassian.net/rest/api/3/issue' \
--user 'xxx:xxx' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"update": {},
"fields": {
"summary": "Main order flow broken",
"issuetype": {
"id": "XXX"
},
"project": {
"id": "XXX"
},
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "Order entry fails when selecting supplier.",
"type": "text"
}
]
}
]
},
"reporter": {
"id": "XXX"
},
"labels": [
"test"
]
}
}'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Update #1. Changing the `reporter.id` to `reported.email` makes the API call go through, and the issue is created, but the requester is Anonymous.
I could attempt to create the user, but that would definitely mean I need to use API key with significant access. I don't wish to use API key that can manage my Jira users.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jan, with "reporter.email" I get "anonymous" in the ticket
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.