Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Children Display
alltrue
styleh3
pageSuperb Cloud API

GET /settings/ssh_keys

Gets all ssh keys associated with current account

Sections:

Table of Contents
maxLevel4
minLevel2
includeResponse.*|JSON.*|XML.*|Explanation.*

Response Parameters

ssh_key – an array which displays the key info

id – the SSH key ID

user_id – ID of the user to whom the key belongs

key – SSH key

JSON Request example

Code Block
languagebash
themeRDark
curl -i -X GET -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url  <api_url>/settings/ssh_keys.json

JSON Response

Code Block
 [
    {
        "ssh_key": {
            "created_at": "2015-10-16T22:48:04+00:00",
            "id": 4,
            "key": "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAoBx7WYEVrzPxYdf99p2xSon2x9hfW/cVgi2+Q1ijpSyzb/oPHmE/3ae23k0oOGEt6zxBLRrpig/oY8YHj7MZSZ/rY3n43iYrMpTVYkqB/f+Tww0t9ozdmWfo0kgItyOO6Psel2x28X0847XAZ++nKFKXxGRlXOf8+o3wXvIb7YWuTN/m1AP8Deh5RsY/Xqf6V0y7OMc3/ndVGaWrp9HxfPMLrZFK/cCBhwCkUlAyXbYg9W3kmBEKCrvU1yv9qJr4i61iB8KNeYKpce/CpKri5Ln4peQXtlj5fsLZsuBUKFJb7Dr5DxiVugE+B1RTD4JmBIXSwb7uFt7vwd6P107ztQ== rsa-key-20151016",
            "updated_at": "2015-10-16T22:48:04+00:00",
            "user_id": 13
        }
    }
]

XML Request example

Code Block
languagebash
themeRDark
 curl -i -X GET -H 'Accept: application/json' -H 'Content-type: application/json' -u user:userpass --url  <api_url>/settings/ssh_keys.json

XML Response example

Code Block
languagexml
<?xml version="1.0" encoding="UTF-8"?>
<ssh_keys type="array">
<ssh_key>
<created_at type="datetime">2011-09-13T16:10:02Z</created_at>
<updated_at type="datetime">2011-09-13T16:10:02Z</updated_at>
<id type="integer">3</id>
<user_id type="integer">1</user_id>
<key>ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAqzsLk+oPP9Qxz0Xgpqoe9DqNV7Qe3+oig/o6Ubt30Yh+Zarf8NXctqqeamC1KrlMt12d0AWd38dZ0CU6Eru/2ciwzz2IB0MLrTyjfLCNe2CW64uNjhSS1SH6gSjJUYwHSi7jUBl0vlGtJ7jswBdhgaKkjk1vXH3YFLTHPuKU+pc=user@onapp.test
</key>
</ssh_key>
</ssh_keys>