Forums

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

Not able to acces Sericedesk rest API using crome Advanced Rest Cl

Koushik Dey March 9, 2019

Hii I am new to Servicedesk API call, I have an admin access to my account

I need a serious help from all of you.

 

url : https://xxx.atlassian.net/rest/servicedeskapi/servicedesk/MFSD/customer

here : MFSD=> {serviceDeskId} [need to pass as a a parameter] 

Method : :Post 

Content type : Content-Type

Body : 

{
"usernames": [
"joe",
"john",
"josh"
]
}

I am getting follwoing error :

401 : 

{"errorMessage": "The action performed required a logged in user. Please log in and try again.","i18nErrorMessage": {"i18nKey": "sd.admin.servicedesk.error.authenticated.user.required","parameters": [],}

}

please help me to solve this problem.

1 answer

1 accepted

1 vote
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 13, 2019

Given the error message and the endpoint you are calling of POST /rest/servicedeskapi/customer,  it certainly looks like your account is not authenticated via REST when making this specific call.

There are different authentication methods that can be used here.  For utilities like this or something like curl, I would recommend using the Basic auth for REST APIs as a guide.  I would expect that you would need to create an API token and follow the steps in that guide in order to build a string of username:api_token and then encode that string into the base64 as that guide explains.  Once you do that, you can then supply some additional headers to the POST request in order to make sure your account is authenticated when making this kind of request.

Koushik Dey March 13, 2019

Thank you, but one thing can you please confirm,

That I am using a free trial jira account with admin access.

So is atlassian jira allow me to accsea Rest API as a free trial admin user ? Or I need to purchase the jira version ?

Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 13, 2019

Yes the Atlassian Cloud site will still allow you to use the REST API, even if it is an evaluation trial.  Should the trial expire, you could be locked out from the site itself, but this would manifest itself with the inability to login to the cloud site itself.  If that happens, then the REST API access would also be expected to fail as it too depends on the user accounts ability to authenticate.

Koushik Dey March 14, 2019

Hello Andrew

 

Thank you very much, U made my day. Now I can able to access API , there was a authentication problem which I missed.

ihor.horchynskyi
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 1, 2020

Koushik Dey, So what was the problem?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events