Forums

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

Easiest way to access Jira Service Desk project via REST API

Thomas Fozzi
Contributor
December 18, 2019

Hello

 

I'm setting up a script to automatically retrieve some stats from my Jira Cloud Service Desk project. In the past I saw Jira provides large API support, so I was expecting it would be pretty easy. Somehow it is taking longer than expected and the doc (https://developer.atlassian.com/cloud/jira/service-desk/rest/ ) doesn't seem to help.

First: Authentication

  • I"m using the credentials of a random Jira Service Desk user (a Service Desk Agent)
  • I tried Basic authentication as it looks the best option
  • I'm making my tests with cUrl, but the requests will be done in Javascript 

Second: Path

  • which is the path that must be used for a simple query on a given service desk project (e.g. how many issues in status X from day A to day B) - I saw it should accept JQL queries

Third: Expansion

  • among of the dozens of tests some actually gave me a JSON response, but some tags were not expanded; even after using the expansion parameters specified in the Documentation

 

Any suggestion?

 

Thanks

Thomas

1 answer

0 votes
Thomas Fozzi
Contributor
January 27, 2020

I eventually had it working

 

1) encode the string

"username:password" 

with Base64

2) add the header

"Authorization: Basic <encoded string>" 

to your cUrl command

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, state of product 2026 webinar, product team report, webinar, product management, ai productivity, agile practices, team alignment, product report, atlassian learning, product strategy, discovery to delivery, survey insights

Webinar: State of Product 2026

We asked real teams how they’re coping with an industry in flux. Join this webinar to hear the research –plus tips for leveling up your team’s work.

Register now
AUG Leaders

Atlassian Community Events