Sign up

Get an SSH key

GET/api/v1/ssh-keys/{key_id}

One key of the account.

Parameters

NameInDescription
key_idpath, integerrequiredSSH key id, from List SSH keys

Example request

curl -X GET "https://platform.serverscamp.com/api/v1/ssh-keys/$KEY_ID" \
  -H "Authorization: Bearer $API_TOKEN"

Answer

Status 200 with this body.

FieldTypeDescription
idintegerrequiredKey ID
key_namestringrequiredKey name
key_typestringrequiredKey type (ed25519, rsa, ecdsa, etc.)
public_keystringrequiredPublic key in OpenSSH format
fingerprintstringrequiredKey fingerprint (SHA256)
has_private_keybooleanrequiredWhether private key is available for download
created_atstring, optionalCreation timestamp
commentstring, optionalTrailing comment from OpenSSH public key (e.g. user@host)
bitsinteger, optionalKey strength in bits
sourcestring'generated' if private key is stored, else 'imported'
strengthstring'modern' for ed25519/ecdsa, 'legacy' for rsa
statestring'in-use' if at least one VM trusts this key, else 'unused'
last_attached_atstring, optionalWhen the most recent VM using this key was created
trusted_bylist of SSHKeyTrustedVMVMs that have this key installed
trusted_by[].vm_uuidstringrequired
trusted_by[].namestringrequired

Errors

StatusWhen
401No token, or a token that is not valid
404No such key in your account
422The body or a parameter is not what the operation takes

Every operation can also answer 401 without a valid token. All errors