View Selected SSH Keys' Summaries
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/MySQLCS/credentials/crednames
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
-
identityDomainId: string
Name of the identity domain for the MySQL Cloud Service account.
-
credname(optional): string
The only supported credential name value is 'vmspublickey', which is used by default.
-
limitRowCount(optional): string
The maximum number of SSH keys to include in the response. If omitted, a maximum of 50 keys are included in the response.
-
offset(optional): string
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.
-
serviceName(optional): string
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.
-
X-ID-TENANT-NAME: string
Name of the identity domain for the MySQL Cloud Service account.
Response
- application/json
200 Response
object
-
hasMore(optional):
boolean
Flag that specifies whether the list returned by the query is full (
false
) or partial (true
).When the list is partial, use the
offset
query parameter to fetch additional results. By default,offset
is 0 (zero) andlimitRowCount
is 50. -
items(optional):
array items
General information for each SSH key.
-
totalResults(optional):
integer
Number of results returned by the query.
array
-
[0]:
object ssh-key-description-item
The details of one SSH key.
object
-
canonicalUrl(optional):
string
URL to query the SSH key value.
-
credName(optional):
string
Credential name. The only supported credential name is
vmspublickey
. -
credType(optional):
string
Credential type. The only supported value is
SSH
. -
description(optional):
string
Credential description of the credential name.
-
identityDomain(optional):
string
Identity domain ID for the Oracle MySQL Cloud Service account.
-
serviceName(optional):
string
Name of the Oracle MySQL Cloud Service instance.
-
serviceType(optional):
string
Cloud service type. This value is
MySQLCS
for Oracle MySQL Cloud Service.
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 }