Forums

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

JIRA Service Desk REST API - Examples - How to

roozadhami September 4, 2019

Hello,

Our system environment is that we have the following JIRA products (self-Served):

- JIRA Service Desk REST API
- JIRA Software 7.0.4
- JIRA Core 7.0.4

Server name:  https://itselfservice.vnsny.org

We also have the URL for the 'JIRA Service Desk REST API Reference (JIRA Service Desk 4.3.3)' and we would like to be able to make API call using Linux Curl command in order to be able to get as an example the organizations for our JIRA server. As per JIRA service Desk Rest API document we have the following statement:

GET /rest/servicedeskapi/servicedesk/{serviceDeskId}/organization

Therefore, I used the following curl command: 

curl -u User.Name@ipsoft.com:SecretPass http://itselfservice.vnsny.org/rest/servicedeskapi/servicedesk/{serviceDeskId}/organization

But when I ran the above command the Linux machine just returned back to the terminal cursor and that there were no outputs or errors (just the Carriage-Return).  I am not sure what should exactly have happened.  The API document also stated that:

"application/jsonReturns the requested organizations" so would that mean I should have gotten a Json file returned?  Please advise and if possible provide us with an API call (using curl command) example.  It would be very much Appreciated. 

Best Regards,
Rooz Adhami
IPsoft Inc.

1 answer

0 votes
Brant Schroeder
Community Champion
September 5, 2019

In the following url, http://itselfservice.vnsny.org/rest/servicedeskapi/servicedesk/{serviceDeskId}/organization, you need to update the {serviceDeskID} with the actual service desk ID.  You can get the service desk ID by going to the service desk's admin section and select details.  The ID will be in the url pid=XXXX.  Place that in the url to get the curl to work.  Also this API is experimental. Experimental APIs are not guaranteed to be stable within the preview period. You must set the header 'X-ExperimentalApi: opt-in' in your curl to use this API.  Hope this helps.

roozadhami September 5, 2019

Hello,

Thank you very much for your reply. First I am not sure how to navigate to the 'Service desk's admin section' as when clicking on the Right-Most-Corner Cog icon on our JIRA System Dashboard  I could choose from the given Options of 'Application, Projects. Issues. Add ons , User Management, System'.  So it would be very helpful to provide us with how to navigate to Admin section for the Service desk in order to get the ID number (just a reminder that we use JIRA Software 7.0.4 plus JIRA Core 7.04 and JIRA Service Desk 3.0.11 as self-Served).  Also as per your above statement of "Also this API is experimental. Experimental APIs are not guaranteed to be stable within the preview period" do you mean that the listed APIs on the 'JIRA Service Desk 3.2.0' API's URL of https://docs.atlassian.com/jira-servicedesk/REST/3.2.0/ might not be working?  Please explain more in details.

Best Regards,

Rooz Adhami
IPPsoft Inc.

roozadhami September 5, 2019

Hello Brant,

Searching google, please see below URL from Atlassian Community and based from a comment by Mihai Panait (as dated February 04/2016):

https://community.atlassian.com/t5/Answers-Developer-Questions/jira-service-desk-public-REST-API-404/qaq-p/504179

"so.. JIRA service desk rest api is only available on v 3.1.x released on 10 feb 2016"

And since as stated earlier our JIRA server is based on 'JIRA Service Desk 3.0.11' therefore, I believe that we would need first to upgrade to JIRA Service Desk to v3.1.x before attempting to use REST API in our JIRA environment/server.  Can you please confirm that.  Again, thanks for your earlier comments/feed-back regarding this issue.


Cordially Yours,
Rooz Adhami
Ipsoft Inc.

Brant Schroeder
Community Champion
September 6, 2019

Rooz,

  The Jira Service Desk API did not become available on server until service desk version 3.2.0.  So yes if you are on any version before 3.2.0 you will need to upgrade.

roozadhami September 6, 2019

Hello Brant,

 

Thanks for confirmation.  

Regards,

'Rooz Adhami
IPsoft Inc.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events