5.5.1

Table Of Contents
What to do next
Use the solution user name of Orchestrator and your principal holder-of-key token to request a delegate
holder-of-key token from the vCenter Single Sign-On Server.
Using LDAP Authentication with the Orchestrator REST API
You must apply the Basic HTTP Authentication scheme if Orchestrator is configured with LDAP, or if you
use the Orchestrator server to access a third-party system that is configured with LDAP.
The Basic HTTP Authentication scheme allows you to authenticate against Orchestrator or a third-party
system by including an Authorization header in the API calls that you make. You must provide base64-
encoded credentials in the Authorization header. Orchestrator uses the same credentials to authenticate on
your behalf against third-party systems that are configured with LDAP.
For details about the Basic HTTP Authentication, see RFC 2617.
Example: Obtain a Session in LDAP Mode
The following example code obtains a session in LDAP mode.
URI uri = URI.create("https://vco-server:8283/vco/api");
VcoSessionFactory sessionFactory = new DefaultVcoSessionFactory(uri);
//provide LDAP credentials
Authentication auth = new UsernamePasswordAuthentication("username", "password");
VcoSession session = sessionFactory.newSession(auth);
//use session here
Accessing the Reference Documentation for the Orchestrator REST
API
The reference documentation for the Orchestrator REST API contains information about the RESTful Web
services of the API, the data model that is applicable for the API, the response codes that are valid for the
API, code examples, and so on.
The reference documentation of the Orchestrator REST API is installed together with Orchestrator. The
reference documentation is available at https://vcoHost:port/vco/api/docs/.
Using the Java REST SDK
You can use a Java SDK library to call operations on the Orchestrator REST API in Java applications and
work directly with objects.
Every RESTful Web service of the Orchestrator REST SDK has a wrapping Java class with methods that
correspond to the operations that can be run by using the service.
The Java REST SDK is installed together with Orchestrator. The Java client library, reference documentation,
and examples are available at https://vcoHost:port/vco/api/docs/downloads.html.
Example: Run a Workflow and Wait for Its Completion
The following example code runs a workflow and waits for it to complete.
//start a new session to Orchestrator by using specified credentials
VcoSession session = DefaultVcoSessionFactory.newLdapSession(new URI("https://vco-server:
8281/vco/api/"), "username", "password");
Developing a Web Services Client for VMware vCenter Orchestrator
14 VMware, Inc.