5.1

Table Of Contents
8 Displaying the Virtual Machine Console on page 37
After a vApp is powered on, you can retrieve a screen ticket from one of its virtual machines. You use
that ticket with the VMRC browser plug-in to gain access to the console of the virtual machine.
9 Delete the vApp on page 38
To delete the vApp, undeploy it and power it off, then use an HTTP DELETE request to delete the vApp
object.
10 Log Out on page 40
To log out and terminate a vCloud API session, delete the Session you created when you logged in.
Logging In
vCloud Director requires API requests to be authenticated. The first step in any RESTful workflow is to obtain
an authentication token.
Every cloud has a login URL that a client can obtain by making an unauthenticated GET request to the
vCloud Director api/versions URL. See “Retrieve the Login URL and List of Supported API Versions,” on
page 43. Because all other vCloud API requests must be authenticated, any vCloud API workflow must begin
with a login request that supplies user credentials in the form that Basic HTTP authentication requires.
For information about how to create a login request and view the response, see “Example: Login Request and
Response,” on page 25.
NOTE This procedure assumes that you are logging in with credentials managed by the vCloud Director
integrated identity provider. Users whose credentials are managed by a SAML identity provider must follow
a different login workflow.
Prerequisites
Verify that the following conditions are met:
n
You are a member of an organization in the cloud, and have permission to create and operate vApps.
n
Your organization contains at least one vDC and one network. For more information about setting up an
organization to support the Hello vCloud workflow, see Chapter 6, “Creating and Managing
Organizations,” on page 129.
n
Your organization contains a catalog in which at least one vApp template is available. For more
information about adding a vApp template to a catalog, see Chapter 4, “Provisioning an Organization,”
on page 55.
Procedure
1 Make an API versions request to vCloud Director to obtain the login URL for the REST API.
2 Use the login URL to create a login session.
POST a request to this URL that includes your username, password, and organization name in a MIME
Base64 encoding. See “Example: Login Request and Response,” on page 25.
3 Examine the response.
The response code indicates whether the request succeeded, or how it failed.
A successful login request returns an authentication token that you can use in subsequent requests. It also
returns a Session element, which contains one or more Link elements, each of which provides a URL that you
can use to explore a subset of objects in the cloud. If you log in as a system administrator or organization
administrator, this list includes multiple links. See “Example: Create a Login Session Using the Integrated
vCloud API Programming Guide
24 VMware, Inc.