Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Jira Widget API problem

Milda Tubyte July 12, 2022

Hello.

My goal: to create a custom widget that any user without login to a system could create an issue to our company service desk project.

Currently: We are using embeddable request widget - and it works fine. Any user can create a request via that widget. But we want to customize it in our way. (example of the widget is attached below)

widget example.png

Problem: I am not able to create an issue by using JIRA API's. I have tried several API's and variations, but none seem to work.

What have I tried:

https://fakecompany.atlassian.net/rest/servicedeskapi/request with json body:
{ "serviceDeskId": "3", "requestTypeId": "86", "requestFieldValues": { "summary": "Request JSD help via REST", "description": "I need a new mouse for my Mac" } }

also I tried:
https://fakecompany.atlassian.net/servicedesk/3/requesttype/86/field 

What I get:
but I get 404 or 401 response.

What I am using

I am using .NET 6 if it makes any difference.

What I am looking forward to:

Could anyone give an example how to create service desk issue via JIRA API.

 

Thanks a lot everyone!

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 14, 2022

Hi

I understand that you want to be able to create requests in Jira Service Management using the REST API.  However, in order to do that, you need to use a user account that has to authenticate to the system.  There is a overview over in https://developer.atlassian.com/cloud/jira/service-desk/rest/intro/ that explains the permissions and authentication required to make these kinds of new requests.  In Service Management users in the customer role are unlicensed users, but this also means you can have an unlimited number of these users. 

The Widget is a completely separate feature added to Jira Service Management Cloud to try to simplify the steps needed to create services requests even further.  While the widget can be used to create these requests without the user having an account or using a login, that functionality is specific to the widget.  There effectively is a special service account that is being used to create those requests on that unauthenticated user's behalf.  That functionality of the widget itself does not necessarily extend itself to the REST API though.  I think that is where you might be getting tripped up here.  I do not expect that you could use this special service account in order to create issues via REST API.

I understand this is probably not the solution you are wanting to see, but I hope this helps.

Andy

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events