Forums

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

JIRA REST API not workable

asd
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 18, 2022

Hi I am new to this community. I am looking to call the JIRA REST API. The problem is when I try make a connection following References it gives me an authentication error: 401. e.g. when I try to call an API as below 

```

curl --request GET \ --url 'https://your-domain.atlassian.com/rest/agile/1.0/epic/none/issue' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'

```

It fails to give response back to my request as 

`curl: (6) Could not resolve host: keptn-sp.atlassian.com`

when I changed the url to `https://keptn-sp.atlassian.net/rest/agile/1.0/epic/none/issue`, I get as below

`{"message":"Client must be authenticated to access this resource.","status-code":401}`

1 answer

0 votes
Deepak Rai
Community Champion
July 20, 2022

just to be make sure - you are using Jira Server, correct? Then you can only having authentication method of OAuth or basic auth. 

If you are using Cloud then only you will use Api Token.

Once you will create these authentication method then configure your credential into API to hit the call.

 

Suggest an answer

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

Atlassian Community Events