5.3. Get SSH Key Information

Description

View the contents of an SSH key.

Method and URL Structure

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

Request Parameters

Not applicable

cURL Command Example

$ curl -X GET https://openshift.redhat.com/broker/rest/user/keys/mysshkey --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": "AAAAB3NzaC1yc2EAAAADAQABAAABAQDBJHobjmzxy8cv9A1xw9X5TlnQd0bW/19FwOC0c6jPNu9ZbtWQcAE0xfODl7ZqVPPU2qAFOh4rbL3gL2UzTyA+NwERyDrH7tMXAoXPT2L6sqExl0xxuEvb/lXUfLquMq+BMOFxxqCEg8X7GavHN72FMUHwweNybE7C82So+OFSWqFoctiWMNdNsKW4lvBd/jkIudGdRdK+/PzV75TW1LcpfsBrFOJZbd5WzDJEPNdMqOH68YDExD82VtzeJm0HEavhMY9HtxIDEmjIhtfedzCGZLe+6OxReuatw6M+n1sFxT9liprZ6NIANvbnYZKGT50hYfnIi/hZOTCvqYNS97O3",
    "name": "mysshkey",
    "type": "ssh-rsa"
  },
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "severity": "info",
      "text": "Found SSH key 'mysshkey'"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
      1.0,
      1.1,
      1.2,
      1.3,  
      1.4,
      1.5,
      1.6
  ],
  "type": "key",
  "version": "1.6"
}