PUT /users/{selected_user}/ssh-keys/{key_id}
Updates a specific SSH public key on a user's account
Note: Only the 'comment' field can be updated using this API. To modify the key or comment values, you must delete and add the key again.
Example:
$ curl -X PUT -H "Content-Type: application/json" -d '{"label": "Work key"}' https://api.bitbucket.org/2.0/users/{ed08f5e1-605b-4f4a-aee4-6c97628a673e}/ssh-keys/{b15b6026-9c02-4626-b4ad-b905f99f763a}
Servers
- https://api.bitbucket.org/2.0
Path parameters
Name | Type | Required | Description |
---|---|---|---|
selected_user |
String | Yes |
This can either be an Atlassian Account ID OR the UUID of the account,
surrounded by curly-braces, for example: |
key_id |
String | Yes |
The SSH key's UUID value. |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
comment |
String | No |
The comment parsed from the SSH key (if present) |
expires_on |
String | No | |
key |
String | No |
The SSH public key value in OpenSSH format. |
fingerprint |
String | No |
The SSH key fingerprint in SHA-256 format. |
uuid |
String | No |
The SSH key's immutable ID. |
label |
String | No |
The user-defined label for the SSH key |
created_on |
String | No | |
type |
String | Yes | |
last_used |
String | No | |
links |
Object | No | |
links.self |
Object | No |
A link to a resource related to this object. |
links.self.href |
String | No | |
links.self.name |
String | No |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.