Update SSH Key
PATCH
https://api.vpsbg.eu/v1/ssh-keys/{id}You can update a saved SSH key. If the value of some input is empty, it will retain its original value. Updating your SSH key will not update the ssh key on your previously deployed servers.
Request
Path Params
id
string
required
Body Params application/json
name
string
optional
>= 3 characters<= 100 characters
key
string
optional
Example:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJXgSGIiC3OMJtZrGBLY4rpfPjwWZiJtcG4JLUOWCt5h6cSQ4ESRFzCzK4uz6XM1ZjizGj8r2T5IA+9nAdXZAmD8p9mZ8eYFz8QY/URBsn2ohX4NVR9ScGbr3Z3q6Vq6aK6YbW+J++CmgM5sV6BZhMkvr5V55MP0KGS3hCV02OqQ4+q9jc6RXHZLJ2eSH7KrMz7ZTsV4yC5lfCwCfDdzeKU9ZjTjsGHU4N5nWnApJb7s1L2GdJ1F6QQNc6vN1z0SlZL9QqjMG3AicSiqJlRzAFK2u0xszj6wvgPhTZ/xsmdgH+b9y2r0bl6pLzImh0I6FCRRIm2JdFmlDnqQb user@example.com
Match pattern:
/^(ssh-(rsa|ed25519)) [A-Za-z0-9+\/=]+(\s.+)?$/
Example
{
"name": "string",
"key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDJXgSGIiC3OMJtZrGBLY4rpfPjwWZiJtcG4JLUOWCt5h6cSQ4ESRFzCzK4uz6XM1ZjizGj8r2T5IA+9nAdXZAmD8p9mZ8eYFz8QY/URBsn2ohX4NVR9ScGbr3Z3q6Vq6aK6YbW+J++CmgM5sV6BZhMkvr5V55MP0KGS3hCV02OqQ4+q9jc6RXHZLJ2eSH7KrMz7ZTsV4yC5lfCwCfDdzeKU9ZjTjsGHU4N5nWnApJb7s1L2GdJ1F6QQNc6vN1z0SlZL9QqjMG3AicSiqJlRzAFK2u0xszj6wvgPhTZ/xsmdgH+b9y2r0bl6pLzImh0I6FCRRIm2JdFmlDnqQb user@example.com"
}
Request samples
Responses
When update is successfully, it will return the updated resource.(200)
When update is successfully, it will return the updated resource.
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
id
integer
optional
name
string
optional
key
string
optional
ExampleExample 1
{
"id": 90,
"name": "Example SSH Key",
"key": "ssh-rsa AA... user@example.com"
}
Last modified: 3 months ago