GET /api/users/:user_id/ssh_keys
List all SSH keys for a user

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

user_id
required

ID of the user

Validations:

  • String

search
optional

filter results

Validations:

  • String

order
optional

Sort and order by a searchable field, e.g. ‘

Maruku could not parse this XML/HTML: 
<field> DESC'

Validations:

  • String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return, ‘all’ to return all results

Validations:

  • Must match regular expression /\A([1-9]\d|all)\Z$/.

Search fields

Field name Type Possible values
id integer
name string
user_id integer

GET /api/users/:user_id/ssh_keys/:id
Show an SSH key from a user

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

user_id
required

ID of the user

Validations:

  • String


POST /api/users/:user_id/ssh_keys
Add an SSH key for a user

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

user_id
required

ID of the user

Validations:

  • String

ssh_key
required

Validations:

  • Hash

ssh_key[name]
required

Validations:

  • String

ssh_key[key]
required

Public SSH key

Validations:

  • String


DELETE /api/users/:user_id/ssh_keys/:id
Delete an SSH key for a user

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
optional

Set the current organization context for the request

Validations:

  • Integer

id
required

Validations:

  • String

user_id
required

ID of the user

Validations:

  • String