5.2. List User SSH Keys

Description

Get a list of SSH keys for an OpenShift user.

Method and URL Structure

Method Resource URL
GET /broker/rest/user/keys

Request Parameters

Not applicable

cURL Command Example

$ curl -X GET https://openshift.redhat.com/broker/rest/user/keys --user user@example.com:password

JSON Response

The API returns the key resource. Unnecessary information and related resource links returned by the API have been removed for brevity. See Chapter 5, SSH Keys for more information on all SSH key parameters.

{
    "api_version": 1.6,
    "data": [
        {
            "content": "AAAAB3NzaC1yc2gyiketIwAAAQEA3DyqVJYGQRvbyc9TZAumxU3C5v2cBF5YCJMRobDpXWAdG6Ls4pWpk/10CwiJDQcWa8Oeq3HajnAJfalz8rGXXHp9UA9YNp4vrzYDgLkCzS5jHJzMIu7aIJS6WrFB1i1nZwnIyfthyBmSX8C8bWK3+FeZYqwmXy++t4uoZIYJ5RTffW8/1w3sgt47juikR6qzzSDh1Bks+GW5i1FxQD7PeuIZFJlAJyJLtiAPfbazX3YrroiPRL9YnB/QTpLg2jGeTtlC2UPhofbwMqAqaVpjCShHTZRW+aPGGB95BuwZMzOR2huioplkVRE7uhLsn3kFrsUBtu0SzPSSZ5fUQjeMUQ==",
            "name": "default",
            "type": "ssh-rsa"
        }
    ],
    "messages": [
        {
            "exit_code": 0,
            "field": null,
            "severity": "info",
            "text": "Found 1 ssh keys"
        }
    ],
    "status": "ok",
    "supported_api_versions": [
	    1.0,
	    1.1,
	    1.2,
	    1.3,  
	    1.4,
	    1.5,
	    1.6
	  ],
	  "type": "keys",
	  "version": "1.6"
}