Is it possible for a customer to login and create service desk tickets via REST API?

rest-api
jira-service-desk
jira-cloud

#1

We have a use case where a customer will want to submit tickets to our service desk portal automatically to trigger a job we will perform for them. We don’t want to provision a regular JIRA user and deal with the permissionings that come with them having access to all of our internal projects. We wanted to use Service Desk as the cleanest and most scalable solution.

I’m having trouble figuring out whether it’s even possible to login to our JIRA instance via API as the customer with the customer’s credentials.

We’ve successfully used a Python JIRA library (https://jira.readthedocs.io/en/master/index.html) to perform JIRA API changes as a regular user. Is there something similar for Service Desk? Is there something that would work for the customer under their credentials?

Thanks in advance!


#2

Sure - you don’t even need the customer’s credentials. You just need one set of credentials (for the automated user).

First you’d have to hit POST /rest/servicedeskapi/customer ( https://developer.atlassian.com/cloud/jira/service-desk/rest/#api-customer-post ) to create the customer.

Then once the customer is created:
POST /rest/servicedeskapi/request ( https://developer.atlassian.com/cloud/jira/service-desk/rest/#api-request-post ) to create the actual request.

You’ll need credentials for a utility user (unless you create a connect app).


#3

Thanks for the reply!

Unfortunately your answer is what I was afraid of. So the customer would need access to a utility user (a regular JIRA user, correct?) in order to authenticate and manipulate anything via the API? I’m trying to avoid the use of a utility user entirely. The goal is for the customer to be able to login without having some backdoor access to the rest of our JIRA instance (I’m trying to avoid locking down permissions to almost 100 projects). Also, if we wanted to have this process work for multiple users, we don’t want them to share the same utility account credentials (and have access nightmares that way). The paradigm of customer accounts is ideal, but I’m not sure if one can login as one via API.


#4

Well the utility user would be to create the users/issues on behalf of the customer users. You can create a connect app and do it through that (might be a bit too much for what you’re doing.

Once the customer is created they could log in as themself to manipulate the requests that you’ve created on their behalf.


#5

Makes sense. The goal/hope was for the customer to ultimately still create the tickets for themselves, though. :slight_smile: via API


#6

Oh so you’re not after creating the requests for them? In that case just give them the request portal url. They’ll be blocked from the rest of the JIRA instance as long as they’re a customer user and not a real user.


#7

Yup! The use case is that customer will send us a lot of detailed information in order for us to trigger a process on our end, so we were hoping they could submit a ticket programmatically and not via the request portal URL.

So yeah, the ultimate question is: Can a customer login via the JIRA REST API to submit a ticket to us (the Service Desk agents)?


#8

Is there a reason you can’t just use the ‘createRequest’ method? POST@/rest/servicedeskapi/request

https://docs.atlassian.com/jira-servicedesk/REST/3.6.2/#servicedeskapi/request