Introductory UCS Director REST API, Custom Tasks and Workflow Creation Part II Cisco DevNet Learning Labs
Cisco UCS Director is a complete, highly secure, end-to-end management, orchestration, and automation solution for a wide array of Cisco and non-Cisco data center infrastructure components, and for the industry's leading converged infrastructure solutions based on the Cisco UCS and Cisco Nexus platforms. For a complete list of supported infrastructure components and solutions, see the Cisco UCS Director Compatibility Matrix.
Cisco UCS Director is a 64-bit appliance that uses the following standard templates:
- Open Virtualization Format (OVF) for VMware vSphere
- Virtual Hard Disk (VHD) for Microsoft Hyper-V
Cisco UCS Director extends the unification of computing and network layers through Cisco UCS to provide you with comprehensive visibility and management of your data center infrastructure components. You can use Cisco UCS Director to configure, administer, and monitor supported Cisco and non-Cisco components. The tasks you can perform include the following:
- Create, clone, and deploy service profiles and templates for all Cisco UCS servers and compute applications.
- Monitor organizational usage, trends, and capacity across a converged infrastructure on a continuous basis.
- Deploy and add capacity to converged infrastructures in a consistent, repeatable manner.
- Manage, monitor, and report on data center components, such as Cisco UCS domains or Cisco Nexus network devices.
- Extend virtual service catalogs to include services for your physical infrastructure.
- Manage secure multi-tenant environments to accommodate virtualized workloads that run with non-virtualized workloads.
The objective of this introductory UCS Director REST API learning Lab is to explore the developer resources within UCS Director GUI, specifically the REST API Browser. The REST API Browser is an invaluable aid in development that can be used as an API reference and for testing.
Completion time: 30 minutes
Prior to starting this learning lab it would be helpful to understand UCS Director and the functionality that it provides.
An understanding of REST APIs and the utilization of Postman REST client, would also be helpful.
UCS Director REST API
Cisco UCS Director REST API is a language-independent interface that can be used by any program or script capable of making HTTP or HTTPS requests. Use the REST API when you want to invoke operations on Cisco UCS Director from a separate program or process.
Applications can use the REST API to do the following:
- Retrieve Cisco UCS Director reports on physical and virtual devices, networks, appliances, groups and users, policies, resource accounting, funds, and other monitored entities within your Cisco UCS domains.
- Invoke Cisco UCS Director Orchestrator workflow and task operations.
- Invoke additional operations specific to Cisco UCS Director.
UCS Director REST API Documentation
There are several programmatic interfaces available for UCS Director this lab focuses on the REST API interface, download the Cisco UCS Director REST API Getting Started Guide for more detailed information.
When you're ready for the next level be sure to download the UCS Director REST API Cookbook
The UCS Director REST API Browser is available only when the "Enable Developer Menu" checkbox on the "Advanced" tab is checked in the user profile. Please refer to Exercise 1 in ucsd-rest-api-101 lab.
click on the "Policies" menu then click on "Orchestration". On the resulting screen there is a tab "REST API Browser". click on the "REST API Browser" tab if it is not already the current tab.
Type "user" into the filter field on the right hand side just above the Description column heading. The display should update to show an expanded "User and Group Tasks". double-click on the task with the "ID" user@READ
The "API Examples" tab shows the REST API resource URL for UCS Director Users.
clicking the Execute REST API button will issue a GET for the resource URL
/cloupia/api-v2/user, resulting in output in XML format of all the users of UCS Director.
The Resource URL can be modified to retrieve a single user by specifying the user id at the end of the URL.
Change the resource URL to look as follows
Then click the Execute REST API button to retrieve just a single user.
Now only the admin user information is displayed.
This is the end of Exercise 1
View the other tabs in the REST API Browser.
click on the "Details" tab.
The "Details" tab provides
- API Definition
- Input Parameters Definition
- Output Parameters Definition
click on the "Sample Java Code" tab.
This tab displays the Java code that would be utilized to make the same REST API call in Java.
click the Close button to close the dialog.
This is the end of Exercise 2.