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

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

Information Systems June 5, 2016

Using Bitbucket server.

2 answers

1 accepted

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

I have the same question, any updates on that?

Patryk Golabek 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 October 23, 2018

api v1 is going to be deleted soon.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events