Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Set the reporter when creating issue via REST API

Albert Frischmann September 22, 2020

When I create an issue via REST API there is no field to define the reporter

I want the same function as the field "Email confirmation to" of the support portal. Is it possible to set the reporter, when reporter is the anonymous customers?

1 answer

1 accepted

0 votes
Answer accepted
Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 23, 2020

Hello Albert,

Thank you for reaching out to Atlassian Community!

When creating tickets using API, the reporter is set on "raiseOnBehalfOf" which is the same field we use in the UI when creating a ticket.

curl --request POST \
--url 'https://xxxxx.atlassian.net/rest/servicedeskapi/request' \
--user 'xxxxx@domain.com:TOKEN' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"raiseOnBehalfOf":
"qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d69abfa3980ce712caae",
"serviceDeskId": "12",
"requestTypeId": "123",
"requestFieldValues": {
"summary": "Request JSD help via REST",
"description": "I need a new *mouse* for my Mac"
}
}'

When creating the ticket on behalf of the customer, they will receive the notification the same as if they were creating the ticket in the customer portal or via email.

Is it possible to set the reporter, when reporter is the anonymous customers?

When creating the ticket using API we need to add their accountId, it means that we can only create tickets for existing customers. 

Regards,
Angélica

Albert Frischmann September 24, 2020

Thank you so much, Angélica!

This worked perfectly (along with create customer and add it to the service desk) But how can I create an attachment (if the user adds one into initial request)? If I go a regular way, i.e. create temp file and then add it, it is created as added by agent, customer gets an email notification with his own attachment and the status changes to "waiting for customer", which is apparently wrong.+

Thanks in advance!

Angélica Luz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 28, 2020

I'm glad that it's working @Albert Frischmann!

Currently, it's not possible to add an attachment when creating an issue. There is a feature suggesting this option:

If you don't want to transition the issue, the best option is to add the attachment as an internal comment and then go to the UI and change the visibility to public. The automation only runs at the moment the comment is added as public, so if it's added as internal and then changed to public, the automation will not run and it will not be transitioned to "waiting for customer".

Like Albert Frischmann likes this
Albert Frischmann September 28, 2020

Thank you a bunch!

Like Angélica Luz likes this
Jonathan
Contributor
January 19, 2021

Hi @Angélica Luz ,

where is the username in your example that is the reporter of the request?

I want to give the POST request a user on who's behalf the request should be created.

Albert Frischmann January 19, 2021

the reporter is set on "raiseOnBehalfOf" field.

Jonathan
Contributor
January 19, 2021

yes, but how?

in the example there is this string:

qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d69abfa3980ce712caae

What is that, a token? Can I just give a username instead? 

Jonathan
Contributor
January 19, 2021

ok,never mind - it works now with the username, eg.:

"raiseOnBehalfOf": "john01",

..What's really bad though is that only agent users can raise issues on behalf of someone else. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events