View Selected SSH Keys' Summaries

get

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

Returns summary 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.
  • The maximum number of SSH keys to include in the response. If omitted, a maximum of 50 keys are included in the response.
  • The number of SSH keys to skip before starting to collect keys for the response. If omitted, zero keys are skipped so that the response begins with the first key.
  • 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 general information about one or more SSH keys (including their descriptions).
Root Schema : ssh-get-key-description-response
Type: object
The response body contains general information about one or more SSH keys (including their descriptions).
Show Source
Nested Schema : items
Type: array
General information for each SSH key.
Show Source
Nested Schema : ssh-key-description-item
Type: object
The details of one SSH key.
Show Source

Examples

The following example shows how to view summary information about the SSH public keys for all MySQL Cloud Service instances 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 all configured SSH keys for all MySQL Cloud services in the ExampleIdentityDomain identity domain. The optional credname, serviceName, limitRowCount, and offset query parameters are not used.

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

Example of Response Header

The following shows an example of the response header.

HTTP/1.1 200 OK
Server: Oracle-Application-Server-11g
X-ORACLE-DMS-ECID: v10507TtNc6HiHFF70F009g0GpB0R0dub0
X-ORACLE-DMS-ECID: v10507TtNc6HiHFF70F009g0GpB0R0dub0
X-Frame-Options: DENY
Content-Language: en
Content-Type: application/json
Vary: user-agent
Date: Wed, 26 Oct 2016 00:43:04 GMT
Content-Length: 443
Connection: keep-alive

Example of Response Body

This example response body shows that the ExampleIdentityDomain identity domain has two MySQL Cloud services, and each service defines an SSH credential named vmspublickey.

{
    "items": [
        {
            "identityDomain": "ExampleIdentityDomain",
            "serviceType": "MySQLCS",
            "serviceName": "MyTestInstance",
            "credName": "vmspublickey",
            "credType": "SSH",
            "description": "Service user ssh public key which can be used to access the service VM instances",
            "canonicalUrl": "https:\/\/server_url:443\/paas\/api\/v1.1\/instancemgmt\/ExampleIdentityDomain\/service\/MySQLCS\/instances\/MyTestInstance\/credentials\/crednames\/vmspublickey"
        },
        {
            "identityDomain": "ExampleIdentityDomain",
            "serviceType": "MySQLCS",
            "serviceName": "AnotherMyTestInstance",
            "credName": "vmspublickey",
            "credType": "SSH",
            "description": "Service user ssh public key which can be used to access the service VM instances",
            "canonicalUrl": "https:\/\/server_url:443\/paas\/api\/v1.1\/instancemgmt\/ExampleIdentityDomain\/service\/MySQLCS\/instances\/AnotherMyTestInstance\/credentials\/crednames\/vmspublickey"
        }
    ],
    "hasMore": false,
    "totalResults": 2
}