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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to create/add ssh-keys inside the repository via REST API?

I tried this API endpoint:

data = {
"label": "new-ssh-key",
"key": "ssh-rsa blah blah"
}
and authenticated using Oath2.
The response is this:
"{\"type\": \"error\", \"error\": {\"message\": \"Resource not found\", \"detail\": \"There is no API hosted at this URL.\\n\\nFor information about our API's, please refer to the documentation at: https://developer.atlassian.com/bitbucket/api/2/reference/\"}}"
what is the correct endpoint? I can't find it on the REST API docs.

1 answer

1 vote
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 11, 2023

G'day @Sugar Ray Tenorio 

I believe the endpoint you are looking for is the following:

Add a repository deploy key 

This should add the SSH key on the repository level. The location of this in UI is under Repository settings > Access keys

I hope this helps

Regards,
Syahrul

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events