View Selected SSH Keys' Details

get

/paas/api/v1.1/instancemgmt/{identityDomainId}/services/MySQLCS/credentials

Returns detailed information about SSH keys for one or more MySQL Cloud Service instances as determined by the query parameters you provide.

By default, a single request returns a maximum of 50 keys. Use the serviceName query parameter to limit the results to a single service, use the limitRowCount query parameter to control maximum number returned, and use the offset query parameter to fetch additional results, if available. All query parameters are optional.

Request

Path Parameters
Query Parameters
  • The only supported credential name value is 'vmspublickey', which is used by default.
  • Name of a MySQL Cloud Service instance. The response is limited to credentials for this service instance. If omitted, credentials for all MySQL Cloud Service instances in the identity domain are returned.
Header Parameters

Response

Supported Media Types

200 Response

OK. See Status Codes for information about other possible HTTP status codes.
Body ()
The response body contains details about one or more SSH keys.
Root Schema : ssh-get-key-response
Type: object
The response body contains details about one or more SSH keys.
Show Source
  • Indicates whether more keys are available to be requested, with the value true indicating that more are available.

    When true, use the offset query parameter to fetch additional results. By default, offset is 0 (zero) and limitRowCount is 50.
  • items
    Array of JSON objects, with one element containing SSH key details for each key returned.
  • Number of SSH keys returned by this request.
Nested Schema : items
Type: array
Array of JSON objects, with one element containing SSH key details for each key returned.
Show Source
Nested Schema : ssh-get-key-items
Type: object
The details of one SSH key.
Show Source

Examples

The following example shows how to view detailed information about the SSH public keys for one MySQL Cloud Service instance in the identity domain by submitting a GET request on the REST endpoint using cURL.

Note: The command in this example uses the URL structure https://rest_server_url/resource-path, where rest_server_url is the Oracle Public Cloud or Oracle Cloud Machine REST server to contact for your identity domain or tenant name. See Send Requests for the appropriate URL structure to use on Oracle Public Cloud or Oracle Cloud Machine.

cURL Command

This example retrieves SSH key details for a MySQL Cloud service named SomeInstance in the ExampleIdentityDomain identity domain by defining the optional serviceName query parameter. The optional credname, limitRowCount, and offset query parameters are not used in this example.

curl -i -X GET \
  -u "username:password" \
  -H "X-ID-TENANT-NAME: ExampleIdentityDomain" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/MySQLCS/credentials?serviceName=SomeInstance

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Date: Wed, 30 Nov 2016 23:19:45 GMT
Transfer-Encoding: chunked
Content-Type: application/json
X-ORACLE-DMS-ECID: c80e846d30-19c-08e6bd-d3847-2106b3216977-e3d8
X-Frame-Options: DENY
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS, HEAD
Access-Control-Allow-Headers: Content-Type, api_key, Authorization
Access-Control-Allow-Origin: *

Example of Response Body

The following shows an example of the response body in JSON format.

{
    "items": [
        {
            "identityDomain": "ExampleIdentityDomain",
            "serviceType": "MySQLCS",
            "serviceName": "SomeInstance",
            "credName": "vmspublickey",
            "credType": "SSH",
            "parentType": "SERVICE",
            "lastUpdateTime": "2016-11-30T22:54:29.948+0000",
            "lastUpdateStatus": "success",
            "lastUpdateMessage": "newly created",
            "osUserName": "opc",
            "computeKeyName": "\/mysql\/foo\/paas.MySQLCS.SomeInstance.ora_opc__vm_user_ssh_cred_",
            "publicKey": "ssh-rsa SSH KEY INFO HERE WAS REMOVED FROM THIS EXAMPLE ...",
            "description": "Service user ssh public key which can be used to access the service VM instances",
            "serviceState": "RUNNING"
        }
    ],
    "hasMore": false,
    "totalResults": 1
}