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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

REST API curl example

Trying for the first time to do rest api using curl.

curl -u "srs@perfectionsoftware.com:XXXXXX" -H "Content-Type: application/json" "https://perfectionsoftware.atlassian.net/rest/servicedeskapi/organization"

getting this response:

Basic authentication with passwords is deprecated. For more information, see: https://confluence.atlassian.com/cloud/deprecation-of-basic-authentication-with-passwords-for-jira-and-confluence-apis-972355348.html

The link is not very helpful, and everything I tried with api searching is very confusing.

I created an admin organization ID and API key in my administration settings but have no idea what to do with it?

2 answers

1 accepted

1 vote
Answer accepted

Hello @steveshourds,

Thank you for reaching out to Atlassian Community!

Just for us to better understand and help you with this issue, I would like to know more details about the endpoint you are using.

I see that you created an API Key on admin.atlassian.com and that's is correct if you want to use the APIs from the documentation below:

Here is an example of the curl using the API key:

curl --request GET \
  --url 'https://api.atlassian.com/admin/v1/orgs/{Org ID}' \
  --header 'Authorization: Bearer 0a1bCdeFGhiJKLMNOPqR' \
  --header 'Accept: application/json'

If you want to use API for Service Desk Organizations, that is different from the above, then the API Token that you need to use is the one generated on your profile on https://id.atlassian.com/manage-profile/security.

  curl --request GET \
  --url 'https://domain.atlassian.net/rest/servicedeskapi/organization' \
  --user 'email@domain.com:A1b2345CdEfgHIJkLMn67O8P' \
  --header 'Accept: application/json'

Please, give it a try and let us know how it goes.

Regards,
Angélica

0 votes
Warren Community Leader Sep 22, 2020

Hi @steveshourds 

I don't use ServiceDesk, only Jira Software, but I think the concept is the same.

To use the API, you need to create an API token and then you use the combination of the email address and token. This needs to be 64-bit encoded before passing it to the API.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

Why upgrade to Jira Service Management Premium?

We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan.  &nb...

189 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you