6.2

Table Of Contents
Example: JSON Output
The output returns an empty HTTP response body and the host information and key pair ID in the header
statement.
Location:
https://vcac148-084-241.eng.mycompany.com/iaas-proxy-provider/api/keyPairs/56
Copy the location URL into a text editor for future use.
Query a Key Pair
You can use the REST API to query a key pair that is available for the vRealize Automation tenant
administrator.
Prerequisites
n
Log in to vRealize Automation as a tenant administrator.
n
Verify that the host name and fully qualified domain name of the vRealize Automation instance are
available.
n
If you are not using the API Explorer, verify that you have a valid HTTP bearer token that matches
your login credentials. See Chapter 2 REST API Authentication.
Procedure
u
Use the following sample command to query a key pair.
curl --insecure -H "Accept:application/json"
-H "Authorization: Bearer $token"
https://$host/iaas-proxy-provider/api/keyPairs/26
The following JSON output is returned based on the command input.
{
"id": 26,
"name": "TestKeyPair",
"computeResourceId": "ca4dcca0-85ce-49dd-8371-4ce7c8e2d5e6",
"secretKey": ""
}
Syntax for Querying a Key Pair
You can use the REST API to query a key pair that is available for the vRealize Automation tenant
administrator.
Input
Use the supported input parameters to control the command output.
Programming Guide
VMware, Inc. 322