The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How do I add an access key via the REST api?

Information Systems
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!
June 5, 2016

Using Bitbucket server.

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
Felix
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 5, 2016

You can use the SSH REST API.

Example:

curl -X POST -u username:password -H "Content-Type: application/json" -d '{
    "key": {
        "text": "ssh-rsa AAAAB3... me@127.0.0.1"
    },
    "permission": "REPO_READ"
}' "http://<baseurl>/rest/keys/1.0/projects/{projectKey}/repos/{repositorySlug}/ssh"

 

Hope that helps, 

Felix 

Erik Hennerfors
May 8, 2017

So If I'm using Bitbucket Cloud is this possible, can't seem to find any documentation about it.

Eduardo Aleixo
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!
May 29, 2017

I have the same question, any updates on that?

Patryk Golabek
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!
June 16, 2017

Looking for cloud REST API as well.

1 vote
Josh Walsh
July 30, 2017

For Cloud REST API it looks as if they are called 'Deploy Keys' instead of 'Access Keys'. You can manage them with the v1 API: https://confluence.atlassian.com/bitbucket/deploy-keys-resource-296095243.html

Josh Walsh
July 30, 2017

@Patryk Golabek @Eduardo Aleixo @Erik Hennerfors I think this might help you.

anurag shrinagar
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!
October 23, 2018

api v1 is going to be deleted soon.

TAGS
AUG Leaders

Atlassian Community Events