Using Bitbucket server.
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
So If I'm using Bitbucket Cloud is this possible, can't seem to find any documentation about it.
I have the same question, any updates on that?
Looking for cloud REST API as well.
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
@Patryk Golabek @Eduardo Aleixo @Erik Hennerfors I think this might help you.
api v1 is going to be deleted soon.
It looks like you're new here. Sign in or register to get started.