Retrieve the SSH Key Description Using Query Parameters
/paas/api/v1.1/instancemgmt/{identityDomainId}/services/jaas/credentials/crednames
- Use the
?credname
query parameter to retrieve results for a given credential name. - Use the
?serviceName
query parameter to retrieve results for a given Oracle Java Cloud Service instance.
Note the following:
- By default, 50 keys are returned by a given query. Use the
?limitRowCount
query parameter to control the page size (number of results returned in a single request). - Use the
?offset
query parameter to fetch additional results, if available. By default,offset
is 0 (zero).
Request
-
identityDomainId: string
Identity domain ID for the Oracle Java Cloud Service account.
-
credname(optional): string
Unique credential name.
Note:
vmspublickey
is the only supported credential name. This is the default if a credential name is not supplied. -
serviceName(optional): string
Name of the Oracle Java Cloud Service instance. If a service name is not supplied, the request will return all service instances for the given identity domain ID.
-
Authorization: string
Base64 encoded user name and password separated by a colon or OAuth access token obtained from Oracle Identity Cloud Service. See Authenticate.
-
X-ID-TENANT-NAME: string
Identity domain ID for the Oracle Java Cloud Service account.
Response
- application/json
200 Response
The response body contains general information about one or more SSH keys (including their descriptions).
See Status Codes for information about other possible HTTP status codes.
object
-
canonicalUrl(optional):
string
URL to query the credential key value.
-
credName(optional):
string
Credential name. Currently, the only supported credential name is
vmspublickey
. -
credType(optional):
string
Credential type. Only supported value is
SSH
. -
description(optional):
string
Credential description of the given credential name.
-
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. -
identityDomain(optional):
string
Identity domain ID for the Oracle Java Cloud Service account.
-
items(optional):
string
Groups credential description details returned by the query.
-
serviceName(optional):
string
Name of the Oracle Java Cloud Service instance.
-
serviceType(optional):
string
Cloud service type. Valid value is
jaas
for Oracle Java Cloud Service. -
totalResults(optional):
integer
Number of results returned by the query.
Examples
The following example shows how to retrieve SSH key descriptions by using query parameters in a GET request on the REST resource using cURL.
-
Currently, the only supported credential name is
vmspublickey
. -
The command in this example uses the URL structure
https://rest_server_url/resource-path
, whererest_server_url
is the REST server to contact for your identity domain (or Cloud Account). See Send Requests.
cURL Command
curl -i -X GET -u username:password -H "X-ID-TENANT-NAME:ExampleIdentityDomain" "https://rest_server_url/paas/api/v1.1/instancemgmt/ExampleIdentityDomain/services/jaas/credentials/crednames?credname=vmspublickey&serviceName=ExampleInstance"
Example of Response Header
The following shows an example of the response header.
HTTP/1.1 200 OK
Date: Tue, 30 Aug 2016 02:09:24 GMT
Transfer-Encoding: chunked
Content-Type: application/json
Example of Response Body
The following example shows the response returned in JSON format for a given credential name and service name.
{
"items":[
{
"identityDomain":"ExampleIdentityDomain",
"serviceType":"jaas",
"serviceName":"ExampleInstance",
"credName":"vmspublickey",
"credType":"SSH",
"description":"Service user ssh public key which can be used to access the service VM instances",
"canonicalUrl":"https:\/\/rest_server_url\/paas\/api\/v1.1\/instancemgmt\/ExampleIdentityDomain\/service\/jaas\/instances\/ExampleInstance\/credentials\/crednames\/vmspublickey"
}],
"hasMore":false,
"totalResults":1
}