Last updated 1 month ago
Delete an SSH key. Note that SSH keys used in active bids/reservations cannot be deleted.
sshkey_abc123456
DELETE /v2/ssh-keys/{ssh_key_fid} HTTP/1.1 Host: api.mlfoundry.com Authorization: Bearer fkey_<key> Accept: */*
Successful Response
No content
Get all SSH keys for a project
proj_abc123456
GET /v2/ssh-keys HTTP/1.1 Host: api.mlfoundry.com Authorization: Bearer fkey_<key> Accept: */*
[ { "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.
POST /v2/ssh-keys HTTP/1.1 Host: api.mlfoundry.com Authorization: Bearer fkey_<key> Content-Type: application/json Accept: */* Content-Length: 62 { "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-----..." }