7.1
Table Of Contents
- Developing a Web Services Client for VMware vRealize Orchestrator
- Contents
- Developing a Web Services Client for VMware vRealize Orchestrator
- Updated Information
- Developing a Web Services Client
- Using the vRealize Orchestrator REST API
- Authenticating Against Orchestrator and Third-Party Systems
- Accessing the Reference Documentation for the Orchestrator REST API
- Using the Java REST SDK
- Operations with Workflows
- Working with Tasks
- Finding Objects in the Orchestrator Inventory
- Importing and Exporting Orchestrator Objects
- Deleting Orchestrator Objects
- Setting Permissions on Orchestrator Objects
- REST API Permissions
- Retrieve the Permissions of a Workflow
- Delete the Permissions of a Workflow
- Set the Permissions for a Workflow
- Retrieve the Permissions of an Action
- Delete the Permissions of an Action
- Set the Permissions for an Action
- Retrieve the Permissions of a Package
- Delete the Permissions of a Package
- Set the Permissions for a Package
- Retrieve the Permissions of a Resource
- Delete the Permissions of a Resource
- Set the Permissions for a Resource
- Retrieve the Permissions of a Configuration Element
- Delete the Permissions of a Configuration Element
- Set the Permissions for a Configuration Element
- Performing Operations with Plug-Ins
- Performing Server Configuration Operations
- Performing Tagging Operations
- Index
Procedure
1 Make a GET request at the URL of the solution user name of Orchestrator:
GET https://{orchestrator_host}:{port}/vco/api/users/
2 Provide your principal holder-of-key token in the Authorization header of the request.
The <user solution-user="OrchestratorSolutionUserName"/> element of the response contains the solution
user name of Orchestrator. The following is an example of a solution user name of Orchestrator.
<user xmlns="http://www.vmware.com/vco" solution-user="Orchestrator-133acc26ff78e5695b102146326"
admin-rights="true"/>
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 congured with LDAP, or if you
use the Orchestrator server to access a third-party system that is congured 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 congured 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://orchestrator-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 hps://orchestrator_host: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.
Developing a Web Services Client for VMware vRealize Orchestrator
14 VMware, Inc.