Last updated 12 hours ago
Get all SSH keys for a project
/v2/ssh-keys
proj_abc123456
curl -L \ --url 'https://api.mlfoundry.com/v2/ssh-keys?project=proj_abc123456' \ --header 'Authorization: Bearer fkey_<key>'
[ { "fid": "sshkey_abc123456", "name": "text", "project": "proj_abc123456", "public_key": "text", "created_at": "2024-01-01T00:00:00Z" } ]
Create a new SSH key. If public_key is not provided, this endpoint will generate a new RSA key pair and return both the private and public keys.
curl -L \ --request POST \ --url 'https://api.mlfoundry.com/v2/ssh-keys' \ --header 'Authorization: Bearer fkey_<key>' \ --header 'Content-Type: application/json' \ --data '{ "project": "proj_abc123456", "name": "text", "public_key": "text" }'
{ "fid": "sshkey_abc123456", "name": "text", "project": "proj_abc123456", "public_key": "text", "created_at": "2024-01-01T00:00:00Z", "private_key": "-----BEGIN RSA PRIVATE KEY-----..." }
Delete an SSH key. Note that SSH keys used in active bids/reservations cannot be deleted.
/v2/ssh-keys/{ssh_key_fid}
sshkey_abc123456
curl -L \ --request DELETE \ --url 'https://api.mlfoundry.com/v2/ssh-keys/{ssh_key_fid}' \ --header 'Authorization: Bearer fkey_<key>'
No body