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

Create workspace ssh key using the api

Arthur Gramiscelli Branco December 2, 2022

Can that be done? I didn't find anything related on the documentation for workspaces, only for repositories.

edit: I found this unanswered question from 2021 with the same problem: https://community.atlassian.com/t5/Bitbucket-questions/How-can-I-use-the-Bitbucket-API-to-add-an-SSH-key-to-a-Workspace/qaq-p/1836286

1 answer

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 5, 2022

Hi Arthur,

This is possible using the endpoint for adding an SSH key to users:

{selected_user} in the URL should be the UUID of the workspace (enclosed in curly brackets).

You may need to URL-encode the curly brackets, replace { with %7B and } with %7D

You can get the UUID of the workspace using the following endpoint:

Please feel free to let me know if this works for you and if you need anything further.

Kind regards,
Theodora

Arthur Gramiscelli Branco December 9, 2022

Yes, that helps actually, thank you!
I had to create an appassword for an user inside the workspace but it was enough authentication to add the key to the workspace.

Ps: I think the documentation on this should be updated.

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 12, 2022

Hi Arthur,

That's good to hear, thank you for the update!

I will talk with my team regarding updating the documentation.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events