Examples

POST /api/users/988725684/ssh_keys
{
  "ssh_key": {
    "name": "foreman@example.com",
    "key": "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIhRoL6PfBRs9YwW3r2/pYeLrxRzEZSUO3Go8JivxMsguEKjJ3byHDPvPpMHhKKSZD/HJY/A+2Ndqp0ElB+t2qs= foreman@example.com"
  }
}
201
{
  "created_at": "2021-09-01 13:49:59 UTC",
  "updated_at": "2021-09-01 13:49:59 UTC",
  "id": 3,
  "name": "foreman@example.com",
  "key": "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIhRoL6PfBRs9YwW3r2/pYeLrxRzEZSUO3Go8JivxMsguEKjJ3byHDPvPpMHhKKSZD/HJY/A+2Ndqp0ElB+t2qs= foreman@example.com",
  "length": 520,
  "fingerprint": "5YShdnIX3EEv8GzgY2BSVyOmR9ADnS71FpyobuNljxk="
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Must be a Integer

user_id
required

ID of the user

Validations:

  • Must be a String

ssh_key
required

Validations:

  • Must be a Hash

ssh_key[name]
required

Validations:

  • Must be a String

ssh_key[key]
required

Public SSH key

Validations:

  • Must be a String