7.2

Table Of Contents
n
Verify that the host name and fully qualied domain name of the vRealize Automation instance are
available.
n
Verify that you have a valid HTTP bearer token that matches your login credentials. See Chapter 2,
“REST API Authentication,” on page 9.
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.
Parameters Description
URL hps://$host/iaas-proxy-provider/api/keyPairs/$ids
Method Get
$host Species the host name and fully qualied domain name or
IP address of the vRealize Automation identity server.
$token Species a valid HTTP bearer token with necessary
credentials.
$id: Species the unique identier of the key pair.
Output
The command output contains property names and values based on the command input parameters.
Parameters Description
$id: Species the unique identier of the key pair.
$name: Species the name of the key pair.
$computeResourceId: Species the compute resource ID that is binded to the key
pair.
$secretKey: Species the secret key for the key pair.
Example: curl Command
curl --insecure -H "Accept:application/json"
-H "Authorization: Bearer $token"
https://$host/iaas-proxy-provider/api/keyPairs/26
Programming Guide
282 VMware, Inc.