Can I use ServiceDesk REST API to raise an anonymous Issue?

Dylan_Tusler April 2, 2018

We are developing (client side application, not web app) software for the visually impaired. I would like to set up the feedback functionality of our application to raise a service desk item automatically via REST API call. Our users are authenticated within our application, so we have email address, and can put it into the request, but I don't want to make them sign on to a Service Desk account too in order to raise feedback via our application. So I was hoping I could let the service desk call be made anonymously.

I've had a quick experiment with the API, but even though we have enabled anonymous requests via the web I can't see how to raise them via the API.

1 answer

1 accepted

0 votes
Answer accepted
Shaun S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 4, 2018

Hi Dylan,

 

JIRA Service Desk doesn't currently allow for anonymous user creation the way JIRA Software does.  There is a feature request for this functionality though, which can be found here https://jira.atlassian.com/browse/JSDSERVER-1030

 

Having said that, you may be able to work around this by creating a user specifically for API calls through your application.  If you create a user with the name service_account, for the sake of example, you should be able to make REST API calls that create new requests in a given portal.  

 

You can test this by sending a POST to the request endpoint:

curl -D- -u service_account:password -X POST -d @request.json -H "Content-Type: application/json" http://yourservicedesk.com/rest/servicedeskapi/request

 Contents of request.json:

{
"serviceDeskId": "2",
"requestTypeId": "9",
"requestFieldValues": {
"summary": "Request raised via REST API",
"description": "Help me Obi Wan Kenobi. You're my only hope."
}
}

 The REST API documentation for this endpoint also outlines additional fields you can add to the request body. https://docs.atlassian.com/jira-servicedesk/REST/3.6.2/#servicedeskapi/request-createCustomerRequest

Dylan_Tusler April 4, 2018

Good suggestion. 

For our current purposes, I've just hooked in to the email gateway and am creating the issue via email. That will take us through, and when the requirements inevitably escalate, I will revisit your suggestion.

Dylan

Dylan_Tusler April 4, 2018

Oh, and the feature request you linked to is not for this feature.

Federico Alconada September 6, 2018

How can I choose the email of the user? Because if I use the `service_account` user, the ticket will be created with that user as a Reporter. But if I want an X person to do it, as it happens with the UI, I don't see a way to send the "Email confirmation to" field... Is there any way?

Like # people like this

Suggest an answer

Log in or Sign up to answer