Child pages
  • Edit SSH Key
Skip to end of metadata
Go to start of metadata

To edit a SSH key you may use both types of requests:

PUT /users/:user_id/ssh_keys/:id.xml
PUT /users/:user_id/ssh_keys/:id.json

or

PUT /settings/ssh_keys/:id.xml
PUT /settings/ssh_keys/:id.json

XML Request example

curl -X POST -u user:userpass http://onapp.test/users/:user_id/ssh_keys/:id.xml -H 'Accept: application/xml' -H 'Content-type: application/xml' -d'<ssh_key><key> ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAqzsLk+oPP9Qxz0Xgpqoe9DqNV7Qe3+oig/o6Ubt30Yh+Zarf8NXctqqeamC1KrlMt12d0AWd38dZ0CU6Eru/2ciwzz2IB0MLrTyjfLCNe2CW64uNjhSS1SH6gSjJUYwHSi7jUBl0vlGtJ7jswBdhgaKkjk1vXH3YFLTHPuKU+pc= user@onapp.test2</key></ssh_key>' 

JSON Request example

curl -X POST -u user:userpass http://onapp.test/users/:user_id/ssh_keys/:id.json -H 'Accept: application/json' -H 'Content-type: application/json' -d'{"ssh_key":{"key":"ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAqzsLk+oPP9Qxz0Xgpqoe9DqNV7Qe3+oig/o6Ubt30Yh+Zarf8NXctqqeamC1KrlMt12d0AWd38dZ0CU6Eru/2ciwzz2IB0MLrTyjfLCNe2CW64uNjhSS1SH6gSjJUYwHSi7jUBl0vlGtJ7jswBdhgaKkjk1vXH3YFLTHPuKU+pc= user@onapp.test2"}}'
  • No labels