PDF

Cisco Virtual Application Cloud
Segmentation Services REST API Guide,
Release 5.4STV2.1.1
First Published: 2016-02-15
Last Updated: 2016-02-15
Cisco Systems, Inc.
1
www.cisco.com
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Overview
Contents
Overview ............................................................................................................................................................................ 9
About the Cisco VACS REST API ..................................................................................................................................... 9
Access Privileges ............................................................................................................................................................ 9
Supported Protocols and Formats ................................................................................................................................. 9
Recommended Tools ................................................................................................................................................... 10
Poodle Vulnerability .................................................................................................................................................... 10
Getting Started ................................................................................................................................................................ 11
About the API Access Key ............................................................................................................................................ 11
Generating an API Access Key...................................................................................................................................... 11
Enabling the Developer Menu Options ....................................................................................................................... 11
Using the REST API Browser......................................................................................................................................... 12
Prerequisites ............................................................................................................................................................ 12
Accessing the Report Metadata................................................................................................................................... 13
Prerequisites ............................................................................................................................................................ 13
Request Format ........................................................................................................................................................... 13
Response Format ......................................................................................................................................................... 15
REST Tools ........................................................................................................................................................................ 17
REST API Browser ......................................................................................................................................................... 17
Usage Example: Retrieving the VM Summary ......................................................................................................... 17
Usage Example: Creating a Group ........................................................................................................................... 18
Usage Example: Sample Java Code .......................................................................................................................... 20
REST API SDK Bundle .................................................................................................................................................... 21
About the REST API Operations ....................................................................................................................................... 22
Cisco UCS Director API Operations .................................................................................................................................. 23
Login Operation ........................................................................................................................................................... 23
userAPIGetUserLoginProfile .................................................................................................................................... 23
Values Fetch Operations .............................................................................................................................................. 23
userAPIGetLOVValue ............................................................................................................................................... 23
userAPIGetTabularValue .......................................................................................................................................... 23
User Account Operations ............................................................................................................................................. 24
userAPIAddUser ....................................................................................................................................................... 24
2
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Overview
userAPIOnBoarding .................................................................................................................................................. 24
userAPIUpdateUser ................................................................................................................................................. 24
userAPIDeleteUser ................................................................................................................................................... 25
userAPIResetMyPassword ....................................................................................................................................... 25
userAPIResetUserPassword ..................................................................................................................................... 26
userAPIVerifyUser .................................................................................................................................................... 26
userAPIGetRESTAccessKey....................................................................................................................................... 27
userAPIIsMspMode .................................................................................................................................................. 27
Group Operations ........................................................................................................................................................ 28
userAPICreateGroup ................................................................................................................................................ 28
userAPIAddGroup .................................................................................................................................................... 28
userAPIGetGroups ................................................................................................................................................... 29
userAPIGetGroupById .............................................................................................................................................. 29
userAPIGetGroupByName ....................................................................................................................................... 29
userAPIUpdateGroup ............................................................................................................................................... 30
userAPIDeleteGroup ................................................................................................................................................ 30
Account Operations ..................................................................................................................................................... 31
userAPICreateInfraAccount ..................................................................................................................................... 31
userAPIUpdateInfraAccount .................................................................................................................................... 32
userAPIGetAllAccounts ............................................................................................................................................ 33
userAPIGetAllPhysicalInfraAccounts ....................................................................................................................... 33
userAPIGetAccountTypeEntryByName .................................................................................................................... 33
userAPIGetAccountTypeByName ............................................................................................................................ 33
userAPIDeleteInfraAccount ..................................................................................................................................... 34
Report Operations ....................................................................................................................................................... 35
userAPIGetAvailableReports .................................................................................................................................... 35
userAPIGetTabularReports ...................................................................................................................................... 35
userAPIFilterTabularReport ..................................................................................................................................... 35
userAPIGetHistoricalReport ..................................................................................................................................... 36
userAPIGetInstantDataReport ................................................................................................................................. 36
userAPIGetTabularReportWithMetaData................................................................................................................ 36
Approval Operations .................................................................................................................................................... 36
userAPIGetMyApprovalList ...................................................................................................................................... 36
3
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Overview
userAPIUpdateMyApproval ..................................................................................................................................... 37
Catalog Operations .......................................................................................................................................................... 38
userAPICreateCatalogItem .......................................................................................................................................... 38
userAPIGetAllCatalogs ............................................................................................................................................. 38
userAPIGetCatalogsPerGroup .................................................................................................................................. 38
userAPIGetAllCatalogs ............................................................................................................................................. 38
Chargeback Operations ............................................................................................................................................... 40
userAPIChargebackDetails ....................................................................................................................................... 40
Funds Operations ......................................................................................................................................................... 40
userAPICheckFunds.................................................................................................................................................. 40
Inventory (Cloud) Operations ...................................................................................................................................... 41
userAPIRequestInventoryCollection ........................................................................................................................ 41
LOV Provider Operations ............................................................................................................................................. 41
userAPIgetStaticListByName.................................................................................................................................... 41
userAPIgetBMAOSList .............................................................................................................................................. 41
userAPIGetLOVProvidersList .................................................................................................................................... 41
Payment Status Operations ......................................................................................................................................... 43
userAPIUpdatePaymentStatus ................................................................................................................................ 43
Resource Accounting and Limits .................................................................................................................................. 43
userAPIGetResourceAccounting .............................................................................................................................. 43
userAPIGetResourceAccountingDetails ................................................................................................................... 43
userAPIGetResourceLimits ...................................................................................................................................... 44
userAPIGetResourceLimitsForMyGroup .................................................................................................................. 44
Cisco VACS Container Operations ................................................................................................................................ 45
userAPIGetContainerDetails .................................................................................................................................... 45
userAPIGetStaticNAT ............................................................................................................................................... 46
userAPIGetStaticNATPerVM .................................................................................................................................... 47
userAPIVACSSetNat ................................................................................................................................................. 48
userAPIGetERSPAN .................................................................................................................................................. 49
userAPIVACSsetErspan ............................................................................................................................................ 50
userAPIGetERSPANWithVM..................................................................................................................................... 51
userAPIVACSaddVM ................................................................................................................................................. 52
4
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Overview
userAPIVACSdeleteVM ............................................................................................................................................ 53
userAPIVACSPowerOnContainer ............................................................................................................................. 54
userAPIVACSPowerOffContainer ............................................................................................................................. 55
userAPIVACSaddVM(with password sharing options) ............................................................................................. 56
userAPIGetFirewallPolicy ......................................................................................................................................... 57
userAPIVACSManageFirewallPolicyAclRule (Add Firewall Policy) ........................................................................... 58
userAPIVACSManageFirewallPolicy (Update Firewall Policy) .................................................................................. 59
userAPIVACSManageFirewallPolicyAclRule (Delete Firewall Policy) ....................................................................... 61
userAPIGetSLB ......................................................................................................................................................... 63
userAPIGetTemplate ................................................................................................................................................ 64
userAPIVACSCreateContainerRest ........................................................................................................................... 67
userAPIGetZones ..................................................................................................................................................... 85
userAPIGetZonesWithVM ........................................................................................................................................ 86
Service Category Operations ....................................................................................................................................... 88
userAPIGetServiceCategory ..................................................................................................................................... 88
userAPICreateServiceCategory ................................................................................................................................ 88
userAPICloneServiceCategory.................................................................................................................................. 88
userAPIModifyServiceCategory ............................................................................................................................... 88
userAPIDeleteServiceCategory ................................................................................................................................ 89
Service Request Operations ......................................................................................................................................... 89
userAPISubmitServiceRequest ................................................................................................................................. 89
userAPISubmitServiceRequestCustom .................................................................................................................... 90
userAPIResubmitServiceRequest ............................................................................................................................. 90
userAPIGetServiceRequests ..................................................................................................................................... 91
userAPIGetChildServiceRequests............................................................................................................................. 91
userAPIGetServiceRequestDetails ........................................................................................................................... 91
userAPICancelServiceRequest ................................................................................................................................. 91
userAPIGetServiceRequestLogEntries ..................................................................................................................... 92
userAPIGetServiceRequestLogEntriesAtLevels ........................................................................................................ 92
userAPIGetServiceRequestWorkFlow ...................................................................................................................... 92
userAPISubmitVAppServiceRequest ........................................................................................................................ 93
userAPIGetVMsForServiceRequest .......................................................................................................................... 93
userAPISubmitWorkflowServiceRequest ................................................................................................................. 93
5
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Overview
Task Operations ........................................................................................................................................................... 94
VDC Operations............................................................................................................................................................ 94
userAPIGetAllVDCs................................................................................................................................................... 94
userAPICreateVDC ................................................................................................................................................... 94
userAPIExportVDC ................................................................................................................................................... 94
userAPIImportVDC ................................................................................................................................................... 95
VM Operations ............................................................................................................................................................. 95
UserAPIProvisionRequest ........................................................................................................................................ 95
UserAPIProvisionRequestWithPortGroup ............................................................................................................... 96
userAPIGetAllVMs .................................................................................................................................................... 97
userAPIGetVMSummary .......................................................................................................................................... 97
userAPIGetVMsForServiceRequest .......................................................................................................................... 97
userAPIGetVMActionRequests ................................................................................................................................ 98
userAPIGetAvailableVMActions ............................................................................................................................... 98
userAPIExecuteVMAction (for VMware vSphere VMs) ........................................................................................... 99
userAPIExecuteVMAction (for Microsoft Hyper-V VMs) ......................................................................................... 99
userAPIHypervVMProvisioningWithVMNetwork .................................................................................................. 100
userAPIReconfigureVM .......................................................................................................................................... 102
userAPIGetVMActionStatus ................................................................................................................................... 102
userAPISetVMProperties ....................................................................................................................................... 102
userAPIGetVMAccessCredentials .......................................................................................................................... 102
userAPIGetVMSnapshotDetails ............................................................................................................................. 103
userAPICreateVMSnapshot ................................................................................................................................... 103
userAPICheckContextActionStatus ........................................................................................................................ 103
userAPIDeleteCatalogItem..................................................................................................................................... 104
userAPIVMWareProvisionRequest ........................................................................................................................ 104
userAPIVMWareCloneVMProvisionRequest ......................................................................................................... 104
userAPIVMWareMoveVMProvisionRequest ......................................................................................................... 105
userAPIConfigureVMLeaseTime ............................................................................................................................ 105
Workflow Operations ................................................................................................................................................ 106
userAPIGetWorkflows............................................................................................................................................ 106
userAPIGetWorkflowSteps .................................................................................................................................... 106
6
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Overview
userAPIGetWorkflowStatus ................................................................................................................................... 106
userAPIGetWorkflowInputs ................................................................................................................................... 107
userAPIValidateWorkFlow ..................................................................................................................................... 107
userAPISubmitWorkflowServiceRequest ............................................................................................................... 107
userAPIRollbackWorkflow ..................................................................................................................................... 108
userAPIExportWorkflows ....................................................................................................................................... 108
userAPIImportWorkflows ...................................................................................................................................... 108
Activity Operations .................................................................................................................................................... 108
userAPIGetActivity ................................................................................................................................................. 108
userAPICreateActivity ............................................................................................................................................ 109
userAPICloneActivity.............................................................................................................................................. 109
userAPIModifyActivity ........................................................................................................................................... 109
userAPIDeleteActivity ............................................................................................................................................ 109
Tag Operations ........................................................................................................................................................... 110
userAPIGetTagLibrary ............................................................................................................................................ 110
userAPICreateTag .................................................................................................................................................. 110
userAPICloneTag .................................................................................................................................................... 110
userAPIModifyTag .................................................................................................................................................. 111
userAPIDeleteTag .................................................................................................................................................. 111
Resource Group Operations ...................................................................................................................................... 111
userAPIgetResourceGroups ................................................................................................................................... 111
userAPICreateResourceGroup ............................................................................................................................... 111
userAPIModifyResourceGroup .............................................................................................................................. 113
userAPIDeleteResourceGroup ............................................................................................................................... 113
Script Operations ....................................................................................................................................................... 114
userAPIExecuteVIXScript........................................................................................................................................ 114
Understanding Workflows ............................................................................................................................................. 114
Workflow Designer .................................................................................................................................................... 115
Predefined Tasks ........................................................................................................................................................ 116
Predefined Workflows ............................................................................................................................................... 116
Cisco VACS Workflows ............................................................................................................................................... 116
Creating a Workflow .................................................................................................................................................. 116
Adding Tasks to a Workflow ...................................................................................................................................... 117
7
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Overview
Linking Tasks .............................................................................................................................................................. 118
Accessing the Task Documentation ........................................................................................................................... 119
Sample Custom Tasks or Workflows.............................................................................................................................. 119
Adding a Custom Task to an Existing Workflow .................................................................................................... 119
Code Snippets ................................................................................................................................................................ 126
1.
How to get the list of catalog items for a given group? .................................................................................... 128
2.
How to order a Cisco VACS container based on the catalog items? ................................................................. 128
3.
How to view a container details? ...................................................................................................................... 129
4.
How to get the status of a service request? ...................................................................................................... 130
5.
How to execute VM life-cycle operations on a workload VM? ......................................................................... 132
6.
How to get the status of workload VMs? .......................................................................................................... 133
7.
How to get the StaticNAT information for a container? .................................................................................... 134
8.
How to add a workload VM to a container? ...................................................................................................... 135
9.
How to delete a workload VM in a container? .................................................................................................. 137
Obtaining Documentation and Submitting a Service Request ...................................................................................... 138
Related Documentation ................................................................................................................................................. 138
8
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Overview
Overview
This section includes the following topics:





About the Cisco VACS REST API
Access Privileges
Supported Protocols and Formats
Recommended Tools
POODLE Vulnerability
About the Cisco VACS REST API
The Cisco VACS REST API enables you to perform operations on the Cisco UCS Director resources and to integrate
these operations into applications so that they can provide API-supported functionality and features. You can use
applications developed using this REST (Representational State Transfer) API to do the following:

Get Cisco UCS Director reports about physical and virtual devices, networks, appliances, groups and users,
policies, administration, resource accounting, funds, and other monitored entities within your Cisco UCS
Director.

Invoke orchestrator workflow and task operations.

Invoke additional operations specific to Cisco UCS Director.
Access Privileges
With appropriate access privileges, you can use the APIs to get any report made available through Cisco UCS Director.
Access to the API interface is limited to registered user accounts. Secure access is administered through the use of the
REST API Access Key, which is a unique key code assigned to each user account. A user account is administratively
associated with a user type, so this access key determines the user account's level of access to information exposed
through the API.
Different user types have access to different categories of data. A Cisco UCS Director administrator defines the access
rules associated with each user type. For more information on the end-user and administrator user types and the data
accessible to each type of user, see the http://www.cisco.com/c/en/us/support/servers-unified-computing/ucsdirector/products-maintenance-guides-list.html or contact your system administrator. Work with your system
administrator to get the necessary user access privileges for your project.
Supported Protocols and Formats
Cisco VACS REST APIs are compatible with any HTTP or HTTPS browser. The REST APIs use code formatted in JSON
and XML. A Java API is also available.
JSON
Unless otherwise noted, the Cisco UCS Director API documentation refers to REST API request arguments and
responses (payload data) that are encoded in JSON (JavaScript Object Notation) format. For more information, see http:/
/www.json.org or http://en.wikipedia.org/wiki/JSON.
Note
Live and valid Cisco VACS REST API requests and responses in JSON format are provided within Cisco UCS Director.
These provide excellent examples of JSON protocols and formatting. To see this API data, you must first enable the
developer menus and then use the Report Metadata option available on any report in Cisco UCS Director. For more
information, see Enabling the Developer Menu Options.
9
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Overview
XML
For information about using XML-formatted REST API requests, see Using the REST API Browser. This provides
information about using the REST API browser, which is embedded in Cisco UCS Director.
Java
For information about using the Java API, see the Cisco UCS Director REST API Javadocs and the Cisco UCS Director
Open Automation API Javadocs.
Recommended Tools
The Cisco VACS API uses HTTP or HTTPS as communication protocols. Any compatible browser or client with user
account access can be used to submit requests to the Cisco VACS API. Most programming languages have built-in or
open source libraries that provide REST API access and parsing of JSON and XML.
For exploring and testing the APIs, we recommend the following software tools and options:
Developer Menu Options
Cisco UCS Director includes Developer Menu options that include crucial features and tools for developers, such as
Report Metadata and access to the Rest API Browser. To enable these options, see Accessing the Report Metadata.
Mozilla Firefox RESTClient Add-On
RESTClient is a Mozilla FireFox add-on that provides useful options for parsing and viewing API requests and responses.
See https://addons.mozilla.org/en-US/firefox/addon/restclient/?src=ss, but check for more recent releases.
Note
If you are currently logged into Cisco UCS Director with user account credentials that your application will use, you
should be able to use any supported web browser to send API requests and get responses. However, the Mozilla Firefox
RESTClient add-on provides a standalone client that also parses and labels the API data in a useful and informative way.
Cisco UCS Director REST API Browser
The REST API Browser is available in the Orchestration area of Cisco UCS Director. It provides API information and API
code generation capabilities that make it easy to see and work with all of the available APIs, including both the REST
APIs and the Java API.
After you enable the developer menu, you can access this feature and get extensive information about Cisco UCS
Director exposed APIs, including the REST API in XML format and the Java API. For more information, see Using the
REST API Browser.
Poodle Vulnerability
To avoid POODLE vulnerability, SSL Version 2 and SSL Version 3 are disabled on Cisco UCS Director north-bound HTTP
interface by configuring Apache Tomcat to allow only TLS. Hence, any north-bound applications accessing Cisco UCS
Director through REST API will be connected through TLS. Also, the browsers will be connected to Cisco UCS Director
through TLS. For more information, refer http://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/ciscosa-20141015-poodle.
10
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Getting Started
Getting Started
This section includes the following topics:






About the API Access Key
Generating and API Access Key
Enabling the Developer Menu Options
Using the REST API Browser
Request Format
Response Format
About the API Access Key
To access Cisco UCS Director through the API interface, you must have a valid Cisco UCS Director user account and an
API access key. The API access key is required for Cisco UCS Director to authenticate API requests. This access key is a
unique security access key code that is associated with a specific valid Cisco UCS Director user account.
To authenticate API requests, all Cisco UCS Director APIs require the API access key for authentication. You must pass
the REST API access key as a name:value header following standard HTTP syntax and semantic rules. For example, a
valid name:value header is X-Cloupia-Request-Key: F90ZZF12345678ZZ90Z12ZZ3456FZ789. For more information
about the API request header, see Request Format and RFC2616 Header Field Definitions.
To provide data security, send all requests over an HTTPs (SSL) connection.
Generating an API Access Key
To generate the API access key, perform the following steps:
______________________________________________________________________________________________
Step 1: In Cisco UCS Director, click your login name in the upper right.
For example, if you log in as admin, Cisco UCS Director displays admin in the upper right.
Step 2 In the User Information dialog box, click the Advanced tab.
Step 3 To copy the value displayed in the REST API Access Key area, click Copy Key Value.
Step 4 Save the access key in a secure location, and use it in the API request header.
For more information about the API request header, see Request Format.
Step 5: If you want to change the API access key, click Regenerate Key.
After you generate a new key, the old key code is retired and you cannot use it.
______________________________________________________________________________________________
Enabling the Developer Menu Options
Cisco UCS Director includes features and capabilities that are intended expressly for developers and engineers. After
you enable the Developer Menu option, you have access to the integrated REST API Browser and Report Metadata
information. These features provide you with site-specific API data and with REST API request code that you can send
through any standard HTTP or HTTPS browser. The HTTP request code provided by the Report Metadata views yields
immediate API service results. Plan to use these options in every situation where you need API information.
Obtain one or more user accounts that provide exactly the same administrative access to data that your application users
will have. Your Cisco UCS Director administrator can explain the data access limitations associated with different
administrator and end-user roles. You may want multiple user accounts to test the user-experiences associated with
different data access and security controls.
The Cisco UCS Director REST API Browser provides API information and API code generation capabilities that make it
easy to see and work with all of the available APIs, including both the REST APIs and the Java APIs.
11
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Getting Started
To enable end menu options, perform the following steps:
_______________________________________________________________________________________________
Step 1: In Cisco UCS Director, click your login name in the upper right.
For example, if you log in as admin, Cisco UCS Director displays admin in the upper right.
Step 2 In the User Information dialog box, click the Advanced tab.
Step 3 Check the Enable Developer Menu (for this session) check box and close the User Information dialog box.
The REST API Browser is activated for the duration of the current session, and the Report Metadata option
becomes available in the report views opened in the session.
Note
The Advanced tab also displays the REST API Access Key code for the account.
Step 4 Close the User Information dialog box.
_______________________________________________________________________________________________
Using the REST API Browser
The Cisco UCS Director REST API Browser provides API information and API code generation capabilities that assist and
educate developers in the use of all available exposed Cisco UCS Director APIs, including the XML-formatted REST API
and the Java API. The primary view lists the Task folders, each of which provides access to the APIs. The task name
effectively supplies the top-level context or category folder under which the APIs are listed. For example, all the APIs
pertaining to NetApp ONTAP tasks and NetApp OnCommand tasks are available inside the folders with these names.
Prerequisites
1.
2.
Obtain one or more user accounts that provide exactly the same administrative access to data that your application users
will have. Your Cisco UCS Director administrator can explain the data access limitations associated with different
administrator and end-user roles. You may want multiple user accounts to test the user-experiences associated with
different data access and security controls.
Enable the developer menu option for the session.
To use the REST API browser, perform the following steps:
Step 1: On the menu bar, choose Policies > Orchestration.
Step 2 Click the REST API Browser tab.
Click the right scroll arrow, if necessary, to navigate to the REST API Browser tab.
Step 3 Open the task folder that contains the APIs you want to view.
Notes:
1. You can use the Search field at the top right corner of the Rest API Browser tab to find a specific API if you
do not know which task folder it belongs in. Enter a string that occurs in the API Resource, Operation or
Description fields to narrow your search. You can also use the other options on that menu bar, such as the
Add Advanced Filter, to help you find a specific API.
2. All Cisco VACS REST APIs are available in the Service Container Tasks group.
Step 4 Double-click a row that contains an API resource and operation that interests you.
The REST API browser displays the following:

API Examples tab Displays the API data for your selection and enables you to generate a sample URL.
Depending on the operation and resource that you selected, this tab might also include data entry
boxes that accept parameter values and enable you to construct a successful API request. If available in
a data entry box, click Select to open data search filters that can help you sort out and select the data
that you need to enter.

Details tab Provides additional details about the API, including the API definition, input parameters, and
output parameters.

Sample Java Code tab Provides sample code for the API.
_________________________________________________________________________________________________
12
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Getting Started
Accessing the Report Metadata
Report Metadata enables you to view the API code used by Cisco UCS Director, including the API request code for every
report displayed in Cisco UCS Director. This code includes complete URL code that is ready to paste into a browser and
send. The immediate API responses provide a trove of information and education for the developer. To see the API
request code, you simply navigate to a report, select Report Metadata, and scroll down through the resulting list to the
API request used to fetch the report.
Prerequisites


Obtain one or more user accounts that provide exactly the same administrative access to data that your application
users will have. Your Cisco UCS Director administrator can explain the data access limitations associated with
different administrator and end-user roles. You may want multiple user accounts in order to test the userexperiences associated with different data access and security controls.
Enable the Developer Menu options for the session.
To access the report metadata, perform the following steps:
_________________________________________________________________________________________________
Step 1: In Cisco UCS Director, navigate to the page for which you want to see the API code.
For example, choose one of the following:

Policies > Orchestrations

Physcial > Storage > Storage_Account >Filers
Step 2: Check Report Metadata.
Step 3: In the Information dialog box, review the sample code.
_________________________________________________________________________________________________
Request Format
API clients can use HTTP or HTTPS to interact with Cisco UCS Director. To pass the REST API access key, each request
must be associated with an http/https header called X-Cloupia-Request-Key with its value set to the current REST API
Access Key. For information about getting and using this key, see Generating an API Access Key.
URL Format
http://SERVER/app/api/rest?formatType=json&opName=operationName&opData=operationData
where SERVER is the IP address or the hostname of the Cisco UCS Director VM, and where opName is the API operation
name associated with the request. For example: userAPIGetMyLoginProfile, or userAPIGetVMActionStatus, and where
opData includes the JSON parameters (the arguments associated with the operation).
Request URL Parameters

formatType The only supported format that is discussed here is JavaScript Object Notation (JSON). Set this
parameter value to json.

opName The operation name associated with the request. A list of operations is provided in About the REST
API Operations.

opData Parameters (or arguments) associated with the operation. Cisco UCS Director uses JSON encoding of
the parameters. If no arguments are required for the operation, use {} as an empty set. Before you send JSON
data in a request, you must apply escape characters as appropriate. For details about encoding the URL, see the
RFC at http://www.ietf.org/rfc/rfc1738.txt.
For more information about JSON syntax and data types, see
https://en.wikipedia.org/wiki/JSON#Data_types.2C_syntax_and_example.
For information about non-JSON formatted API requests, see Using the REST API Browser.
About Operations Data Parameters/Arguments
13
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Getting Started
Because the method and a generic designation of the API resource are communicated through the opName, the
operation parameters must present any arguments that are needed to designate a specific instance of the resource to be
operated upon.
For a list of available API operations and parameter specifications, see About the REST API Operations.
Operations Data Parameter Syntax
The following table shows examples of operations data parameter syntax in JSON format.
If the operation needs the following parameters
(opData)
No parameters
One parameter; integer (for example, 10)
One parameter: string (for example, cloud)
Two parameters: a string and an Integer
Two parameters: a string with null value and an Integer
Three parameters
How to represent in JSON
{}
{param0:10}
{param0:"cloud"}
{param0:"cloud",param1:10}
{param0:null,param1:10}
{param0:"cloud",param1:"cloupia",param2:100}
Operation Data Parameters
",param2:"STORAGE-ACCOUNTS-T51"
Size","value":100},{"name":"Select Group","value":"14"},{"name":"Select
vDC","value":18}]},param2:212}

param0 Name of the workflow being invoked through the REST API.

param1 Input being passed to the workflow. If there are more than one input, separate the inputs by comma and
within the curly braces with proper quotations. If there are no inputs, use null for the API invocation.

param2 If this workflow is being invoked as a child workflow of another service request, use the service request
(SR) ID. If this workflow is not invoked as a child workflow, use -1. When -1 is used, a new service request will be
invoked.
Note: Cisco UCS Director provides many complete API requests, formatted as URLs and ready for you to cut and paste into a
browser. See Enabling the Developer Menu Options.
Context Parameters
In the example above, Param0 is used to specify the Cisco UCS Director context. The context data value refers to one of the
major domains managed by Cisco UCS Director, for example, "global-services", "vm", "vdc", "datacenter",
"storage_accounts", "Compute-chassis", "network-device". A list of the standard Cisco UCS Director contexts appears in
API Request Context Parameters.
Report Parameters
The report parameter value is always the reportId. Typical reportIds include "STORAGE-ACCOUNTS-T51", "CPU-S0",
"VOLUMES--X1", "NETWORK-USAGE-H0", "PORT-SUMMARY-V50", "PRIVATE-CLOUD-FREE-STORAGE-S1". The
reportId is typically the last parameter listed in an API request for a report. So, if the context is specified by two parameters,
the report parameter is often the third, param2. For an extensive list of report names, and reportIds, categorized by context,
see List of Available Cisco UCS Director Reports.
Sample API Request 1
The operation that requests a Login profile refers to the logged in user, so there is no need for a parameter. Most other
operations need multiple arguments.
http://10.10.1.153/app/api/rest?formatType=json&opName=userAPIGetMyLoginProfile&opData={}
14
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Getting Started
{ "serviceResult":{"userId":"jsmith","firstName":"John","lastName":"Smith","email":"[email protected]",
"groupName":"Eng Group","role":"Regular"}, "serviceError":null,
"serviceName":"InfraMgr", "opName":"userAPIGetMyLoginProfile" }
Sample API Request 2
In this request for a report about chassis for a data center, the operation requires three parameters, which is typical for a
report request.
http://172.99.999.142/app/api/rest?opName=userAPIGetTabularReport&opData={param0:"datacenter",
param1:"datacenter",param2:"UCS-CHASSIS-T50"}
{ "serviceResult":
{"rows":[{"ID":"PHY-ACC;sys/chassis-2",
"Account_Name":"PHY-ACC","DN":"sys/chassis-2",
"Serial_Number":"1558","Model":"N20-C6508","Power_State":"ok",
"Operation_State":"accessibility-problem",
"Configuration_State":"ok","License_State":"license-ok","Servers":5,
"IO_Modules":2,"PSUs":4,"Fan_Modules":8,
"Vendor":"Cisco Systems Inc"},{"ID":"UCSCirrus;sys/chassis-1",
"Account_Name":"UCSCirrus","DN":"sys/chassis-1",
"Serial_Number":"FOX1352GDX4","Model":"N20-C6508",
"Power_State":"redundancy-failed","Operation_State":"power-problem",
"Configuration_State":"ok","License_State":"license-ok","Servers":7,
"IO_Modules":2,"PSUs":4,"Fan_Modules":8,
"Vendor":"Cisco Systems Inc"},{"ID":"UCSM237;sys/chassis-1",
"Account_Name":"UCSM237","DN":"sys/chassis-1",
"Serial_Number":"1557","Model":"N20-C6508","Power_State":"ok",
"Operation_State":"operable",
"Configuration_State":"unsupported-connectivity","License_State":"license-ok",
"Servers":6,"IO_Modules":2,
"PSUs":4,"Fan_Modules":8,"Vendor":"Cisco Systems Inc"},
{"ID":"real108;sys/chassis-1","Account_Name":"real108",
"DN":"sys/chassis-1","Serial_Number":"FOX1352GDX4","Model":"N20-C6508",
"Power_State":"redundancy-failed",
"Operation_State":"power-problem","Configuration_State":"ok",
"License_State":"license-ok","Servers":7,
"IO_Modules":2,"PSUs":4,"Fan_Modules":8,"Vendor":"Cisco Systems Inc"}],
"columnMetaData":null}, "serviceError":null, "serviceName":"InfraMgr",
"opName":"userAPIGetTabularReport" }}
Note: For advanced Cisco UCS Director API users, the code in the Report Metadata request for the data center's UCSCHASSIS-T50 report gave the first parameter as param0:"23". In the request used in Sample API Request 2, the context
"datacenter" was substituted for the value "23" and the request was successful. By comparing the API documentation
against the Report Metadata and Cisco UCS Director, you can sometimes discover alpha string value substitutes for the
numeral string values (representing contexts) that appear in the Report Metadata requests.
Response Format
The following HTTP status codes are returned by Cisco UCS Director:

401 Unauthorized The API key is not a valid key.
15
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Getting Started

200 OK Cisco UCS Director has processed the request. The actual status of the request is in the body of the
response.
The Cisco UCS Director response body is in JSON format as determined by the FormatType parameter specified in the API
request.
Components of an API Response
API Response Component
Description
Component Example (Success Scenario)
serviceResult
If the request succeeds, this result
contains a specified set of namevalue pairs or a JSON object or a
report.
serviceError
If the request succeeds, the
serviceError is set to null. If the
operation fails, the serviceError
contains the actual error message.
"serviceResult":
{"userId":"jsmith",
"firstName":"John","lastName":"Smith",
"email":"[email protected]",
groupName":"Eng Group","role":"Regular"}
"serviceError":null
serviceName
Name of the back end service. Often
set to InfraMgr, for example.
"serviceName":"InfraMgr"
opName
Name of the operation provided in
the request.
"opName":"userAPIGetMyLoginProfile"
Example: API Response in a Success Scenario
{
"serviceResult":{"userId":"jsmith","firstName":"John","lastName":"Smith",
"email":"jsmith@example.
com","groupName":"Eng Group","role":"Regular"}, "serviceError":null,
"serviceName":"InfraMgr",
"opName":"userAPIGetMyLoginProfile"
}
Example: API Response in a Failure Scenario
{ "serviceResponse":null,
"serviceError":"SERVICE_CALL_EXCEPTION: Service InfraMgr does not support operation test",
"serviceName":"InfraMgr", "opName":"test"
}
API Response (Service Result) Data Types
The service result (payload) sent in a response to a Cisco VACS REST API request is specified for the operation. The service
result can be an operation-specific set of name-value pairs, or it can be formatted as a standard data type for this API, that
is, as a report or a JSON object.
To see examples of the different report types, see Reports and JSON Object Response Samples.
For information about the most commonly used Cisco UCS Director report formats and their contents, see About Reports.
For a list of available reports and the contexts with which they are associated, see List of Available Cisco UCS Director
Reports.
16
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
REST Tools
For samples of JSON Objects, see JSON Object Parameter Types.
REST Tools
By default, Cisco VACS is enabled to respond to the REST API requests from the appropriate REST clients. Cisco VACS
provides the following entities to aid in the REST API developments:


REST API Browser
REST API SDK Bundle
REST API Browser
The REST API browser available with Cisco UCS Director aids the Developers and QA Engineers to validate the REST
APIs added to the framework.
An administrator or group administration user can launch the REST API Browser. To launch the REST API Browser,
choose Policies > Orchestration > REST API Browser.
The REST API browser groups the APIs based on the tasks needed to manage the respective infrastructure components
of the datacenter.
To view an API, expand a task folder and double-click the report for the respective API. The browser provides the
following tabs for the selected API:
1) API Examples Displays the inputs for user-selection. A Developer can provide his inputs for the respective API as
required and generate a sample URL.
2) Details Defines the syntax and the semantics for the API.
3) Sample Java Code A Java code snippet that demonstrates the use of the API.
Usage Example: Retrieving the VM Summary
1.
From the Cisco UCS Director menu bar, choose Policies > Orchestration > REST API Browser.
2.
Select and double-click the userAPIGetVMSummary API. The following tabs are displayed:
17
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
REST Tools
a.
API Examples
b.
Details
c.
Sample Java Code
3.
Click the Details tab, to view the definition of the userAPIGetVMSummary API. The userAPIGetVMSummary API
takes the vmId as its input.
4.
In the API Examples tab, click Generate URL to get the URL for the REST operation. The vmId must be passed as
the param0, as shown in the following dialog box.
5.
From the UCSD Server drop-down list, choose Cisco UCS Director on which the API is targeted at and click
Execute REST API for a response.
Usage Example: Creating a Group
1.
From the Cisco UCS Director menu bar, choose Policies > Orchestration > REST API Browser.
2.
Select and double-click the userAPIGetVMSummary API. The following tabs are displayed:
3.
a.
API Examples
b.
Details
c.
Sample Java Code
Click the Details tab, to view the definition of the userAPIGetVMSummary API. The userAPIGetVMSummary API
takes the vmId as its input.
18
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
REST Tools
4.
In the API Examples tab, click Generate URL to get the URL for the REST operation. The vmId must be passed as
the param0, as shown in the following dialog box.
5.
From the UCSD Server drop-down list, choose Cisco UCS Director on which the API is targeted at and click
Execute REST API for a response.
Upon clicking Execute REST API, the following screen appears.
6.
Fill in the fields and click Generate XML to generate the sample XML file for group creation.
19
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
REST Tools
7.
From the UCSD Server drop-down list, choose Cisco UCS Director on which the API is targeted at and click
Execute REST API for a response.
Usage Example: Sample Java Code
1.
From the Cisco UCS Director menu bar, choose Policies > Orchestration > REST API Browser.
2.
Select and double-click the userAPIGetVMSummary API. The following tabs are displayed:
a.
API Examples
b.
Details
c.
Sample Java Code
The Sample Java Code tab provides the code snippet that can be used to automate the management services through
code.
The code snippet can be used to execute the respective API. To execute the code in the Eclipse and obtain the output,
you must import the SDK bundle as a Java Project into the Eclipse IDE.
To import the SDK bundle, perform the following steps:
______________________________________________________________________________________________
1. In the Eclipse IDE, choose File > New > Java Project. The Create a Java Project dialog box appears.
2. In the Project Name field, enter a name for the project.
3. Right click the project, and select Import.
4. In the Import dialog box, select Existing projects into Workspace, and then click Next.
5. Click Browse and navigate to the folder where you extracted the SDK Bundle.
20
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
REST Tools
6.
Click Finish.
The Eclipse IDE displays the SDK Bundle project on the Project Explorer tab.
_________________________________________________________________________________________________
REST API SDK Bundle
For more information on the REST API SDK bundle, see the Cisco UCS Director REST
API Developer Guide.
21
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
About the REST API Operations
About the REST API Operations
The catalog of Cisco VACS REST API operations provided in this section can help you determine which operations serve
your needs, and how to work with each operation. You can find examples of the request and response values for an API
operation through the Report Metadata and REST API Browser.
Note:


The operations performed using the GET and PUT method are used primarily for services and provisioning.
The opData of the API request URL, includes the following JSON parameters (the arguments associated with the
operation):
o
param0 Name of the workflow being invoked through the REST API.
o
param1 Input being passed to the workflow. If there are more than one input, separate the inputs by
comma and within the curly braces with proper quotations. If there are no inputs, use null for the API
invocation.
o param2 If this workflow is being invoked as a child workflow of another service request, use the
service request (SR) ID. If this workflow is not invoked as a child workflow, use -1. When -1 is used, a
new service request will be invoked.
22
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Cisco UCS Director API Operations
Cisco UCS Director API Operations
Login Operation
userAPIGetUserLoginProfile
Description
Returns user information for the given user ID.
Parameters
String userId
Return Value Type
APILoginReport
Accessible
Administrator/end user
Note: See also User Account Operations, which include operations for adding users, onboarding, managing passwords,
and profiles.
Values Fetch Operations
userAPIGetLOVValue
Description
Returns a list of possible values for a given workflow input type of embedded list of variables (LOV) (embedded-lov).
When the API is accessed using an end user Rest API key, the data is filtered based on the end user ID.
Parameters
String type Use the userAPIGetWorkflowInputs API to get the input type.
Return Value Type
FormLOVPair
Accessible
Administrator/end user
userAPIGetTabularValue
Description
Returns the possible values for a given workflow input type of table or popup-table in a tabular format. When the API
is accessed using an end user Rest API key, the data is filtered based on the end user ID.
Parameters
String type Use the userAPIGetWorkflowInputs API to get the input type.
Return Value Type
APITabularReport
Accessible
Administrator/end user
23
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Cisco UCS Director API Operations
User Account Operations
userAPIAddUser
Description
Adds a user with the provided information (for example, user ID, password, email).
Parameters

String userId A unique ID of the user.

String password The password of the user.

String firstName The first name of the user.

String lastName The last name of the user.

String email The email address of the user.

String role The role of the user. The user roles include: GroupAdmin, BillingAdmin, Operator, MSPAdmin,
AdminIS, AdminStorage, AdminComputing, AdminNetwork, AdminAllPolicy, Admin for Admin / System Admin,
and Regular for Regular / Service End-User.

String groupName The name of the group to which the user belongs to.
Note: The groupName values must be specified for the following roles: GroupAdmin, MSPAdmin, and Regular for
Regular / Service End-User. The groupName value must be specified as null for the following roles: BillingAdmin,
Operator, Admin for Admin / System Admin, AdminIS, Admincomputing, AdminNetwork, AdminStorage, and
AdminAllPolicy.
Return Value Type
boolean (true when successful)
Accessible
Administrator
userAPIOnBoarding
Description
Creates user, group and VDC with the details provided in the APIUserOnBoardDetails argument.
Parameters
APIUserOnBoardParams inParams
For an example of this JSON object, see JSON Object Parameter Types.
Return Value Type
APIUserOnBoardDetails
For an example of this JSON object, see JSON Object Parameter Types.
Accessible
Administrator/end user
userAPIUpdateUser
Description
Updates the details of a user. The user ID cannot be edited.
Parameters
apiUser APIUSer
The APIUSer includes the following parameters:
24
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Cisco UCS Director API Operations







String loginName The login name of the user.
String firstName The first name of the user.
String lastName The last name of the user.
String email The email address of the user.
String role The role of the user. The user roles include: GroupAdmin, BillingAdmin, Operator, MSPAdmin,
AdminIS, AdminStorage, AdminComputing, AdminNetwork, AdminAllPolicy, Admin for Admin / System Admin,
and Regular for Regular / Service End-User.
String groupName The name of the group to which the user belongs to.
String address The postal address of the user.
Sample
/app/api/rest?formatType=json&opName=userAPIUpdateUser&opData={param0:{"loginName":"TestSDK",
"firstName":"","lastName":"","email":"[email protected]","role":"GroupAdmin","groupName":"Group1",
"address":"sample"}}
Return Value Type
boolean (true when successful)
Accessible
Administrator
userAPIDeleteUser
Description
Deletes the user with the given user ID.
Parameters
String userId
Return Value Type
boolean (true when successful)
Accessible
Administrator
userAPIResetMyPassword
Description
Resets the password of the user account to the new password that is provided in the request.
Parameters
String newPassword
Return Value Type
boolean (true when successful)
Accessible
Administrator/end user
25
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Cisco UCS Director API Operations
userAPIResetUserPassword
Description
Resets the password of a user with the user ID and new password provided.
Parameters

String user ID

String newPassword

boolean resetAPIKey
Note:
If the resetAPIKey is set to true, Cisco UCS Director resets the REST API Key in addition to resetting the password. If set
to false, only the password will be reset, and the REST API key remains unchanged for the given user. The user does not
have to do anything if the resetAPIKey is set to true. You must decide whether to reset the REST API key when the
password is reset.
Return Value Type
boolean (true when successful)
Accessible
Administrator
userAPIVerifyUser
Description
Authenticates the user with the given password.
Parameters

String userId

String passWord
Return Value Type
APILoginProfile
For an example of this JSON object, see JSON Object Parameter Types.
Accessible
Administrator/end user
Note:
See also Login Operations.
26
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Cisco UCS Director API Operations
userAPIGetRESTAccessKey
Description
Returns an API access key for the given user name.
Parameters
String username Name of the user for whom the API access key need to be retrieved.
Return Value Type
String
Accessible
Administrator/end user
userAPIIsMspMode
Description
Returns true if the currently logged in user is in the Management Software Provider (MSP) mode.
Parameters
None
Return Value Type
Boolean
Accessible
Administrator/end user
27
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Cisco UCS Director API Operations
Group Operations
userAPICreateGroup
Description
Creates a group in Cisco UCS Director. The group type is set as 0 for administrator or end user, and as 1 for
Managed Service Provider (MSP) organization user. If the parent group ID is greater than 0, the created group name
is mapped to parent group ID.
Note:
If a group belongs to a parent group or an organization, the parentId and parentGroupName parameters are
mandatory. If the group type is set as 0, the group name and email address are mandatory.
Parameters
apiGroup APIGroup
The APIGroup includes the following parameters:

int groupId

String groupName

String description

int parentGroupId

String emailAddress

String lastName

String firstName

String phoneNumber

String address

int groupType
Return Value Type
Int groupId
Accessible
Administrator
userAPIAddGroup
Description
Adds a group with the specified data (group name, description, names, email).
Parameters

String

String

String

String

String
groupName
description
firstName
lastName
contactEmail
Return Value Type
boolean (true when successful)
Accessible
Administrator
Note:
Many operations are associated with a group value, such as userAPIGetCatalogsPerGroup. For more information, see the
main operation category.
28
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Cisco UCS Director API Operations
userAPIGetGroups
Description
Returns all groups in Cisco UCS Director as a list.
Parameters
None
Return Value Type
List APIGroup
Accessible
Administrator/end user
userAPIGetGroupById
Description
Returns the group details for the given group ID.
Parameters
int groupId ID of the group.
Return Value Type
List APIGroup
Accessible
Administrator/end user
userAPIGetGroupByName
Description
Returns the group details for the given group name.
Parameters
String groupName Name of the group.
Return Value Type
List APIGroup
Accessible
Administrator/end user
29
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Cisco UCS Director API Operations
userAPIUpdateGroup
Description
Updates the details of a group with the given details. The group ID and group name cannot be edited.
Parameters
apiGroup APIGroup
Return Value Type
Boolean
Accessible
Administrator
userAPIDeleteGroup
Description
Deletes a group from Cisco UCS Director based on the given group ID.
Parameters
int groupId
Return Value Type
Boolean
Accessible
Administrator
30
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Cisco UCS Director API Operations
Account Operations
userAPICreateInfraAccount
Description
Creates an infra account.
Note:
When creating an account using the XML-based API, refer to the possible values of the account category and account
type parameters to pass valid values.
Parameters

InfraAccountDetails infraAccountDetails
The InfraAccountDetails includes the following parameters:
o String accountName a unique name that you assign to this account.
o String podName the pod to which this account belongs.
o int accountCategory the category of the account. The possible values of the account category are:
Integer
1
2
3
4
5
o
Account Category
Compute
Storage
Network
Multi-Domain Manager or Others
Cloud
String accountType The type of the account. You need to pass the value within quotes as "11".
The possible values of the account type are:
Integer
2
6
9
10
11
12
14
15
16
17
18
19
20
24
22
23
25
26
27
28
29
30
31
32
Account Type
VMware
HYPERV
REDHAT_KVM
XENDESKTOP
UCSM
NETAPP
NETAPP_DFM
HP
CISCO_CIMC
EMC_VNX
IPMI
LOAD_BALANCERS
EMC_VMAX
EMC_VPLEX
WHIPTAIL
EMC_ISILON
EMC_NEW_VNX
EMC_NEW_VNX_BLOCK
EMC_NEW_VNC_UIFIED
HP_QA
CAT_LDAP
CAT_LDAP_CLEANUP
VCE_VISION_IO
EMC_RECOVERPOINT
31
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Cisco UCS Director API Operations
33
34
35
36
o
o
o
o
o
o
o
o
o
o
UCS_INVICTA_APPLIANCE
UCS_INVICTA_SCALING
EMC_NEW_VNX_BLOCK_HTTP
EMC_VNXE
String deviceCategory The category of the device, including Compute, Storage, and Network.
String description A description of this account.
String contact The email address that you can use to contact the administrator or other person responsible
for this account.
String destinationIPAddress The destination IP address of this account. You need to pass the IP address
within quotes.
String login The login ID that this account will use to access element manager. For instance, the Cisco UCS
Manager account will use this login ID to access Cisco UCS Manager. This username must be a valid
account in Cisco UCS Manager.
String password The password associated with the login ID.
String enablepassword Pass the value as true to enable password for this account.
String protocol The protocol to use to communicate with the account. The possible values are Telnet and
SSH.
int port The port that is used to access the element manager.
infraAccountSupportDetailsInfo Details of the infra account. The infraAccountSupportDetailsInfo includes
the following parameters:

String spAIpAddress The IP address for Storage Processor A of the VNX device.

String spBIpAddress The IP address for Storage Processor B of the VNX device.

String blockAccessUserName The username for block access of the VNX device.

String blockAccessPwd The password for block access of the VNX device.

String sshIpAddress The IP address of the SSH server. You need to pass the IP address within
quotes.

String sshUsername The username that this account will use to access the SSH server.

String sshPassword The password associated with the SSH username.

int sshPort The port used to access the SSH server.

String domain The domain that is associated with the account.

String serviceProvider The name of the service provider associated with this account, if any.
Return Value Type
boolean (true when successful)
Accessible
Administrator
userAPIUpdateInfraAccount
Description
Updates an infra account.
Parameters
InfraAccountDetails infraAccountDetails
Return Value Type
boolean (true when successful)
Accessible
Administrator/End user
32
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Cisco UCS Director API Operations
userAPIGetAllAccounts
Description
Returns the name of all accounts.
Parameters
None
Return Value Type
List as String type
Accessible
Administrator/End user
userAPIGetAllPhysicalInfraAccounts
Description
Returns all physical infra account types.
Parameters
None
Return Value Type
List PhysicalInfraAccount
Accessible
Administrator/End user
userAPIGetAccountTypeEntryByName
Description
Returns the account type entry for the given account name.
Parameters
String Account name
Return Value Type
List AccountTypeEntry
Accessible
Administrator/End user
userAPIGetAccountTypeByName
Description
Displays the account type based on the account name.
Parameters
String Account name
Return Value Type
List as String
Accessible
Administrator/End user
33
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Cisco UCS Director API Operations
userAPIDeleteInfraAccount
Description
Deletes an infra Account.
Parameters
String Account name
Return Value Type
Boolean (true when successful)
Accessible
Administrator/End user
34
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Cisco UCS Director API Operations
Report Operations
userAPIGetAvailableReports
Description
Returns the available reports for a given context.
Parameters

String contextName

String contextValue
Return Value Type
List APIReportDefinition
Accessible
Administrator/end user
userAPIGetTabularReports
Description
Returns a tabular report for a given context and report ID.
Parameters

String contextName

String contextValue

String reportId
Return Value Type
APITabularReport
Accessible
Administrator/end user
userAPIFilterTabularReport
Description
Filters the tabular report based on the given column label and column value. All the rows in the report can be
retrieved by passing empty value (" ") in the column label and column value parameters.
Parameters

String contextName

String contextValue

String reportId

String columnLabel

String cloumnValue
Note:
The columnLabel parameter must be retrieved from the result of the userAPIGetTabularReport API. For filtering
tabular reports of VMs based on VM ID, use VM-ID as columnLabel.
Return Value Type
APITabularReport
Accessible
Administrator/end user
35
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Cisco UCS Director API Operations
userAPIGetHistoricalReport
Description
Returns a tabular report for a given context, report ID, and duration.
Parameters

String

String

String

String
contextName
contextValue
reportId
durationName
Return Value Type
APIHistoricalReport
Accessible
Administrator/end user
userAPIGetInstantDataReport
Description
Returns a snapshot report for a given context and report ID.
Parameters

String contextName

String contextValue

String reportId
Return Value Type
APISnapshotReport
Accessible
Administrator/end user
userAPIGetTabularReportWithMetaData
Description
Provide a report that includes metadata.
Parameters

String contextName

String contextValue

String reportId
Return Value Type
APITabularReport
Accessible
Administrator/end user
Approval Operations
userAPIGetMyApprovalList
Description
36
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Cisco UCS Director API Operations
Returns the approvals list for the logged-in user.
Parameters
None
Return Value Type
APITabularReport
Accessible
Administrator/end user
userAPIUpdateMyApproval
Description
Updates the approval status of the current user, using the provided data.
Parameters

int requestId

int entryId

boolean isApproved

String comments
Return Value Type
boolean (true when successful)
Accessible
Administrator/end user
37
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Catalog Operations
userAPICreateCatalogItem
Description
Creates a catalog item with characteristics defined by the provided data.
Parameters
APICatalogItem item. For an example of this JSON object, see JSON Object Parameter Types.
Return Value Type
boolean (true when successful)
Accessible
Administrator
userAPIGetAllCatalogs
Description
Returns all catalog reports.
Parameters
None
Return Value Type
APITabularReport
Accessible
Administrator/end user
userAPIGetCatalogsPerGroup
Description
Returns the catalogs that are assigned to a given group.
Parameters
String groupName
Return Value Type
APITabularReport
Accessible
Administrator/end user
userAPIGetAllCatalogs
Description
Returns all catalog reports.
Parameters
None
Return Value Type
APITabularReport
Accessible
38
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Administrator/end user
39
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Chargeback Operations
userAPIChargebackDetails
Description
Returns the chargeback details for the logged-in user group.
Parameters
None
Return Value Type
APITabularReport
Accessible
Administrator/end user
Funds Operations
userAPICheckFunds
Description
Returns the available customer's funds.
Note:
From Cisco UCS Director Release 5.x and later releases, deprecated the UserAPICheckFunds API that is available in
the userAPIGlobal folder. To check the available customer funds, use the UserAPICheckFunds API in the
userAPIChargeBack folder.
Parameters
String userID
Return Value Type
Double (available funds)
Accessible
Administrator/end user
Note:
See also Payment Status Operations.
40
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Inventory (Cloud) Operations
userAPIRequestInventoryCollection
Description
Triggers the inventory collection for the specified cloud.
Parameters
String cloudName
Return Value Type
boolean (true when successful)
Accessible
Administrator/end user
LOV Provider Operations
userAPIgetStaticListByName
Description
Returns the elements of a list.
Parameters
Name of the List
Return Value Type
FormLOVPair[]
Accessible
Administrator/End user
userAPIgetBMAOSList
Description
Returns the list of Baremetal Agent OS names.
Parameters
None
Return Value Type
FormLOVPair[]
Accessible
Administrator/End user
userAPIGetLOVProvidersList
Description
Returns the names of the available lists within the system.
Parameters
None
41
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Return Value Type
List<String>
Accessible
Administrator/End user
42
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Payment Status Operations
userAPIUpdatePaymentStatus
Description
Updates the payment status with amount and timestamp.
Parameters
APIMakePaymentParams inParams
For an example of this JSON object, see JSON Object Parameter Types.
Return Value Type
boolean (true when successful)
Accessible
Administrator/end user
Note:
See also Funds Operations.
Resource Accounting and Limits
userAPIGetResourceAccounting
Description
Returns the resource usage for the logged-in user group.
Parameters
None
Return Value Type
APITabularReport
Accessible
Administrator/end user
userAPIGetResourceAccountingDetails
Description
Returns the resource usage details for the logged-in user group.
Parameters
None
Return Value Type
APITabularReport
Accessible
Administrator/end user
43
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
userAPIGetResourceLimits
Description
Returns the resource limits for a requested group.
Parameters
String groupName
Return Value Type
APITabularReport
Accessible
Administrator
userAPIGetResourceLimitsForMyGroup
Description
Returns the resource limits for the logged-in group.
Parameters
None
Return Value Type
APITabularReport
Accessible
Administrator/end user
44
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Cisco VACS Container Operations
userAPIGetContainerDetails
Method
GET
Resource URL
http://<UCSD
IP>/app/api/rest?formatType=json&opName=vacs:userAPIGetContainerDetails&opData={param0:<container-id>}
Description
Fetches the VACS container details such as, VM name, ID, IP and MAC addresses, and so on.
Sample URL
https://<Ip
address>/app/api/rest?formatType=json&opName=vacs:userAPIGetContainerDetails&opData={param0:36}
Parameters
Integer Container ID
Accessible
Administrator/end user
Example
Response Header:
Status Code: 200 OK
Cache-Control: max-age=0,must-revalidate
Content-Length: 5418
Content-Type: application/json;charset=UTF-8
Date: Mon, 16 Feb 2015 22:17:06 GMT
Expires: -1
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=ECD2F3737D8D3C75805A8FC4FE702404; Path=/app/; Secure
Response Body:
{
"serviceResult": "[{"vmId":152,"instanceId":"CUST2-primary-csr","accountName":"AdiVC","hostName":"CUST2-primary71","ipAddress":"172.23.233.100","parentHost":"172.23.233.53","powerStatus":"ON","status":"poweredOn"
,"imageId":"CUST2-primarycsr","lastUpdated":1424123027736,"isArchived":false,"groupId":1,"serviceRequestId":71,"userLabel":"",
"comments":"","provisionedTime":1419561145609,"scheduledTerminationTime":-1,"catalogId":1,"vdcId":36,"appCategoryId":0,"groupName":"Default
Group","vdcName":"CUST2","isUpdatePending":false,"pendingAction":"","vmType":"VMWare","vmUniqueId":"5
02b64ef-f200-56c5-cd6ed26a24eb5530","committedDiskGB":3.98,"uncommittedDiskGB":6.6,"cpuReservationMhz":0,"memReservationMB"
:0,"numCPUs":1,"memoryMB":2560,"hostCPUHz":2133408810,"vmMacAddr":"00:50:56:ab:73:76,00:50:56:ab:59:6
0,00:50:56:ab:36:3c","vmwareDatacenterName":"Aditya-DC","hostUniqueId":"5ac69ba1-3159-11df-ad0a68efbdf6214a","guestOS":"Other 2.6.x Linux (64-bit)"},{"vmId":153,"instanceId":"CUST2_WebZone_web1","accountName":"Adi-VC","hostName":"CUST2WebZoneweb1","ipAddress":"30.30.30.34","parentHost":"172.23.233.53","powerStatus":"ON","status":"poweredOn","im
ageId":"CUST2_WebZone_web1","lastUpdated":1424123027736,"isArchived":false,"groupId":1,"serviceRequestId":71,"userLabel":"CUST
2_WebZone_web-1","comments":"CUST2_WebZone_web1","provisionedTime":1419561180868,"scheduledTerminationTime":-1,"catalogId":1,"vdcId":36,"appCategoryId":0,"groupName":"Default
Group","vdcName":"CUST2","isUpdatePending":false,"pendingAction":"","vmType":"VMWare","vmUniqueId":"5
02b3506-08ea-3004-e828-
45
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
4bc42e79a6f7","committedDiskGB":0.45,"uncommittedDiskGB":0.54,"cpuReservationMhz":0,"memReservationMB
":0,"numCPUs":1,"memoryMB":256,"hostCPUHz":2133408810,"vmMacAddr":"00:50:56:ab:56:5d","vmwareDatacent
erName":"Aditya-DC","hostUniqueId":"5ac69ba1-3159-11df-ad0a-68efbdf6214a","guestOS":"Red Hat
Enterprise Linux 4 (32-bit)"},{"vmId":154,"instanceId":"CUST2-primary-vsg","accountName":"AdiVC","ipAddress":"172.23.233.111","parentHost":"172.23.233.53","powerStatus":"ON","status":"poweredOn"
,"imageId":"CUST2-primaryvsg","lastUpdated":1424123027736,"isArchived":false,"groupId":1,"serviceRequestId":71,"userLabel":"",
"comments":"","provisionedTime":1419561272698,"scheduledTerminationTime":-1,"catalogId":1,"vdcId":36,"appCategoryId":0,"groupName":"Default
Group","vdcName":"CUST2","isUpdatePending":false,"pendingAction":"","vmType":"VMWare","vmUniqueId":"5
02bac85-e408-9e83-11c8ece2dfc37e84","committedDiskGB":0.41,"uncommittedDiskGB":2.67,"cpuReservationMhz":1000,"memReservatio
nMB":2048,"numCPUs":1,"memoryMB":2048,"hostCPUHz":2133408810,"vmMacAddr":"00:50:56:ab:6f:2b,00:50:56:
ab:2e:56,00:50:56:ab:53:b4","vmwareDatacenterName":"Aditya-DC","hostUniqueId":"5ac69ba1-3159-11dfad0a-68efbdf6214a","guestOS":"Other 2.6.x Linux (64bit)"},{"vmId":155,"instanceId":"CUST2_WebZone_AddedVM-1","accountName":"AdiVC","hostName":"CUST2WebZoneAddedVM1","ipAddress":"30.30.30.36","parentHost":"172.23.233.53","powerStatus":"ON","status":"poweredOn","im
ageId":"CUST2_WebZone_AddedVM1","lastUpdated":1424123027736,"isArchived":false,"groupId":1,"serviceRequestId":72,"userLabel":"CUST
2_WebZone_AddedVM-1","comments":"CUST2_WebZone_AddedVM1","provisionedTime":1419563334908,"scheduledTerminationTime":-1,"catalogId":1,"vdcId":36,"appCategoryId":0,"groupName":"Default
Group","vdcName":"CUST2","isUpdatePending":false,"pendingAction":"","vmType":"VMWare","vmUniqueId":"5
02bfeac-9603-82f4-a4396c0449c1659f","committedDiskGB":2.01,"uncommittedDiskGB":0.07,"cpuReservationMhz":0,"memReservationMB
":0,"numCPUs":1,"memoryMB":1024,"hostCPUHz":2133408810,"vmMacAddr":"00:50:56:ab:6b:a7","vmwareDatacen
terName":"Aditya-DC","hostUniqueId":"5ac69ba1-3159-11df-ad0a-68efbdf6214a","guestOS":"Red Hat
Enterprise Linux 4 (32-bit)"},{"vmId":156,"instanceId":"CUST2_AppZone_ADDAPP-1","accountName":"AdiVC","hostName":"CUST2AppZoneADDAPP1","ipAddress":"30.30.30.37","parentHost":"172.23.233.53","powerStatus":"ON","status":"poweredOn","im
ageId":"CUST2_AppZone_ADDAPP1","lastUpdated":1424123027736,"isArchived":false,"groupId":1,"serviceRequestId":73,"userLabel":"CUST
2_AppZone_ADDAPP-1","comments":"CUST2_AppZone_ADDAPP1","provisionedTime":1419566361783,"scheduledTerminationTime":-1,"catalogId":1,"vdcId":36,"appCategoryId":0,"groupName":"Default
Group","vdcName":"CUST2","isUpdatePending":false,"pendingAction":"","vmType":"VMWare","vmUniqueId":"5
02b3c14-f151-8cc7-4f954e95f8c9828b","committedDiskGB":2.01,"uncommittedDiskGB":0.07,"cpuReservationMhz":0,"memReservationMB
":0,"numCPUs":1,"memoryMB":1024,"hostCPUHz":2133408810,"vmMacAddr":"00:50:56:ab:34:f2","vmwareDatacen
terName":"Aditya-DC","hostUniqueId":"5ac69ba1-3159-11df-ad0a-68efbdf6214a","guestOS":"Red Hat
Enterprise Linux 4 (32-bit)"}]",
"serviceError": null,
"serviceName": "InfraMgr",
"opName": "vacs:userAPIGetContainerDetails"
}
userAPIGetStaticNAT
Method
GET
Resource URL
http://<UCSD
IP>/app/api/rest?formatType=json&opName=vacs:userAPIGetStaticNAT&opData={param0:<container-id>}
Description
Fetches the Static NAT information for each container.
Sample URL
http://IPAddress/app/api/rest?formatType=json&opName=vacs:userAPIGetStaticNAT&opData={param0:2}
46
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Parameters
Integer Container ID
Accessible
Administrator/end user
Example
{
serviceError: null
OpName:
userAPIGetStaticNATPerVM
Method
GET
Resource URL
http://<UCSD IP>/app/api/rest?formatType=json&opName=vacs:userAPIGetStaticNATPerVM&
opData={param0:<container-id>,param1:<VM name>}
Description
Fetches the Static NAT information for each virtual machine.
Sample URL
http://IPAddress/app/api/rest?formatType=json&opName=vacs:userAPIGetStaticNATPerVM&opData={param0:2,
Parameters

param0 is Integer Container Id

String VM Name param1
param0
Accessible
Administrator/end user
Example
{
serviceError: null
}
47
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
userAPIVACSSetNat
Method
PUT
Resource URL
http://<UCSD IP>/cloupia/api-v2/VACSSetNat
Description
Configures static NAT for VMs in the container.
Sample URL
http://<IP Address>/cloupia/api-v2/VACSSetNat
Accessible
Administrator/end user
Sample XML Payload
<cuicOperationRequest>
<payload>
<![CDATA[
<StaticNatRestConfigElement>
<container><Container id></container>
<jsonPayload>
[{"id":"9","vmName":"cont1_WebZone_web-1","nicName":"Network adapter
1","ipAddress":"88.88.0.2","macAddress":"00:50:56:92:a1:c1","zoneName":"WebZone"},{"id":"10","vmName
":"cont1_WebZone_web-2","nicName":"Network adapter
1","ipAddress":"88.88.0.3","macAddress":"00:50:56:92:a1:cc","zoneName":"WebZone"}]
</jsonPayload>
</StaticNatRestConfigElement>
]]>
</payload>
</cuicOperationRequest>
Example
Response Header:
Status Code: 200 OK
Cache-Control: max-age=0,must-revalidate
Content-Length: 5418
Content-Type: application/json;charset=UTF-8
Date: Mon, 16 Feb 2015 22:17:06 GMT
Expires: -1
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=ECD2F3737D8D3C75805A8FC4FE702404; Path=/app/; Secure
Response Body:
Note: XML output carries the SR that is created which must be monitored separately for the outcome of
the NAT config.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cuicOperationResponse>
< StaticNatRestConfigElementResponse>
<VACS-REQ-SR-ID>83</VACS-REQ-SR-ID>
</ StaticNatRestConfigElementResponse>
<Log>
<Messages>1</Messages>
<Message>
<TimeStamp>2015-02-16 15:53:01.937</TimeStamp>
<Severity>INFO</Severity>
<Text>Created SR 23 for workflow VACS StaticNat</Text>
48
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
</Message>
</Log>
<operationStatus>0</operationStatus>
<responseMap/>
</cuicOperationResponse>
userAPIGetERSPAN
Method
GET
Resource URL
https://UCSD IPAddress/
app/api/rest?formatType=json&opName=vacs:userAPIGetERSPAN&opData={param0:<container-id>}
Description
Fetches the ERSPAN information related to the available container.
Sample URL
https://<IPAddress>/app/api/rest?formatType=json&opName=vacs:userAPIGetERSPAN&opData={param0:<containe
r id>}
Parameters
Integer Container ID
Accessible
Administrator/end user
Example
Response Header:
Status Code: 200 OK
Cache-Control: max-age=0,must-revalidate
Content-Length: 3251
Content-Type: application/json;charset=UTF-8
Date: Tue, 17 Feb 2015 01:48:35 GMT
Expires: -1
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=BCC1CCB47456BEF2F9B342B815703F7F; Path=/app/; Secure
Response Body:
{ "serviceResult":"[{\"sessionId\":\"3\",\"description\":\"Pub5Autogen\",\"destIp\":\"10.197.141.210\",\"erspanId\":\"3\",\"vmCfgList\":[{\"vmName\":\"Pub5_WebZone_
wvm1\",\"nicCfgHash\":{\"00:50:56:9a:75:62\":{\"macAddrTypeCisco\":\"0050.569a.7562\",\"uiNicName\":\"Ne
twork adapter
1\",\"VethName\":\"Vethernet52\",\"isRx\":false,\"isTx\":true}}},{\"vmName\":\"Pub5_DBZone_dvm1\",\"nicCfgHash\":{\"00:50:56:9a:17:1b\":{\"macAddrTypeCisco\":\"0050.569a.171b\",\"uiNicName\":\"Ne
twork adapter
1\",\"VethName\":\"Vethernet56\",\"isRx\":true,\"isTx\":false}}},{\"vmName\":\"Pub5_AppZone_avm1\",\"nicCfgHash\":{\"00:50:56:9a:05:a1\":{\"macAddrTypeCisco\":\"0050.569a.05a1\",\"uiNicName\":\"Ne
twork adapter 1\",\"VethName\":\"Vethernet54\",\"isRx\":true,\"isTx\":false}}}]}]",
"serviceError":null, "serviceName":"InfraMgr", "opName":"vacs:userAPIGetERSPAN" }
49
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
userAPIVACSsetErspan
Method
PUT
Resource URL
http://<UCSD-IP>/cloupia/api-v2/VACSsetErspan
Description
Configures ERSPAN for VMs in the container.
Sample URL
http://<IP Address>/cloupia/api-v2/VACSsetErspan
Accessible
Administrator/end user
Sample XML Payload
</cuicOperationRequest>
<cuicOperationRequest>
<payload>
<![CDATA[
<ErspanRestElement>
<container><Container id ></container>
<destinationIp>10.10.1.2</destinationIp>
<jsonPayload>
{"detinationIP":"10.10.1.2","vmNicMap":{"CUST2_AppZone_ADDAPP1":[{"vmName":"CUST2_AppZone_ADDAPP-1","nicName":"Network adapter
1","RxTxBoth":"Tx","macAddress":"00:50:56:ab:34:f2","ipAddress":"30.30.30.37"}],"CUST2_WebZone_web1":[{"vmName":"CUST2_WebZone_web-1","nicName":"Network adapter
1","RxTxBoth":"Tx","macAddress":"00:50:56:ab:56:5d","ipAddress":"30.30.30.34"}]}}
</jsonPayload>
</ErspanRestElement>
]]>
</payload>
Example
Response Header:
Ecure
Status Code: 200 OK
Cache-Control: max-age=0,must-revalidate
Content-Length: 5418
Content-Type: application/json;charset=UTF-8
Date: Mon, 16 Feb 2015 22:17:06 GMT
Expires: -1
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=ECD2F3737D8D3C75805A8FC4FE702404; Path=/app/; Secure
Response Body:
Note: XML output carries the SR that is created which must be monitored separately for the outcome of
the ERSPAN config.
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><cuicOperationResponse><Log><Messages>2</Messages><Message><TimeStamp>2015-02-14
08:14:22.430</TimeStamp><Severity>ERROR</Severity><Text>Aditya CreateErspanRestHandler rest api logs
actionLogger!!!</Text></Message><Message><TimeStamp>2015-02-14
08:14:22.794</TimeStamp><Severity>INFO</Severity><Text>Created SR 116 to configure the
ERSPAN.</Text></Message></Log><operationStatus>0</operationStatus><responseMap/>
< ErspanRestElementResponse>
<VACS-REQ-SR-ID>83</VACS-REQ-SR-ID>
</ ErspanRestElementResponse>
50
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
</cuicOperationResponse>
userAPIGetERSPANWithVM
Method
GET
Resource URL
https://UCSD IPAddress/
app/api/rest?formatType=json&opName=vacs:userAPIGetERSPANWithVM&opData={param0:<container-id>,
Description
Fetch the ERSPAN details for a specified VM in the Cisco VACS container.
Sample URL
https://<IP
Address>/app/api/rest?formatType=json&opName=vacs:userAPIGetERSPANWithVM&opData={param0:101,
Parameters


param0 is Integer Container Id
String VM Name param1
param0
Accessible
Administrator/end user
Example
Response Header:
Status Code: 200 OK
2. Cache-Control: max-age=0,must-revalidate
3. Content-Length: 772
4. Content-Type: application/json;charset=UTF-8
5. Date: Tue, 17 Feb 2015 01:56:25 GMT
6. Expires: -1
7. Server: Apache-Coyote/1.1
Response Body:
1. {
2.
"serviceResult": "[{"sessionId":"1","description":"CU20Autogen","destIp":"12.12.12.12","erspanId":"1","vmCfgList":[{"vmName":"CU20_web_web_cwweb21","nicCfgHash":{"00:50:56:8c:50:46":{"macAddrTypeCisco":"0050.568c.5046","uiNicName":"Network
adapter
1","VethName":"Vethernet12","isRx":true,"isTx":false}}}]},{"sessionId":"2","description":"CU20Autogen","destIp":"13.13.13.13","erspanId":"2","vmCfgList":[{"vmName":"CU20_web_web_cwweb21","nicCfgHash":{"00:50:56:8c:50:46":{"macAddrTypeCisco":"0050.568c.5046","uiNicName":"Network
adapter 1","VethName":"Vethernet12","isRx":false,"isTx":true}}}]}]",
3.
"serviceError": null,
4.
"serviceName": "InfraMgr",
5.
"opName": "vacs:userAPIGetERSPANWithVM"
6. }
51
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
userAPIVACSaddVM
Method
PUT
Resource URL
http://<UCSD IP>/cloupia/api-v2/VACSaddVM
Description
Adds VM to the container. These VM can be added using either the VM template or the OVF option.
Sample URL
http://<IP Address>/cloupia/api-v2/VACSaddVM
Accessible
Administrator/end user
Sample XML Payload
the image type.. The imageId is the image file name.
yellow):
<cuicOperationRequest>
<payload>
<![CDATA[
<AddVMsConfigElement>
<container>23</container>
<jsonPayload>
{"templateName":null,"zone":"WebZone","appName":"web","appDescription":"","imageId":"VM-template1NIC","numVCPUs":1,"memoryMB":128,"cpuReservationMHz":0,"memoryReservationMB":0,"diskSize":0,"passw
ordResetType":1,"templateRootLogin":"root","templateRootPassword":"","appCategory":null,"isUseImageNetwo
rk":false,"networks":{"list":[],"moTypeName":"com.cloupia.model.serviceContainer.stingray.StingrayVirtualMachin
eNetworkConfig","validatorName":"StingrayVirtualMachineNetworkConfigListValidator"},"maxQuantity":1,"initialQu
antity":1,"isStorageEfficiencyEnabled":false}
</jsonPayload>
</AddVMsConfigElement>
]]>
</payload>
</cuicOperationRequest>
For Custom container, you must provide network info (see below in yellow), also the following example shows how
to specify the image type as OVF:
<cuicOperationRequest>
<payload>
<![CDATA[
<AddVMsConfigElement>
<container>110</container>
<jsonPayload>
{"templateName":null,"zone":"WebZone","appName":"web","appDescription":"","vmImageType":"OVF","imag
eId":"ovf-1nicUserA","numVCPUs":1,"memoryMB":128,"cpuReservationMHz":0,"memoryReservationMB":0,"diskSize":0,"pass
wordResetType":1,"templateRootLogin":"root","templateRootPassword":"","appCategory":null,"isUseImageNet
work":false,"networks":{"list":[{"appName":"nic1","networkName":"lan0","adapterType":"e1000","ipAddress":
null,"enablePublicIPMapping":false}],"moTypeName":"com.cloupia.model.serviceContainer.stingray.StingrayVirtual
52
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
MachineNetworkConfig","validatorName":"StingrayVirtualMachineNetworkConfigListValidator"},"maxQuantity":1,"i
nitialQuantity":1,"isStorageEfficiencyEnabled":false}
</jsonPayload>
</AddVMsConfigElement>
]]>
</payload>
</cuicOperationRequest>
Example
Response Header:
Status Code: 200 OK
Cache-Control: max-age=0,must-revalidate
Content-Length: 5418
Content-Type: application/json;charset=UTF-8
Date: Mon, 16 Feb 2015 22:17:06 GMT
Expires: -1
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=ECD2F3737D8D3C75805A8FC4FE702404; Path=/app/; Secure
Response Body:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cuicOperationResponse>
<operationStatus>0</operationStatus>
<response>
<AddVMsConfigElementResponse>
<VACS-REQ-SR-ID>83</VACS-REQ-SR-ID>
</AddVMsConfigElementResponse>
</response>
<responseMap>
<entry>
<key>VACS-REQ-SR-ID</key>
<value>83</value>
</entry>
</responseMap>
</cuicOperationResponse>
userAPIVACSdeleteVM
Method
PUT
Resource URL
http://<UCSD IP>/cloupia/api-v2/VACSdeleteVM
Description
Deletes the VM from the container.
Sample URL
http://< IP Address>/cloupia/api-v2/VACSdeleteVM
Accessible
Administrator/end user
Sample XML Payload
<cuicOperationRequest>
<payload>
<![CDATA[
<DeleteVMRestConfigElement>
<container>101</container>
<jsonPayload>{"vmName":"XXYY"}</jsonPayload>
53
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
</DeleteVMRestConfigElement>
]]>
</payload>
</cuicOperationRequest>
Example
Response Header:
Status Code: 200 OK
Cache-Control: max-age=0,must-revalidate
Content-Length: 5418
Content-Type: application/json;charset=UTF-8
Date: Mon, 16 Feb 2015 22:17:06 GMT
Expires: -1
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=ECD2F3737D8D3C75805A8FC4FE702404; Path=/app/; Secure
Response Body:
<?xml version="1.0" encoding="UTF-8"?>
<cuicOperationResponse>
< DeleteVMRestConfigElementResponse>
<VACS-REQ-SR-ID>83</VACS-REQ-SR-ID>
</ DeleteVMRestConfigElementResponse>
<Log>
<Messages>2</Messages>
<Message>
<TimeStamp>2015-02-16 17:17:10.127</TimeStamp>
<Severity>ERROR</Severity>
<Text>delete VM REST API</Text>
</Message>
<Message>
<TimeStamp>2015-02-16 17:17:27.673</TimeStamp>
<Severity>INFO</Severity>
<Text>DeleteVMRestHandler Service Request 278 is in progress to delete the VMs from
the container.</Text>
</Message>
</Log>
<operationStatus>0</operationStatus>
<responseMap />
</cuicOperationResponse>
userAPIVACSPowerOnContainer
Method
PUT
Resource URL
http://<UCSD IP>/cloupia/api-v2/VACSPowerOnContainer
Description
Power on the application container.
Note: By using the power on container Rest AP, any or all VM(s) of a container which are accessible to the user, can
be powered on.
Sample URL
http://<IP Address>/cloupia/api-v2/VACSPowerOnContainer
Accessible
54
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Administrator/end user
Sample XML Payload
<cuicOperationRequest>
<payload>
<![CDATA[
<PowerOnContainerRestConfig>
<containerId>35</containerId>
<jsonPayload>
[{"vmID":"162","vm":"SlbPOFF_WebZone_web-1","vmType":"Application VM","guestOS":"","cloud":""},
{"vmID":"160","vm":"SlbPOFF-primary-csr","vmType":"CSR","guestOS":"","cloud":""},
{"vmID":"161","vm":"SlbPOFF_WebZone_primary-slb","vmType":"SLB","guestOS":"","cloud":""},
{"vmID":"163","vm":"SlbPOFF-primary-vsg","vmType":"VSG","guestOS":"","cloud":""}
]
</jsonPayload>
</PowerOnContainerRestConfig>
]]>
</payload>
</cuicOperationRequest>
Sample Output
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><cuicOperationResponse><Log><Messages>1</Messages><Message><TimeStamp>2016-01-21
22:26:53.463</TimeStamp><Severity>INFO</Severity><Text>Successfully VMs are power on SR ID :
172</Text></Message></Log><operationStatus>0</operationStatus><responseMap/></cuicOperationResponse>
userAPIVACSPowerOffContainer
Method
PUT
Resource URL
http://<UCSD IP>/cloupia/api-v2/VACSPowerOffContainer
Description
Power off the application container.
Note: By using the power off application container Rest API, any or all VM(s) of a container which are accessible to
the user, can be powered off.
Sample URL
http://IP Address/cloupia/api-v2/VACSPowerOffContainer
Accessible
Administrator/end user
Sample XML Payload
<cuicOperationRequest>
<payload>
<![CDATA[
<PowerOffContainerRestConfig>
<containerId>17</containerId>
<jsonPayload>
[
55
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
{"vmID":"48","vm":"slb2_WebZone_web-1-1","vmType":"Application VM","guestOS":"","cloud":""},
{"vmID":"51","vm":"slb2_DBZone_db-1","vmType":"Application VM","guestOS":"","cloud":""}]
</jsonPayload>
</PowerOffContainerRestConfig>
]]>
</payload>
</cuicOperationRequest>
Sample Output
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><cuicOperationResponse><Log><Messages>1</Messages><Message><TimeStamp>2016-01-21
22:30:22.968</TimeStamp><Severity>INFO</Severity><Text>Successfully VMs are power off SR ID :
173</Text></Message></Log><operationStatus>0</operationStatus><responseMap/></cuicOperationResponse>
userAPIVACSaddVM(with password sharing options)
Method
PUT
Resource URL
http://<UCSD IP>/cloupia/api-v2/VACSaddVM
Description
Adds VMs to the container using the password sharing options.
Note: You can add one or multiple instances of one VM template for one zone. Similarly, you can use the UI to add a
VM to the container. The passwordResetType attribute in the payload represents the password share options. The
following IDs are used for the password sharing options:

Do not share 1

Share after password reset -2

Share template credentials -3
Accessible
Administrator/end user
Sample URL
http://<IP Address>/cloupia/api-v2/VACSaddVM
Sample XML Payload
The default image type is VM Template if the image type is not specified. The imageId is the image file name. For all
internal and external containers, you must not provide the network and retain a blank network list.
<cuicOperationRequest>
<payload>
<![CDATA[
<AddVMsConfigElement>
<container>23</container>
<jsonPayload>
{"templateName":null,"zone":"WebZone","appName":"web","appDescription":"","imageId":"VM-template1NIC","numVCPUs":1,"memoryMB":128,"cpuReservationMHz":0,"memoryReservationMB":0,"diskSize":0,"passw
ordResetType":1,"templateRootLogin":"root","templateRootPassword":"","appCategory":null,"isUseImageNetwo
rk":false,"networks":{"list":[],"moTypeName":"com.cloupia.model.serviceContainer.stingray.StingrayVirtualMachin
eNetworkConfig","validatorName":"StingrayVirtualMachineNetworkConfigListValidator"},"maxQuantity":1,"initialQu
antity":1,"isStorageEfficiencyEnabled":false}
</jsonPayload>
</AddVMsConfigElement>
56
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
]]>
</payload>
</cuicOperationRequest>
Example: To add a VM to a container with the password share option 2 i.e
<cuicOperationRequest>
<payload>
<![CDATA[
<AddVMsConfigElement>
<container>7</container>
<jsonPayload>
{"templateName":"AllInOne","zone":"webzone","appName":"webshare","appDescription":"","vmImageType":"O
VF","imageId":"ovf1","numVCPUs":1,"memoryMB":128,"cpuReservationMHz":0,"memoryReservationMB":0,"diskS
ize":0,"passwordResetType":2,"templateRootLogin":"root","templateRootPassword":"Sfish123","appCategor
y":null,"isUseImageNetwork":false,"networks":{"list":[{"appName":"eth0","networkName":"lan0","adapter
Type":"E
1000"}],"moTypeName":"com.cloupia.model.serviceContainer.stingray.StingrayVirtualMachineNetworkConfig
","validatorName":"StingrayVirtualMachineNetworkConfigListValidator"},"maxQuantity":1,"initialQuantit
y":1,"isStorageEfficiencyEnabled":false}
</jsonPayload>
</AddVMsConfigElement>
]]>
</payload>
</cuicOperationRequest>
Sample Output
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><cuicOperationResponse><Log><Messages>1</Messages><Message><TimeStamp>2016-01-18
23:10:25.506</TimeStamp><Severity>INFO</Severity><Text>Service Request 89 is in progress to Add
VM(s).</Text></Message></Log><operationStatus>0</operationStatus><response><AddVMsConfigElementRespon
se><VACS-REQ-SR-ID>89</VACS-REQ-SRID></AddVMsConfigElementResponse></response><responseMap><entry><key>VACS-REQ-SRID</key><value>89</value></entry></responseMap></cuicOperationResponse>
In the response, pay attention to the following tags:

<VACS-REQ-SR-ID> - Provides the SR ID of the ADD VMs workflow.

<VACS-REQ-ERR-MSG> - Provides error messages, if any.
userAPIGetFirewallPolicy
Method
Get
Resource URL
https://<UCSD IP>/ app/api/rest?formatType=json&opName=vacs: userAPIGetFirewallPolicy
&opData={param0:<container-id>}
Description
Gets the firewall policy details of a container.
Sample URL
http://<IP Address>/ app/api/rest?formatType=json&opName=vacs: userAPIGetFirewallPolicy &opData={param0:52}
Accessible
Administrator/end user
Example
Response Header:
Status Code: 200 OK
Cache-Control: max-age=0,must-revalidate
57
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Content-Length: 3268
Content-Type: application/json;charset=UTF-8
Date: Sun, 28 Jun 2015 23:03:50 GMT
Expires: -1
Server: Apache-Coyote/1.1
Response Body:
1. {
2.
"serviceResult": "[{"vmId":99,"instanceId":"test3-primarycsr","accountName":"VCAdi","hostName":"test3-primary112","ipAddress":"172.23.233.113","parentHost":"172.23.233.53","powerStatus":"ON","status":"poweredOn
","imageId":"test3-primarycsr","lastUpdated":1435531883170,"isArchived":false,"groupId":1,"serviceRequestId":112,"userLabel":""
,"comments":"","provisionedTime":1432720120990,"scheduledTerminationTime":-1,"catalogId":1,"vdcId":52,"appCategoryId":0,"groupName":"Default
Group","vdcName":"test3","isUpdatePending":false,"pendingAction":"","vmType":"VMWare","vmUniqueId":"5
02bfd83-2856-f4c3-423edc75aa966191","committedDiskGB":1.0,"uncommittedDiskGB":6.99,"cpuReservationMhz":0,"memReservationMB"
:0,"numCPUs":1,"memoryMB":2560,"hostCPUHz":2133408853,"vmMacAddr":"00:50:56:ab:58:f0,00:50:56:ab:01:9
8,00:50:56:ab:05:75","vmwareDatacenterName":"Aditya-DC","hostUniqueId":"5ac69ba1-3159-11df-ad0a68efbdf6214a","guestOS":"Other 2.6.x Linux (64-bit)"},{"vmId":100,"instanceId":"test3_WebZone_webint1","accountName":"VCAdi","hostName":"test3WebZonewebint1","ipAddress":"40.40.40.66","parentHost":"172.23.233.53","powerStatus":"ON","status":"poweredOn","im
ageId":"test3_WebZone_webint1","lastUpdated":1435531883170,"isArchived":false,"groupId":1,"serviceRequestId":112,"userLabel":"tes
t3_WebZone_webint-1","comments":"test3_WebZone_webint1","provisionedTime":1432720175655,"scheduledTerminationTime":-1,"catalogId":1,"vdcId":52,"appCategoryId":0,"groupName":"Default
Group","vdcName":"test3","isUpdatePending":false,"pendingAction":"","vmType":"VMWare","vmUniqueId":"5
02b70ec-7a1a-80f2-6192c67694c3fc6f","committedDiskGB":0.45,"uncommittedDiskGB":0.54,"cpuReservationMhz":0,"memReservationMB
":0,"numCPUs":1,"memoryMB":256,"hostCPUHz":2133408853,"vmMacAddr":"00:50:56:ab:33:cd","vmwareDatacent
erName":"Aditya-DC","hostUniqueId":"5ac69ba1-3159-11df-ad0a-68efbdf6214a","guestOS":"Red Hat
Enterprise Linux 4 (32-bit)"},{"vmId":101,"instanceId":"test3-primaryvsg","accountName":"VCAdi","ipAddress":"172.23.233.163","parentHost":"172.23.233.53","powerStatus":"O
N","status":"poweredOn","imageId":"test3-primaryvsg","lastUpdated":1435531883170,"isArchived":false,"groupId":1,"serviceRequestId":112,"userLabel":""
,"comments":"","provisionedTime":1432720266621,"scheduledTerminationTime":-1,"catalogId":1,"vdcId":52,"appCategoryId":0,"groupName":"Default
Group","vdcName":"test3","isUpdatePending":false,"pendingAction":"","vmType":"VMWare","vmUniqueId":"5
02bddb9-c4ad-7f8b-a038b5175726cdf8","committedDiskGB":0.11,"uncommittedDiskGB":2.88,"cpuReservationMhz":1000,"memReservatio
nMB":2048,"numCPUs":1,"memoryMB":2048,"hostCPUHz":2133408853,"vmMacAddr":"00:50:56:ab:2a:1c,00:50:56:
ab:58:1c,00:50:56:ab:4b:35","vmwareDatacenterName":"Aditya-DC","hostUniqueId":"5ac69ba1-3159-11dfad0a-68efbdf6214a","guestOS":"Other 2.6.x Linux (64-bit)"}]",
3.
"serviceError": null,
4.
"serviceName": "InfraMgr",
5.
"opName": "vacs:userAPIGetContainerDetails"
6. }
userAPIVACSManageFirewallPolicyAclRule (Add Firewall Policy)
To add the firewall policy, use action ID 1.
Method
PUT
Resource URL
https://<UCSD IP>/cloupia/api-v2/VACSManageFirewallPolicyAclRule
Description
Adds firewall policies to the container.
Sample URL
58
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
http://<IP Address>/cloupia/api-v2/VACSManageFirewallPolicyAclRule
Accessible
Administrator/end user
Sample XML Payload
<cuicOperationRequest>
<payload>
<![CDATA[
<ManageFirewallPolicyAclRuleConfig>
<containerId>52</containerId>
<jsonPayload>
[{"policyName": "test3_Policy","policyDesc": "this is test policy via rest call","name":
"test3_Policy_rule_122","firewallAction": "permit","matchCriteria": "match-all","protocolServiceOption":
"Protocol","protocol": true,"protocalValue": "","services": {"list": [],"moTypeName":
"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig"},"srcRules": {"list":
[{"attributeType": "zone","attributeName": "Zone Name","operator": "eq","attributeValue":
"WebZone","zoneAttributeValue": "PNSC;org-root/org-Default_Group/org-test3/zone-WebZone","onlineHelp":
"u003ca hrefu003du0027/app/ONLINEHELP/FirewallPolicyACLRule.htmlu0027
targetu003du0027_blanku0027u003eHelpu003c/au003e"}],"moTypeName":
"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig"},"destRules": {"list":
[{"attributeType": "zone","attributeName": "Zone Name","operator": "eq","attributeValue":
"DBZone","zoneAttributeValue": "PNSC;org-root/org-Default_Group/org-test3/zone-DBZone","onlineHelp": "u003ca
hrefu003du0027/app/ONLINEHELP/FirewallPolicyACLRule.htmlu0027
targetu003du0027_blanku0027u003eHelpu003c/au003e"}],"moTypeName":
"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig"},"onlineHelp": "u003ca
hrefu003du0027/app/ONLINEHELP/CustomTemplateACL.htmlu0027
targetu003du0027_blanku0027u003eHelpu003c/au003e"}]
</jsonPayload>
<actionId>1</actionId>
<configEntryId></configEntryId>
</ManageFirewallPolicyAclRuleConfig>
]]>
</payload>
</cuicOperationRequest>
Example
Response Header:
1.
2.
3.
4.
5.
6.
Status Code: 200 OK
Content-Length: 485
Content-Type: text/xml;charset=ISO-8859-1
Date: Sun, 28 Jun 2015 23:18:32 GMT
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=02B93115207991DCC2D55D685382DBE0; Path=/cloupia/
Response Body:
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><cuicOperationResponse><Log><Messages>2</Messages><Message><TimeStamp>2015-06-28
23:18:30.530</TimeStamp><Severity>INFO</Severity><Text>ManageFirewallPolicyHandler rest api logs
actionLogger!!!</Text></Message><Message><TimeStamp>2015-06-28
23:18:32.087</TimeStamp><Severity>INFO</Severity><Text>ACL Policy added
successfully....!!!</Text></Message></Log><operationStatus>0</operationStatus><responseMap/></cuicOpe
rationResponse>
userAPIVACSManageFirewallPolicy (Update Firewall Policy)
To update the firewall policy, use action ID 2.
59
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Method
PUT
Resource URL
https://<UCSD IP>/cloupia/api-v2/VACSManageFirewallPolicyAclRule
Description
Updates the firewall policy that is available in the container.
Sample URL
http://<IP Address>/cloupia/api-v2/ VACSManageFirewallPolicyAclRule
Accessible
Administrator/end user
Sample XML Payload
<cuicOperationRequest>
<payload>
<![CDATA[
<ManageFirewallPolicyAclRuleConfig>
<containerId>52</containerId>
<oldAclNames>test3_Policy_rule_122</oldAclNames>
<jsonPayload>
[{"policyName": "test3_Policy","policyDesc": "this is test policy via rest call","name":
"test3_Policy_rule_122","firewallAction": "drop","matchCriteria": "match-all","protocolServiceOption":
"Protocol","protocol": true,"protocalValue": "","services": {"list": [],"moTypeName":
"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig"},"srcRules": {"list":
[{"attributeType": "zone","attributeName": "Zone Name","operator": "eq","attributeValue":
"WebZone","zoneAttributeValue": "PNSC;org-root/org-Default_Group/org-test3/zone-WebZone","onlineHelp":
"u003ca hrefu003du0027/app/ONLINEHELP/FirewallPolicyACLRule.htmlu0027
targetu003du0027_blanku0027u003eHelpu003c/au003e"}],"moTypeName":
"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig"},"destRules": {"list":
[{"attributeType": "zone","attributeName": "Zone Name","operator": "eq","attributeValue":
"DBZone","zoneAttributeValue": "PNSC;org-root/org-Default_Group/org-test3/zone-DBZone","onlineHelp": "u003ca
hrefu003du0027/app/ONLINEHELP/FirewallPolicyACLRule.htmlu0027
targetu003du0027_blanku0027u003eHelpu003c/au003e"}],"moTypeName":
"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig"},"onlineHelp": "u003ca
hrefu003du0027/app/ONLINEHELP/CustomTemplateACL.htmlu0027
targetu003du0027_blanku0027u003eHelpu003c/au003e"}]
</jsonPayload>
<actionId>2</actionId>
<configEntryId></configEntryId>
</ManageFirewallPolicyAclRuleConfig>
]]>
</payload>
</cuicOperationRequest>
Example
Response Header:
Status Code: 200 OK
Cache-Control: max-age=0,must-revalidate
Content-Length: 5418
Content-Type: application/json;charset=UTF-8
Date: Mon, 16 Feb 2015 22:17:06 GMT
Expires: -1
Server: Apache-Coyote/1.1
60
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Response Body:
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><cuicOperationResponse><Log><Messages>2</Messages><Message><TimeStamp>2015-06-28
23:26:17.907</TimeStamp>
<Severity>INFO</Severity><Text>ManageFirewallPolicyHandler rest api logs
actionLogger!!!</Text></Message><Message><TimeStamp>2015-06-28
23:26:19.738</TimeStamp><Severity>INFO</Severity><Text>ACL Policy updated
successfully....!!!</Text></Message></Log><operationStatus>0</operationStatus><responseMap/></cuicOpe
rationResponse>
userAPIVACSManageFirewallPolicyAclRule (Delete Firewall Policy)
To delete the firewall policy, use action ID 3.
Method
PUT
Resource URL
https://<UCSD IP>/cloupia/api-v2/VACSManageFirewallPolicyAclRule
Description
Deletes the ACL rule from the firewall Policy.
Sample URL
http://<IP Address>/cloupia/api-v2/VACSManageFirewallPolicyAclRule
Accessible
Administrator/end user
Sample XML Payload
<cuicOperationRequest>
<payload>
<![CDATA[
<ManageFirewallPolicyAclRuleConfig>
<containerId>52</containerId>
<oldAclNames>test3_Policy_rule_122</oldAclNames>
<actionId>3</actionId>
<configEntryId></configEntryId>
</ManageFirewallPolicyAclRuleConfig>
]]>
</payload>
</cuicOperationRequest>
Example
Response Header:
1.
2.
3.
4.
5.
Status Code: 200 OK
Content-Length: 487
Content-Type: text/xml;charset=ISO-8859-1
Date: Sun, 28 Jun 2015 23:31:59 GMT
Server: Apache-Coyote/1.1
Response Body:
<?xml version="1.0" encoding="UTF-8"
standalone="yes"?><cuicOperationResponse><Log><Messages>2</Messages><Message><TimeStamp>2015-06-28
23:31:57.483</TimeStamp>
<Severity>INFO</Severity><Text>ManageFirewallPolicyHandler rest api logs
actionLogger!!!</Text></Message><Message><TimeStamp>2015-06-28
23:31:59.170</TimeStamp><Severity>INFO</Severity><Text>ACL Policy deleted
61
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
successfully....!!!</Text></Message></Log><operationStatus>0</operationStatus><responseMap/></cuicOpe
rationResponse>
62
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
userAPIGetSLB
Method
Get
Resource URL
https://<UCSD-IP>/app/api/rest?formatType=json&opName=vacs:userAPIGetSLB &opData={param0:<containerid>}
Description
Provides the SLB details for a container.
Sample URL
http://<IP Address>/app/api/rest?formatType=json&opName=vacs:userAPIGetSLB&opData={param0:<container id>}
Accessible
Administrator/end user
Example
Response Header:
Status Code: 200 OK
Cache-Control: max-age=0,must-revalidate
Content-Length: 5418
Content-Type: application/json;charset=UTF-8
Date: Mon, 16 Feb 2015 22:17:06 GMT
Expires: -1
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=ECD2F3737D8D3C75805A8FC4FE702404; Path=/app/; Secure
Response Body:
{
"serviceResult":"{\"slb_list\":[{\"vIP\":\"7.7.6.131\",\"vIP_public\":\"6.6.6.47\",\"vIPnetmask\":\"2
55.255.255.192\",\"vIPgateway\":\"7.7.6.129\",\"zone\":\"WebZone\",\"frontPort\":80,\"backPort\":80,\
"statsPassword\":\"password\",\"sessionPersist\":1,\"mode\":4,\"dataNetworkPgName\":\"IN52-pglan0\",\"rs_map\":{\"IN52_WebZone_web1\":\"7.7.6.130\"}}],\"isHa\":false,\"mgmtIpPrimary\":\"30.30.30.94\",\"mgmtSubnetmask\":\"255.255.25
5.0\",\"mgmtGatewayIP\":\"30.30.30.1\",\"mgmtPasswdPrimary\":\"Cisco123\",\"mgmtPGName\":\"IN52mgt\",\"dataPGName\":\"IN52-pglan0\",\"OVFUrl\":\"/opt/infra/uploads/vacs/dir/slb/VACS2.0SLB_template.ovf\"}", "serviceError":null,
"serviceNa
63
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
userAPIGetTemplate
Method
GET
Resource URL
https://<UCSDIP>/app/api/rest?formatType=json&opName=vacs:userAPIGetTemplate&opData={param0:<TemplateName>}
Description
Provides the VACS template details.
Sample URL
http://<IP
Address
Accessible
Administrator/end user
Example
Response Header:
Status Code: 200 OK
Cache-Control: max-age=0,must-revalidate
Content-Length: 5418
Content-Type: application/json;charset=UTF-8
Date: Mon, 16 Feb 2015 22:17:06 GMT
Expires: -1
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=ECD2F3737D8D3C75805A8FC4FE702404; Path=/app/; Secure
Response Body:
{
"serviceResult":"{\"networkResourcePool\":{\"managementIpPool\":1,\"csrUplinkIPPool\":2,\"csrIPType\"
:\"Private\",\"csrL3RoutingProtocol\":\"EIGRP\",\"autonomousNumber\":\"\",\"mtu\":\"1500\",\"onlineHe
lp\":\"\\u003ca href\\u003d\\u0027/app/ONLINEHELP/TemplateNetworkResource.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"},\"pnscZones\":{\"list\":[],\"moTypeNa
me\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCZoneConfig\"},\"pnscAcls\":{\"list\":[],\"moTypeName\":\"
com.cloupia.lib.cIaaS.vnmc.model.VNMCAclPolicies\"},\"stgPnscZones\":{\"list\":[{\"zoneName\":\"WebZo
ne\",\"vnmcZoneRules\":{\"list\":[{\"attributeType\":\"vm\",\"attributeName\":\"VM
Name\",\"operator\":\"contains\",\"attributeValue\":\"web\"}],\"moTypeName\":\"com.cloupia.feature.st
ingray.firewallpolicy.model.StgVNMCZoneRuleConfig\"},\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/CustomTemplateSecurityZone.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"},{\"zoneName\":\"AppZone\",\"vnmcZoneR
ules\":{\"list\":[{\"attributeType\":\"vm\",\"attributeName\":\"VM
Name\",\"operator\":\"contains\",\"attributeValue\":\"app\"}],\"moTypeName\":\"com.cloupia.feature.st
ingray.firewallpolicy.model.StgVNMCZoneRuleConfig\"},\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/CustomTemplateSecurityZone.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"},{\"zoneName\":\"DBZone\",\"vnmcZoneRu
les\":{\"list\":[{\"attributeType\":\"vm\",\"attributeName\":\"VM
Name\",\"operator\":\"contains\",\"attributeValue\":\"db\"}],\"moTypeName\":\"com.cloupia.feature.sti
ngray.firewallpolicy.model.StgVNMCZoneRuleConfig\"},\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/CustomTemplateSecurityZone.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.firewallpolicy.model.StgVNMCZoneConfig\"},\"stgPnscAcls\":{\"list\":[{\"name\":\"allowWebTo
AppRule\",\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"services\":{\"list\":[],\"moTypeName
\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\"},\"srcRules\":
{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"attributeValue\":\"WebZone\",\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/FirewallPolicyACLRule.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\"},\"destRules\":{\"list\":[{\"attributeTyp
64
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
e\":\"zone\",\"attributeName\":\"Zone Name\",\"attributeValue\":\"AppZone\",\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/FirewallPolicyACLRule.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\"},\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/CustomTemplateACL.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"},{\"name\":\"dropWebToDBRule\",\"firew
allAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"services\":{\"list\":[],\"moTypeName
\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\"},\"srcRules\":
{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"attributeValue\":\"WebZone\",\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/FirewallPolicyACLRule.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\"},\"destRules\":{\"list\":[{\"attributeTyp
e\":\"zone\",\"attributeName\":\"Zone Name\",\"attributeValue\":\"DBZone\",\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/FirewallPolicyACLRule.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\"},\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/CustomTemplateACL.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"},{\"name\":\"allowAppToDBRule\",\"fire
wallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"services\":{\"list\":[],\"moTypeName
\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\"},\"srcRules\":
{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"attributeValue\":\"AppZone\",\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/FirewallPolicyACLRule.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\"},\"destRules\":{\"list\":[{\"attributeTyp
e\":\"zone\",\"attributeName\":\"Zone Name\",\"attributeValue\":\"DBZone\",\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/FirewallPolicyACLRule.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\"},\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/CustomTemplateACL.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"},{\"name\":\"dropDBToWebRule\",\"firew
allAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"services\":{\"list\":[],\"moTypeName
\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\"},\"srcRules\":
{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"attributeValue\":\"DBZone\",\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/FirewallPolicyACLRule.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\"},\"destRules\":{\"list\":[{\"attributeTyp
e\":\"zone\",\"attributeName\":\"Zone Name\",\"attributeValue\":\"WebZone\",\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/FirewallPolicyACLRule.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\"},\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/CustomTemplateACL.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"},{\"name\":\"dropAppToWebRule\",\"fire
wallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"services\":{\"list\":[],\"moTypeName
\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\"},\"srcRules\":
{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"attributeValue\":\"AppZone\",\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/FirewallPolicyACLRule.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\"},\"destRules\":{\"list\":[{\"attributeTyp
e\":\"zone\",\"attributeName\":\"Zone Name\",\"attributeValue\":\"WebZone\",\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/FirewallPolicyACLRule.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\"},\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/CustomTemplateACL.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"},{\"name\":\"permitAnyToWebRule\",\"fi
rewallAction\":\"permit\",\"matchCriteria\":\"matchany\",\"protocolServiceOption\":\"Service\",\"protocol\":true,\"services\":{\"list\":[{\"protocalOper
ator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"http\",\"servicePort\":80,\"onlineHelp\":\"
\\u003ca href\\u003d\\u0027/app/ONLINEHELP/FirewallPolicyACLRule.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"},{\"protocalOperator\":\"eq\",\"protoc
65
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
alValue\":\"TCP\",\"serviceName\":\"http\",\"servicePort\":8080,\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/FirewallPolicyACLRule.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"},{\"protocalOperator\":\"eq\",\"protoc
alValue\":\"TCP\",\"serviceName\":\"https\",\"servicePort\":443,\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/FirewallPolicyACLRule.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"},{\"protocalOperator\":\"eq\",\"protoc
alValue\":\"TCP\",\"serviceName\":\"https\",\"servicePort\":8443,\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/FirewallPolicyACLRule.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\"},\"srcRules\":{\"list\":[],\"moTypeNam
e\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\"},\"destRules\":{
\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"attributeValue\":\"WebZone\",\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/FirewallPolicyACLRule.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\"},\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/CustomTemplateACL.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"},{\"name\":\"permitWebToAnyRule\",\"fi
rewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"services\":{\"list\":[],\"moTypeName
\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\"},\"srcRules\":
{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"attributeValue\":\"WebZone\",\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/FirewallPolicyACLRule.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\"},\"destRules\":{\"list\":[],\"moTypeName\
":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\"},\"onlineHelp\":\"
\\u003ca href\\u003d\\u0027/app/ONLINEHELP/CustomTemplateACL.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.firewallpolicy.model.StgVNMCAclPolicies\"},\"vmNetworks\":{\"list\":[{\"networkName\":\"lan
0\",\"networkType\":1,\"vlanPool\":1,\"vxlanPool\":1,\"portGroup\":\"\",\"ipSubnetPool\":1,\"staticIPPool\":-1,\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/CustomTemplateVMNetworks.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.template.ui.StgStingrayVMNetwork\",\"validatorName\":\"StgStingrayVMNetworkListValidator\"}
,\"vms\":{\"list\":[{\"zone\":\"WebZone\",\"appName\":\"web\",\"appDescription\":\"\",\"imageId\":\"V
M-template1NIC\",\"numVCPUs\":1,\"memoryMB\":256,\"cpuReservationMHz\":0,\"memoryReservationMB\":0,\"diskSize\"
:0,\"passwordResetType\":1,\"templateRootLogin\":\"root\",\"templateRootPassword\":\"\",\"isUseImageN
etwork\":false,\"networks\":{\"list\":[{\"appName\":\"vnic0\",\"networkName\":\"lan0\",\"adapterType\
":\"e1000\",\"enablePublicIPMapping\":false}],\"moTypeName\":\"com.cloupia.feature.stingray.template.
ui.StgStingrayVirtualMachineNetworkConfig\",\"validatorName\":\"StingrayVirtualMachineNetworkConfigLi
stValidator\"},\"maxQuantity\":1,\"initialQuantity\":2,\"isStorageEfficiencyEnabled\":false,\"onlineH
elp\":\"\\u003ca href\\u003d\\u0027/app/ONLINEHELP/TemplateVirtualMachine.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}],\"moTypeName\":\"com.cloupia.feature
.stingray.template.ui.StgStingrayVirtualMachineConfig\",\"validatorName\":\"StgStingrayVirtualMachine
ConfigListValidator\"},\"slbConfig\":{\"tierHAScale\":\"WebZone\",\"networkHAScale\":\"\",\"protocolH
AScale\":\"TCP\",\"persistenceHAScale\":\"None\",\"frontTCPPortHAScale\":80,\"backTCPPortHAScale\":80
,\"frontTCPHttpsHAScale\":443,\"backTCPHttpsHAScale\":443,\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/CustomTemplateLoadBalance.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"},\"deploymentOptions\":{\"deploymentOp
tion\":\"Large\",\"vcenter\":\"VC-chao-9\",\"n1kDVSwitch\":\"VSM-24\",\"virtualComputePolicy\":\"VCchao-9 - Default Computing Policy\",\"virtualStoragePolicy\":\"VC-chao-9 - Default Storage
Policy\",\"virtualSystemPolicy\":\"sys1\",\"deployCSR\":true,\"deployVSG\":true,\"deploySLB\":true,\"
ha\":\"No\",\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/TierTemplateDeployment.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"},\"vpnConfig\":{},\"algConfig\":{\"htt
p\":true,\"https\":true,\"ftp\":true,\"dns\":true,\"icmp\":true,\"sqlnet\":false,\"mssql\":false,\"ld
ap\":false,\"onlineHelp\":\"\\u003ca
href\\u003d\\u0027/app/ONLINEHELP/CustomAppLayerGateway.html\\u0027
target\\u003d\\u0027_blank\\u0027\\u003eHelp\\u003c/a\\u003e\"}}", "serviceError":null,
66
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
userAPIVACSCreateContainerRest
Method
PUT
Resource URL
http://<UCSD IP>/cloupia/api-v2/VACSCreateContainerRest
Description
Creates container using parameterized template payload. The template created during the container creation
process is not saved to the Cisco VACS UI and gets deleted once container creation is successful.
Template is created with the
You must modify the following mandatory parameters in the payload:
1.




networkResourcePool List:
managementIpPool
csrUplinkIPPool
csrIPType
parameters]
2.
vmNetworks List:
networkType [If network type is VLAN modify vlanPool parameter and If type is vxlanPool is VXLAN
modify vxlanPool ]

vlanPool

vxlanPool

ipSubnetPool

staticIPPool

3.

vms List:
imageId









deploymentOptions
deploymentOption
vcenter
n1kDVSwitch
virtualComputePolicy
virtualStoragePolicy
virtualSystemPolicy
deployCSR
deployVSG
deploySLB
4.
Sample URL
http://<IP Address>/cloupia/api-v2/VACSCreateContainerRest
Accessible
Administrator/end user
Sample XML Payload
67
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
1. Custom Template in a HA mode
<cuicOperationRequest>
<payload>
<![CDATA[
<CreateContainerRestConfig>
<containerName>rest1</containerName>
<groupName>Default Group</groupName>
<actionId></actionId>
<jsonPayload>
{"svcTemplateName":"Custom template in HA Rest","templateDescription":null,"containerType":"Stingray - Custom
Container","containerTypeSummary":null,"templateDefinitionData":"{\"networkResourcePool\":{\"label_managementip
pool\":null,\"managementIpPool\":\"mgt\",\"label_extraspace\":null,\"label_csrnetconfig\":null,\"csrUplinkIPPool\":\"
uplink\",\"csrIPType\":\"Private\",\"csrL3RoutingProtocol\":\"EIGRP\",\"autonomousNumber\":\"\",\"mtu\":\"1500\"
,\"onlineHelp\":null},\"pnscZones\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCZoneConfi
g\",\"validatorName\":null},\"pnscAcls\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCAclPo
licies\",\"validatorName\":null},\"stgPnscZones\":{\"list\":[{\"zoneName\":\"Web\",\"zoneDesc\":\"\",\"vnmcZoneRu
les\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"vali
datorName\":null},\"onlineHelp\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMC
ZoneConfig\",\"validatorName\":null},\"onlineHelpSecurityZone\":null,\"stgPnscAcls\":{\"list\":[],\"moTypeName\":\"
com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCAclPolicies\",\"validatorName\":null},\"onlineHelpACLRules\
":null,\"vmNetworks\":{\"list\":[{\"networkName\":\"lan0\",\"networkType\":\"VLAN\",\"vlanPool\":\"vlanpolicy\",\"
vxlanPool\":\"\",\"portGroup\":\"\",\"ipSubnetPool\":\"Subnet1\",\"staticIPPool\":\"\",\"onlineHelp\":null}],\"moTyp
eName\":\"com.cloupia.feature.stingray.template.ui.StgStingrayVMNetwork\",\"validatorName\":\"StgStingrayVMNetw
orkListValidator\"},\"onlineHelpVMNetworks\":null,\"vms\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.
template.ui.StgStingrayVirtualMachineConfig\",\"validatorName\":\"StgStingrayVirtualMachineConfigListValidator\"},\"o
nlineHelpNewVM\":null,\"slbConfig\":{\"tierHAScale\":null,\"networkHAScale\":null,\"protocolHAScale\":null,\"persist
enceHAScale\":null,\"label_http\":null,\"frontTCPPortHAScale\":80,\"backTCPPortHAScale\":80,\"label_https\":null,\"
frontTCPHttpsHAScale\":443,\"backTCPHttpsHAScale\":443,\"onlineHelp\":null,\"Label_space\":null,\"label_note_for
_custom\":null,\"label_note_for_non_custom\":null,\"onlineTemplateHelp\":null,\"onlineContainerHelp\":null},\"deploy
mentOptions\":{\"deploymentOption\":\"Small\",\"vcenter\":\"Adityavc\",\"n1kDVSwitch\":\"AdityaN1K\",\"virtualComputePolicy\":\"Aditya-vc - Default Computing
Policy\",\"virtualStoragePolicy\":\"Aditya-vc - Default Storage
Policy\",\"virtualSystemPolicy\":\"local\",\"endUserSelfServicePolicy\":\"\",\"deployCSR\":true,\"deployVSG\":false,\
"deploySLB\":false,\"ha\":\"No\",\"onlineHelp\":null,\"haModeLabel\":null},\"vpnConfig\":{\"enableSiteToSiteIPSecV
PN\":null,\"vpnPreSharedKey\":null,\"encryption\":null,\"hash\":null,\"remoteSiteIPAddress\":null},\"algConfig\":{\"htt
p\":true,\"https\":true,\"ftp\":true,\"dns\":true,\"icmp\":true,\"sqlnet\":false,\"mssql\":false,\"ldap\":false,\"onlineHe
lp\":null}}","onlineHelp":"N/A"}
</jsonPayload>
<configEntryId></configEntryId>
</CreateContainerRestConfig>
]]>
</payload>
</cuicOperationRequest>
2. Custom Template in a non-HA mode
<cuicOperationRequest>
<payload>
<![CDATA[
<CreateContainerRestConfig>
<actionId></actionId>
<containerName>rest2</containerName>
<groupName>Default Group</groupName>
<jsonPayload>
68
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
{"svcTemplateName":"Custom template in Non-HA Rest","templateDescription":null,"containerType":"Stingray Custom
Container","containerTypeSummary":null,"templateDefinitionData":"{\"networkResourcePool\":{\"label_managementip
pool\":null,\"managementIpPool\":\"mgt\",\"label_extraspace\":null,\"label_csrnetconfig\":null,\"csrUplinkIPPool\":\"
uplink\",\"csrIPType\":\"Private\",\"csrL3RoutingProtocol\":\"EIGRP\",\"autonomousNumber\":\"\",\"mtu\":\"1500\"
,\"onlineHelp\":null},\"pnscZones\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCZoneConfi
g\",\"validatorName\":null},\"pnscAcls\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCAclPo
licies\",\"validatorName\":null},\"stgPnscZones\":{\"list\":[{\"zoneName\":\"appzone\",\"zoneDesc\":\"\",\"vnmcZo
neRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",
\"validatorName\":null},\"onlineHelp\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgV
NMCZoneConfig\",\"validatorName\":null},\"onlineHelpSecurityZone\":null,\"stgPnscAcls\":{\"list\":[{\"policyName\":
null,\"policyDesc\":null,\"name\":\"acl1\",\"descr\":\"\",\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":\"\",\"protocalValue\":\"\",\"servi
ces\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig
\",\"validatorName\":null},\"srcRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model
.StgVnmcAclPolicyRuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.featu
re.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\",\"validatorName\":null}}],\"moTypeName\":\"com.cloup
ia.feature.stingray.firewallpolicy.model.StgVNMCAclPolicies\",\"validatorName\":null},\"onlineHelpACLRules\":null,\"vm
Networks\":{\"list\":[{\"networkName\":\"lan0\",\"networkType\":\"VLAN\",\"vlanPool\":\"vlanpolicy\",\"vxlanPool\"
:\"\",\"portGroup\":\"\",\"ipSubnetPool\":\"Subnet1\",\"staticIPPool\":\"\",\"onlineHelp\":null}],\"moTypeName\":\"
com.cloupia.feature.stingray.template.ui.StgStingrayVMNetwork\",\"validatorName\":\"StgStingrayVMNetworkListValida
tor\"},\"onlineHelpVMNetworks\":null,\"vms\":{\"list\":[{\"templateName\":null,\"zone\":\"appzone\",\"appName\":\"
appvm\",\"appDescription\":\"\",\"vmImageType\":\"VM
Template\",\"imageId\":\"AppVM\",\"numVCPUs\":1,\"memoryMB\":256,\"cpuReservationMHz\":0,\"memoryReserv
ationMB\":0,\"diskSize\":0,\"passwordResetType\":1,\"templateRootLogin\":\"root\",\"templateRootPassword\":\"\",
\"appCategory\":null,\"isUseImageNetwork\":false,\"networks\":{\"list\":[{\"appName\":\"nic1\",\"networkName\":\"
lan0\",\"adapterType\":\"e1000\",\"ipAddress\":null,\"enablePublicIPMapping\":false}],\"moTypeName\":\"com.clou
pia.feature.stingray.template.ui.StgStingrayVirtualMachineNetworkConfig\",\"validatorName\":\"StingrayVirtualMachine
NetworkConfigListValidator\"},\"maxQuantity\":1,\"initialQuantity\":1,\"isStorageEfficiencyEnabled\":false,\"onlineHelp
\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.template.ui.StgStingrayVirtualMachineConfig\",\"validatorNam
e\":\"StgStingrayVirtualMachineConfigListValidator\"},\"onlineHelpNewVM\":null,\"slbConfig\":{\"tierHAScale\":null,\"
networkHAScale\":null,\"protocolHAScale\":null,\"persistenceHAScale\":null,\"label_http\":null,\"frontTCPPortHAScal
e\":80,\"backTCPPortHAScale\":80,\"label_https\":null,\"frontTCPHttpsHAScale\":443,\"backTCPHttpsHAScale\":443
,\"onlineHelp\":null,\"Label_space\":null,\"label_note_for_custom\":null,\"label_note_for_non_custom\":null,\"onlineT
emplateHelp\":null,\"onlineContainerHelp\":null},\"deploymentOptions\":{\"deploymentOption\":\"Large\",\"vcenter\":
\"Aditya-vc\",\"n1kDVSwitch\":\"AdityaN1K\",\"virtualComputePolicy\":\"Aditya-vc - Default Computing
Policy\",\"virtualStoragePolicy\":\"Aditya-vc - Default Storage
Policy\",\"virtualSystemPolicy\":\"local\",\"endUserSelfServicePolicy\":\"\",\"deployCSR\":true,\"deployVSG\":true,\
"deploySLB\":false,\"ha\":\"No\",\"onlineHelp\":null,\"haModeLabel\":null},\"vpnConfig\":{\"enableSiteToSiteIPSecV
PN\":null,\"vpnPreSharedKey\":null,\"encryption\":null,\"hash\":null,\"remoteSiteIPAddress\":null},\"algConfig\":{\"htt
p\":true,\"https\":true,\"ftp\":true,\"dns\":true,\"icmp\":true,\"sqlnet\":false,\"mssql\":false,\"ldap\":false,\"onlineHe
lp\":null}}","onlineHelp":"N/A"}
</jsonPayload>
<configEntryId></configEntryId>
</CreateContainerRestConfig>
]]>
</payload>
</cuicOperationRequest>
3. Blank Template
<cuicOperationRequest>
<payload>
<![CDATA[
<CreateContainerRestConfig>
69
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
<actionId></actionId>
<containerName>rest3</containerName>
<groupName>Default Group</groupName>
<jsonPayload>
{"svcTemplateName":"Empty Template Rest","templateDescription":null,"containerType":"Stingray - Custom
Container","containerTypeSummary":null,"templateDefinitionData":"{\"networkResourcePool\":{\"label_managementip
pool\":null,\"managementIpPool\":\"mgt\",\"label_extraspace\":null,\"label_csrnetconfig\":null,\"csrUplinkIPPool\":\"
uplink\",\"csrIPType\":null,\"csrL3RoutingProtocol\":null,\"autonomousNumber\":null,\"mtu\":\"1500\",\"onlineHelp\"
:null},\"pnscZones\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCZoneConfig\",\"validatorN
ame\":null},\"pnscAcls\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCAclPolicies\",\"validat
orName\":null},\"stgPnscZones\":{\"list\":[{\"zoneName\":\"appzone\",\"zoneDesc\":\"\",\"vnmcZoneRules\":{\"list\
":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"validatorName\
":null},\"onlineHelp\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneConfig\
",\"validatorName\":null},\"onlineHelpSecurityZone\":null,\"stgPnscAcls\":{\"list\":[],\"moTypeName\":\"com.cloupia.
feature.stingray.firewallpolicy.model.StgVNMCAclPolicies\",\"validatorName\":null},\"onlineHelpACLRules\":null,\"vmN
etworks\":{\"list\":[{\"networkName\":\"lan0\",\"networkType\":\"VLAN\",\"vlanPool\":\"vlanpolicy\",\"vxlanPool\":\
"\",\"portGroup\":\"\",\"ipSubnetPool\":\"Subnet1\",\"staticIPPool\":\"\",\"onlineHelp\":null}],\"moTypeName\":\"c
om.cloupia.feature.stingray.template.ui.StgStingrayVMNetwork\",\"validatorName\":\"StgStingrayVMNetworkListValidat
or\"},\"onlineHelpVMNetworks\":null,\"vms\":{\"list\":[{\"templateName\":null,\"zone\":\"appzone\",\"appName\":\"
appvm\",\"appDescription\":\"\",\"vmImageType\":\"VM
Template\",\"imageId\":\"AppVM\",\"numVCPUs\":1,\"memoryMB\":256,\"cpuReservationMHz\":0,\"memoryReserv
ationMB\":0,\"diskSize\":0,\"passwordResetType\":1,\"templateRootLogin\":\"root\",\"templateRootPassword\":\"\",
\"appCategory\":null,\"isUseImageNetwork\":false,\"networks\":{\"list\":[{\"appName\":\"nic\",\"networkName\":\"l
an0\",\"adapterType\":\"e1000\",\"ipAddress\":null,\"enablePublicIPMapping\":false}],\"moTypeName\":\"com.clou
pia.feature.stingray.template.ui.StgStingrayVirtualMachineNetworkConfig\",\"validatorName\":\"StingrayVirtualMachine
NetworkConfigListValidator\"},\"maxQuantity\":1,\"initialQuantity\":1,\"isStorageEfficiencyEnabled\":false,\"onlineHelp
\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.template.ui.StgStingrayVirtualMachineConfig\",\"validatorNam
e\":\"StgStingrayVirtualMachineConfigListValidator\"},\"onlineHelpNewVM\":null,\"slbConfig\":{\"tierHAScale\":null,\"
networkHAScale\":null,\"protocolHAScale\":null,\"persistenceHAScale\":null,\"label_http\":null,\"frontTCPPortHAScal
e\":80,\"backTCPPortHAScale\":80,\"label_https\":null,\"frontTCPHttpsHAScale\":443,\"backTCPHttpsHAScale\":443
,\"onlineHelp\":null,\"Label_space\":null,\"label_note_for_custom\":null,\"label_note_for_non_custom\":null,\"onlineT
emplateHelp\":null,\"onlineContainerHelp\":null},\"deploymentOptions\":{\"deploymentOption\":\"Large\",\"vcenter\":
\"Aditya-vc\",\"n1kDVSwitch\":\"AdityaN1K\",\"virtualComputePolicy\":\"Aditya-vc - Default Computing
Policy\",\"virtualStoragePolicy\":\"Aditya-vc - Default Storage
Policy\",\"virtualSystemPolicy\":\"local\",\"endUserSelfServicePolicy\":\"\",\"deployCSR\":false,\"deployVSG\":false,
\"deploySLB\":false,\"ha\":\"No\",\"onlineHelp\":null,\"haModeLabel\":null},\"vpnConfig\":{\"enableSiteToSiteIPSecV
PN\":null,\"vpnPreSharedKey\":null,\"encryption\":null,\"hash\":null,\"remoteSiteIPAddress\":null},\"algConfig\":{\"htt
p\":true,\"https\":true,\"ftp\":true,\"dns\":true,\"icmp\":true,\"sqlnet\":false,\"mssql\":false,\"ldap\":false,\"onlineHe
lp\":null}}","onlineHelp":"N/A"}
</jsonPayload>
<configEntryId></configEntryId>
</CreateContainerRestConfig>
]]>
</payload>
</cuicOperationRequest>
4. Internal Template with SLB in HA
<cuicOperationRequest>
<payload>
<![CDATA[
<CreateContainerRestConfig>
<actionId></actionId>
<containerName>rest4</containerName>
<groupName>Default Group</groupName>
70
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
<jsonPayload>
{"svcTemplateName":"Internal Template with SLB in HA Rest","templateDescription":null,"containerType":"Stingray 3 Tier
(Internal)","containerTypeSummary":null,"templateDefinitionData":"{\"networkResourcePool\":{\"label_managementip
pool\":null,\"managementIpPool\":\"mgt\",\"label_extraspace\":null,\"label_csrnetconfig\":null,\"csrUplinkIPPool\":\"
uplink\",\"csrIPType\":\"Private\",\"csrL3RoutingProtocol\":\"EIGRP\",\"autonomousNumber\":\"\",\"mtu\":\"1500\"
,\"onlineHelp\":null},\"pnscZones\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCZoneConfi
g\",\"validatorName\":null},\"pnscAcls\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCAclPo
licies\",\"validatorName\":null},\"stgPnscZones\":{\"list\":[{\"zoneName\":\"WebZone\",\"zoneDesc\":null,\"vnmcZo
neRules\":{\"list\":[{\"attributeType\":\"vm\",\"attributeName\":\"VM
Name\",\"operator\":\"contains\",\"attributeValue\":\"web\",\"prefixedIpAddressValue\":null,\"prefixedSubnetValue\
":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"validatorNa
me\":null},\"onlineHelp\":null},{\"zoneName\":\"AppZone\",\"zoneDesc\":null,\"vnmcZoneRules\":{\"list\":[{\"attribut
eType\":\"vm\",\"attributeName\":\"VM
Name\",\"operator\":\"contains\",\"attributeValue\":\"app\",\"prefixedIpAddressValue\":null,\"prefixedSubnetValue\"
:null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"validatorNam
e\":null},\"onlineHelp\":null},{\"zoneName\":\"DBZone\",\"zoneDesc\":null,\"vnmcZoneRules\":{\"list\":[{\"attributeTy
pe\":\"vm\",\"attributeName\":\"VM
Name\",\"operator\":\"contains\",\"attributeValue\":\"db\",\"prefixedIpAddressValue\":null,\"prefixedSubnetValue\":
null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"validatorNam
e\":null},\"onlineHelp\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneConfi
g\",\"validatorName\":null},\"onlineHelpSecurityZone\":null,\"stgPnscAcls\":{\"list\":[{\"policyName\":null,\"policyDes
c\":null,\"name\":\"allowWebToAppRule\",\"descr\":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"AppZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\
"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyR
uleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"dropWebToDBRule\",\"descr
\":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"DBZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\"
prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRul
eConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"allowAppToDBRule\",\"descr\
":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"AppZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\
"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyR
uleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"DBZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\"
prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRul
eConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"dropDBToWebRule\",\"descr\
":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
71
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"DBZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\"
prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRul
eConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"dropAppToWebRule\",\"de
scr\":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"AppZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\
"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyR
uleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"permitAnyToWebRule\",\"d
escr\":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchany\",\"protocolServiceOption\":\"Service\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[{\"protocalOperator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"http\",\"servicePort\":80,\"
errormessage\":null},{\"protocalOperator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"http\",\"servicePort\
":8080,\"errormessage\":null},{\"protocalOperator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"https\",\"s
ervicePort\":443,\"errormessage\":null},{\"protocalOperator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"ht
tps\",\"servicePort\":8443,\"errormessage\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.mod
el.StgVnmcACLPolicyServiceConfig\",\"validatorName\":null},\"srcRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.
feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"a
ttributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"permitWebToAnyRule\",\"d
escr\":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewall
policy.model.StgVnmcAclPolicyRuleConfig\",\"validatorName\":null}}],\"moTypeName\":\"com.cloupia.feature.stingray.
firewallpolicy.model.StgVNMCAclPolicies\",\"validatorName\":null},\"onlineHelpACLRules\":null,\"vmNetworks\":{\"list
\":[{\"networkName\":\"lan0\",\"networkType\":\"VLAN\",\"vlanPool\":\"vlanpolicy\",\"vxlanPool\":\"\",\"portGroup
\":\"\",\"ipSubnetPool\":\"Subnet1\",\"staticIPPool\":\"\",\"onlineHelp\":null}],\"moTypeName\":\"com.cloupia.featu
re.stingray.template.ui.StgStingrayVMNetwork\",\"validatorName\":\"StgStingrayVMNetworkListValidator\"},\"onlineHel
pVMNetworks\":null,\"vms\":{\"list\":[{\"templateName\":null,\"zone\":\"WebZone\",\"appName\":\"webvm\",\"app
Description\":\"\",\"vmImageType\":\"VM
Template\",\"imageId\":\"AppVM\",\"numVCPUs\":1,\"memoryMB\":256,\"cpuReservationMHz\":0,\"memoryReserv
ationMB\":0,\"diskSize\":0,\"passwordResetType\":1,\"templateRootLogin\":\"root\",\"templateRootPassword\":\"\",
\"appCategory\":null,\"isUseImageNetwork\":false,\"networks\":{\"list\":[{\"appName\":\"nic1\",\"networkName\":\"
lan0\",\"adapterType\":\"e1000\",\"ipAddress\":null,\"enablePublicIPMapping\":false}],\"moTypeName\":\"com.clou
pia.feature.stingray.template.ui.StgStingrayVirtualMachineNetworkConfig\",\"validatorName\":\"StingrayVirtualMachine
NetworkConfigListValidator\"},\"maxQuantity\":1,\"initialQuantity\":1,\"isStorageEfficiencyEnabled\":false,\"onlineHelp
\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.template.ui.StgStingrayVirtualMachineConfig\",\"validatorNam
e\":\"StgStingrayVirtualMachineConfigListValidator\"},\"onlineHelpNewVM\":null,\"slbConfig\":{\"tierHAScale\":\"Web
Zone\",\"networkHAScale\":\"\",\"protocolHAScale\":\"TCP\",\"persistenceHAScale\":\"None\",\"label_http\":null,\
72
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
"frontTCPPortHAScale\":80,\"backTCPPortHAScale\":80,\"label_https\":null,\"frontTCPHttpsHAScale\":443,\"backTC
PHttpsHAScale\":443,\"onlineHelp\":null,\"Label_space\":null,\"label_note_for_custom\":null,\"label_note_for_non_c
ustom\":null,\"onlineTemplateHelp\":null,\"onlineContainerHelp\":null},\"deploymentOptions\":{\"deploymentOption\":
\"Large\",\"vcenter\":\"Aditya-vc\",\"n1kDVSwitch\":\"AdityaN1K\",\"virtualComputePolicy\":\"Aditya-vc - Default
Computing Policy\",\"virtualStoragePolicy\":\"Aditya-vc - Default Storage
Policy\",\"virtualSystemPolicy\":\"local\",\"endUserSelfServicePolicy\":\"\",\"deployCSR\":true,\"deployVSG\":true,\
"deploySLB\":true,\"ha\":\"Yes\",\"onlineHelp\":null,\"haModeLabel\":null},\"vpnConfig\":{\"enableSiteToSiteIPSecV
PN\":null,\"vpnPreSharedKey\":null,\"encryption\":null,\"hash\":null,\"remoteSiteIPAddress\":null},\"algConfig\":{\"htt
p\":true,\"https\":true,\"ftp\":true,\"dns\":true,\"icmp\":true,\"sqlnet\":false,\"mssql\":false,\"ldap\":false,\"onlineHe
lp\":null}}","onlineHelp":"N/A"}
</jsonPayload>
<configEntryId></configEntryId>
</CreateContainerRestConfig>
]]>
</payload>
</cuicOperationRequest>
5. Internal Template without SLB in HA
<cuicOperationRequest>
<payload>
<![CDATA[
<CreateContainerRestConfig>
<actionId></actionId>
<containerName>rest5</containerName>
<groupName>Default Group</groupName>
<jsonPayload>
{"svcTemplateName":"Internal Template without SLB in HA
Rest","templateDescription":null,"containerType":"Stingray - 3 Tier
(Internal)","containerTypeSummary":null,"templateDefinitionData":"{\"networkResourcePool\":{\"label_managementip
pool\":null,\"managementIpPool\":\"mgt\",\"label_extraspace\":null,\"label_csrnetconfig\":null,\"csrUplinkIPPool\":\"
uplink\",\"csrIPType\":\"Private\",\"csrL3RoutingProtocol\":\"EIGRP\",\"autonomousNumber\":\"\",\"mtu\":\"1500\"
,\"onlineHelp\":null},\"pnscZones\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCZoneConfi
g\",\"validatorName\":null},\"pnscAcls\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCAclPo
licies\",\"validatorName\":null},\"stgPnscZones\":{\"list\":[{\"zoneName\":\"WebZone\",\"zoneDesc\":null,\"vnmcZo
neRules\":{\"list\":[{\"attributeType\":\"vm\",\"attributeName\":\"VM
Name\",\"operator\":\"contains\",\"attributeValue\":\"web\",\"prefixedIpAddressValue\":null,\"prefixedSubnetValue\
":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"validatorNa
me\":null},\"onlineHelp\":null},{\"zoneName\":\"AppZone\",\"zoneDesc\":null,\"vnmcZoneRules\":{\"list\":[{\"attribut
eType\":\"vm\",\"attributeName\":\"VM
Name\",\"operator\":\"contains\",\"attributeValue\":\"app\",\"prefixedIpAddressValue\":null,\"prefixedSubnetValue\"
:null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"validatorNam
e\":null},\"onlineHelp\":null},{\"zoneName\":\"DBZone\",\"zoneDesc\":null,\"vnmcZoneRules\":{\"list\":[{\"attributeTy
pe\":\"vm\",\"attributeName\":\"VM
Name\",\"operator\":\"contains\",\"attributeValue\":\"db\",\"prefixedIpAddressValue\":null,\"prefixedSubnetValue\":
null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"validatorNam
e\":null},\"onlineHelp\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneConfi
g\",\"validatorName\":null},\"onlineHelpSecurityZone\":null,\"stgPnscAcls\":{\"list\":[{\"policyName\":null,\"policyDes
c\":null,\"name\":\"allowWebToAppRule\",\"descr\":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
73
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Name\",\"operator\":null,\"attributeValue\":\"AppZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\
"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyR
uleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"dropWebToDBRule\",\"descr
\":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"DBZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\"
prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRul
eConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"allowAppToDBRule\",\"descr\
":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"AppZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\
"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyR
uleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"DBZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\"
prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRul
eConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"dropDBToWebRule\",\"descr\
":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"DBZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\"
prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRul
eConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"dropAppToWebRule\",\"de
scr\":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"AppZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\
"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyR
uleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"permitAnyToWebRule\",\"d
escr\":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchany\",\"protocolServiceOption\":\"Service\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[{\"protocalOperator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"http\",\"servicePort\":80,\"
errormessage\":null},{\"protocalOperator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"http\",\"servicePort\
":8080,\"errormessage\":null},{\"protocalOperator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"https\",\"s
ervicePort\":443,\"errormessage\":null},{\"protocalOperator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"ht
tps\",\"servicePort\":8443,\"errormessage\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.mod
el.StgVnmcACLPolicyServiceConfig\",\"validatorName\":null},\"srcRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.
feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"a
ttributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
74
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"permitWebToAnyRule\",\"d
escr\":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewall
policy.model.StgVnmcAclPolicyRuleConfig\",\"validatorName\":null}}],\"moTypeName\":\"com.cloupia.feature.stingray.
firewallpolicy.model.StgVNMCAclPolicies\",\"validatorName\":null},\"onlineHelpACLRules\":null,\"vmNetworks\":{\"list
\":[{\"networkName\":\"lan0\",\"networkType\":\"VLAN\",\"vlanPool\":\"vlanpolicy\",\"vxlanPool\":\"\",\"portGroup
\":\"\",\"ipSubnetPool\":\"Subnet1\",\"staticIPPool\":\"\",\"onlineHelp\":null}],\"moTypeName\":\"com.cloupia.featu
re.stingray.template.ui.StgStingrayVMNetwork\",\"validatorName\":\"StgStingrayVMNetworkListValidator\"},\"onlineHel
pVMNetworks\":null,\"vms\":{\"list\":[{\"templateName\":null,\"zone\":\"WebZone\",\"appName\":\"vm1\",\"appDe
scription\":\"\",\"vmImageType\":\"VM
Template\",\"imageId\":\"AppVM\",\"numVCPUs\":1,\"memoryMB\":256,\"cpuReservationMHz\":0,\"memoryReserv
ationMB\":0,\"diskSize\":0,\"passwordResetType\":1,\"templateRootLogin\":\"root\",\"templateRootPassword\":\"\",
\"appCategory\":null,\"isUseImageNetwork\":false,\"networks\":{\"list\":[{\"appName\":\"nic1\",\"networkName\":\"
lan0\",\"adapterType\":\"e1000\",\"ipAddress\":null,\"enablePublicIPMapping\":false}],\"moTypeName\":\"com.clou
pia.feature.stingray.template.ui.StgStingrayVirtualMachineNetworkConfig\",\"validatorName\":\"StingrayVirtualMachine
NetworkConfigListValidator\"},\"maxQuantity\":1,\"initialQuantity\":1,\"isStorageEfficiencyEnabled\":false,\"onlineHelp
\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.template.ui.StgStingrayVirtualMachineConfig\",\"validatorNam
e\":\"StgStingrayVirtualMachineConfigListValidator\"},\"onlineHelpNewVM\":null,\"slbConfig\":{\"tierHAScale\":null,\"
networkHAScale\":null,\"protocolHAScale\":null,\"persistenceHAScale\":null,\"label_http\":null,\"frontTCPPortHAScal
e\":80,\"backTCPPortHAScale\":80,\"label_https\":null,\"frontTCPHttpsHAScale\":443,\"backTCPHttpsHAScale\":443
,\"onlineHelp\":null,\"Label_space\":null,\"label_note_for_custom\":null,\"label_note_for_non_custom\":null,\"onlineT
emplateHelp\":null,\"onlineContainerHelp\":null},\"deploymentOptions\":{\"deploymentOption\":\"Large\",\"vcenter\":
\"Aditya-vc\",\"n1kDVSwitch\":\"AdityaN1K\",\"virtualComputePolicy\":\"Aditya-vc - Default Computing
Policy\",\"virtualStoragePolicy\":\"Aditya-vc - Default Storage
Policy\",\"virtualSystemPolicy\":\"local\",\"endUserSelfServicePolicy\":\"\",\"deployCSR\":true,\"deployVSG\":true,\
"deploySLB\":false,\"ha\":\"Yes\",\"onlineHelp\":null,\"haModeLabel\":null},\"vpnConfig\":{\"enableSiteToSiteIPSecV
PN\":null,\"vpnPreSharedKey\":null,\"encryption\":null,\"hash\":null,\"remoteSiteIPAddress\":null},\"algConfig\":{\"htt
p\":true,\"https\":true,\"ftp\":true,\"dns\":true,\"icmp\":true,\"sqlnet\":false,\"mssql\":false,\"ldap\":false,\"onlineHe
lp\":null}}","onlineHelp":"N/A"}
</jsonPayload>
<configEntryId></configEntryId>
</CreateContainerRestConfig>
]]>
</payload>
</cuicOperationRequest>
6. External Template with SLB in Non HA
<cuicOperationRequest>
<payload>
<![CDATA[
<CreateContainerRestConfig>
<actionId></actionId>
<containerName>rest6</containerName>
<groupName>Default Group</groupName>
<jsonPayload>
{"svcTemplateName":"External Template with SLB in Non HA
Rest","templateDescription":null,"containerType":"Stingray - 3 Tier
(External)","containerTypeSummary":null,"templateDefinitionData":"{\"networkResourcePool\":{\"label_managementip
75
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
pool\":null,\"managementIpPool\":\"mgt\",\"label_extraspace\":null,\"label_csrnetconfig\":null,\"csrUplinkIPPool\":\"
uplink\",\"csrIPType\":\"Private\",\"csrL3RoutingProtocol\":\"EIGRP\",\"autonomousNumber\":\"\",\"mtu\":\"1500\"
,\"onlineHelp\":null},\"pnscZones\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCZoneConfi
g\",\"validatorName\":null},\"pnscAcls\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCAclPo
licies\",\"validatorName\":null},\"stgPnscZones\":{\"list\":[{\"zoneName\":\"WebZone\",\"zoneDesc\":null,\"vnmcZo
neRules\":{\"list\":[{\"attributeType\":\"vm\",\"attributeName\":\"VM
Name\",\"operator\":\"contains\",\"attributeValue\":\"web\",\"prefixedIpAddressValue\":null,\"prefixedSubnetValue\
":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"validatorNa
me\":null},\"onlineHelp\":null},{\"zoneName\":\"AppZone\",\"zoneDesc\":null,\"vnmcZoneRules\":{\"list\":[{\"attribut
eType\":\"vm\",\"attributeName\":\"VM
Name\",\"operator\":\"contains\",\"attributeValue\":\"app\",\"prefixedIpAddressValue\":null,\"prefixedSubnetValue\"
:null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"validatorNam
e\":null},\"onlineHelp\":null},{\"zoneName\":\"DBZone\",\"zoneDesc\":null,\"vnmcZoneRules\":{\"list\":[{\"attributeTy
pe\":\"vm\",\"attributeName\":\"VM
Name\",\"operator\":\"contains\",\"attributeValue\":\"db\",\"prefixedIpAddressValue\":null,\"prefixedSubnetValue\":
null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"validatorNam
e\":null},\"onlineHelp\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneConfi
g\",\"validatorName\":null},\"onlineHelpSecurityZone\":null,\"stgPnscAcls\":{\"list\":[{\"policyName\":null,\"policyDes
c\":null,\"name\":\"allowWebToAppRule\",\"descr\":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"AppZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\
"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyR
uleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"dropWebToDBRule\",\"descr
\":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"DBZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\"
prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRul
eConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"allowAppToDBRule\",\"descr\
":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"AppZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\
"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyR
uleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"DBZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\"
prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRul
eConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"dropDBToWebRule\",\"descr\
":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"DBZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\"
prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRul
76
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
eConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"dropAppToWebRule\",\"de
scr\":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"AppZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\
"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyR
uleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"dropDBToAnyRule\",\"desc
r\":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"DBZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\"
prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRul
eConfig\",\"validatorName\":null},\"destRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpoli
cy.model.StgVnmcAclPolicyRuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"
dropAppToAnyRule\",\"descr\":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"AppZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\
"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyR
uleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallp
olicy.model.StgVnmcAclPolicyRuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":
\"permitAnyToWebRule\",\"descr\":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchany\",\"protocolServiceOption\":\"Service\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[{\"protocalOperator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"http\",\"servicePort\":80,\"
errormessage\":null},{\"protocalOperator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"http\",\"servicePort\
":8080,\"errormessage\":null},{\"protocalOperator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"https\",\"s
ervicePort\":443,\"errormessage\":null},{\"protocalOperator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"ht
tps\",\"servicePort\":8443,\"errormessage\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.mod
el.StgVnmcACLPolicyServiceConfig\",\"validatorName\":null},\"srcRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.
feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"a
ttributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"permitWebToAnyRule\",\"d
escr\":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewall
policy.model.StgVnmcAclPolicyRuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\
":\"permitAnyToAppRule\",\"descr\":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
77
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
",\"validatorName\":null},\"srcRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.
StgVnmcAclPolicyRuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeN
ame\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"AppZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\
"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyR
uleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"dropAnyToDBRule\",\"descr\
":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.
StgVnmcAclPolicyRuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeN
ame\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"DBZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\"
prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRul
eConfig\",\"validatorName\":null}}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCAclP
olicies\",\"validatorName\":null},\"onlineHelpACLRules\":null,\"vmNetworks\":{\"list\":[{\"networkName\":\"lan0\",\"
networkType\":\"VLAN\",\"vlanPool\":\"vlanpolicy\",\"vxlanPool\":\"\",\"portGroup\":\"\",\"ipSubnetPool\":\"Subne
t1\",\"staticIPPool\":\"\",\"onlineHelp\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.template.ui.StgStingray
VMNetwork\",\"validatorName\":\"StgStingrayVMNetworkListValidator\"},\"onlineHelpVMNetworks\":null,\"vms\":{\"li
st\":[{\"templateName\":null,\"zone\":\"WebZone\",\"appName\":\"vm1\",\"appDescription\":\"\",\"vmImageType\
":\"VM
Template\",\"imageId\":\"AppVM\",\"numVCPUs\":1,\"memoryMB\":256,\"cpuReservationMHz\":0,\"memoryReserv
ationMB\":0,\"diskSize\":0,\"passwordResetType\":1,\"templateRootLogin\":\"root\",\"templateRootPassword\":\"\",
\"appCategory\":null,\"isUseImageNetwork\":false,\"networks\":{\"list\":[{\"appName\":\"nic1\",\"networkName\":\"
lan0\",\"adapterType\":\"e1000\",\"ipAddress\":null,\"enablePublicIPMapping\":false}],\"moTypeName\":\"com.clou
pia.feature.stingray.template.ui.StgStingrayVirtualMachineNetworkConfig\",\"validatorName\":\"StingrayVirtualMachine
NetworkConfigListValidator\"},\"maxQuantity\":1,\"initialQuantity\":1,\"isStorageEfficiencyEnabled\":false,\"onlineHelp
\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.template.ui.StgStingrayVirtualMachineConfig\",\"validatorNam
e\":\"StgStingrayVirtualMachineConfigListValidator\"},\"onlineHelpNewVM\":null,\"slbConfig\":{\"tierHAScale\":\"Web
Zone\",\"networkHAScale\":\"\",\"protocolHAScale\":\"TCP\",\"persistenceHAScale\":\"None\",\"label_http\":null,\
"frontTCPPortHAScale\":80,\"backTCPPortHAScale\":80,\"label_https\":null,\"frontTCPHttpsHAScale\":443,\"backTC
PHttpsHAScale\":443,\"onlineHelp\":null,\"Label_space\":null,\"label_note_for_custom\":null,\"label_note_for_non_c
ustom\":null,\"onlineTemplateHelp\":null,\"onlineContainerHelp\":null},\"deploymentOptions\":{\"deploymentOption\":
\"Large\",\"vcenter\":\"Aditya-vc\",\"n1kDVSwitch\":\"AdityaN1K\",\"virtualComputePolicy\":\"Aditya-vc - Default
Computing Policy\",\"virtualStoragePolicy\":\"Aditya-vc - Default Storage
Policy\",\"virtualSystemPolicy\":\"local\",\"endUserSelfServicePolicy\":\"\",\"deployCSR\":true,\"deployVSG\":true,\
"deploySLB\":true,\"ha\":\"No\",\"onlineHelp\":null,\"haModeLabel\":null},\"vpnConfig\":{\"enableSiteToSiteIPSecVP
N\":null,\"vpnPreSharedKey\":null,\"encryption\":null,\"hash\":null,\"remoteSiteIPAddress\":null},\"algConfig\":{\"http
\":true,\"https\":true,\"ftp\":true,\"dns\":true,\"icmp\":true,\"sqlnet\":false,\"mssql\":false,\"ldap\":false,\"onlineHel
p\":null}}","onlineHelp":"N/A"}
</jsonPayload>
<configEntryId></configEntryId>
</CreateContainerRestConfig>
]]>
</payload>
</cuicOperationRequest>
7. External Template without SLB in a non-HA mode
<cuicOperationRequest>
<payload>
<![CDATA[
<CreateContainerRestConfig>
<actionId></actionId>
<containerName>rest7</containerName>
78
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
<groupName>Default Group</groupName>
<jsonPayload>
{"svcTemplateName":"External Template without SLB in Non HA
Rest","templateDescription":null,"containerType":"Stingray - 3 Tier
(External)","containerTypeSummary":null,"templateDefinitionData":"{\"networkResourcePool\":{\"label_managementip
pool\":null,\"managementIpPool\":\"mgt\",\"label_extraspace\":null,\"label_csrnetconfig\":null,\"csrUplinkIPPool\":\"
uplink\",\"csrIPType\":\"Private\",\"csrL3RoutingProtocol\":\"EIGRP\",\"autonomousNumber\":\"\",\"mtu\":\"1500\"
,\"onlineHelp\":null},\"pnscZones\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCZoneConfi
g\",\"validatorName\":null},\"pnscAcls\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCAclPo
licies\",\"validatorName\":null},\"stgPnscZones\":{\"list\":[{\"zoneName\":\"WebZone\",\"zoneDesc\":null,\"vnmcZo
neRules\":{\"list\":[{\"attributeType\":\"vm\",\"attributeName\":\"VM
Name\",\"operator\":\"contains\",\"attributeValue\":\"web\",\"prefixedIpAddressValue\":null,\"prefixedSubnetValue\
":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"validatorNa
me\":null},\"onlineHelp\":null},{\"zoneName\":\"AppZone\",\"zoneDesc\":null,\"vnmcZoneRules\":{\"list\":[{\"attribut
eType\":\"vm\",\"attributeName\":\"VM
Name\",\"operator\":\"contains\",\"attributeValue\":\"app\",\"prefixedIpAddressValue\":null,\"prefixedSubnetValue\"
:null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"validatorNam
e\":null},\"onlineHelp\":null},{\"zoneName\":\"DBZone\",\"zoneDesc\":null,\"vnmcZoneRules\":{\"list\":[{\"attributeTy
pe\":\"vm\",\"attributeName\":\"VM
Name\",\"operator\":\"contains\",\"attributeValue\":\"db\",\"prefixedIpAddressValue\":null,\"prefixedSubnetValue\":
null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"validatorNam
e\":null},\"onlineHelp\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneConfi
g\",\"validatorName\":null},\"onlineHelpSecurityZone\":null,\"stgPnscAcls\":{\"list\":[{\"policyName\":null,\"policyDes
c\":null,\"name\":\"allowWebToAppRule\",\"descr\":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"AppZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\
"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyR
uleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"dropWebToDBRule\",\"descr
\":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"DBZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\"
prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRul
eConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"allowAppToDBRule\",\"descr\
":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"AppZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\
"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyR
uleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"DBZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\"
prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRul
eConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"dropDBToWebRule\",\"descr\
":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"match-
79
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
all\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"DBZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\"
prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRul
eConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"dropAppToWebRule\",\"de
scr\":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"AppZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\
"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyR
uleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"dropDBToAnyRule\",\"desc
r\":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"DBZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\"
prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRul
eConfig\",\"validatorName\":null},\"destRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpoli
cy.model.StgVnmcAclPolicyRuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"
dropAppToAnyRule\",\"descr\":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"AppZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\
"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyR
uleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallp
olicy.model.StgVnmcAclPolicyRuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":
\"permitAnyToWebRule\",\"descr\":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchany\",\"protocolServiceOption\":\"Service\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[{\"protocalOperator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"http\",\"servicePort\":80,\"
errormessage\":null},{\"protocalOperator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"http\",\"servicePort\
":8080,\"errormessage\":null},{\"protocalOperator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"https\",\"s
ervicePort\":443,\"errormessage\":null},{\"protocalOperator\":\"eq\",\"protocalValue\":\"TCP\",\"serviceName\":\"ht
tps\",\"servicePort\":8443,\"errormessage\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.mod
el.StgVnmcACLPolicyServiceConfig\",\"validatorName\":null},\"srcRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.
feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"a
ttributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
RuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"permitWebToAnyRule\",\"d
escr\":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeName\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"WebZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,
\"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicy
80
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
RuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewall
policy.model.StgVnmcAclPolicyRuleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\
":\"permitAnyToAppRule\",\"descr\":null,\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.
StgVnmcAclPolicyRuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeN
ame\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"AppZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\
"prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyR
uleConfig\",\"validatorName\":null}},{\"policyName\":null,\"policyDesc\":null,\"name\":\"dropAnyToDBRule\",\"descr\
":null,\"firewallAction\":\"drop\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":null,\"protocalValue\":null,\"servic
es\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig\
",\"validatorName\":null},\"srcRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.
StgVnmcAclPolicyRuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[{\"attributeType\":\"zone\",\"attributeN
ame\":\"Zone
Name\",\"operator\":null,\"attributeValue\":\"DBZone\",\"zoneAttributeValue\":null,\"prefixedIpAddressValue\":null,\"
prefixedSubnetValue\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcAclPolicyRul
eConfig\",\"validatorName\":null}}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCAclP
olicies\",\"validatorName\":null},\"onlineHelpACLRules\":null,\"vmNetworks\":{\"list\":[{\"networkName\":\"lan0\",\"
networkType\":\"VLAN\",\"vlanPool\":\"vlanpolicy\",\"vxlanPool\":\"\",\"portGroup\":\"\",\"ipSubnetPool\":\"Subne
t1\",\"staticIPPool\":\"\",\"onlineHelp\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.template.ui.StgStingray
VMNetwork\",\"validatorName\":\"StgStingrayVMNetworkListValidator\"},\"onlineHelpVMNetworks\":null,\"vms\":{\"li
st\":[{\"templateName\":null,\"zone\":\"WebZone\",\"appName\":\"vm1\",\"appDescription\":\"\",\"vmImageType\
":\"VM
Template\",\"imageId\":\"AppVM\",\"numVCPUs\":1,\"memoryMB\":256,\"cpuReservationMHz\":0,\"memoryReserv
ationMB\":0,\"diskSize\":0,\"passwordResetType\":1,\"templateRootLogin\":\"root\",\"templateRootPassword\":\"\",
\"appCategory\":null,\"isUseImageNetwork\":false,\"networks\":{\"list\":[{\"appName\":\"nic1\",\"networkName\":\"
lan0\",\"adapterType\":\"e1000\",\"ipAddress\":null,\"enablePublicIPMapping\":false}],\"moTypeName\":\"com.clou
pia.feature.stingray.template.ui.StgStingrayVirtualMachineNetworkConfig\",\"validatorName\":\"StingrayVirtualMachine
NetworkConfigListValidator\"},\"maxQuantity\":1,\"initialQuantity\":1,\"isStorageEfficiencyEnabled\":false,\"onlineHelp
\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.template.ui.StgStingrayVirtualMachineConfig\",\"validatorNam
e\":\"StgStingrayVirtualMachineConfigListValidator\"},\"onlineHelpNewVM\":null,\"slbConfig\":{\"tierHAScale\":null,\"
networkHAScale\":null,\"protocolHAScale\":null,\"persistenceHAScale\":null,\"label_http\":null,\"frontTCPPortHAScal
e\":80,\"backTCPPortHAScale\":80,\"label_https\":null,\"frontTCPHttpsHAScale\":443,\"backTCPHttpsHAScale\":443
,\"onlineHelp\":null,\"Label_space\":null,\"label_note_for_custom\":null,\"label_note_for_non_custom\":null,\"onlineT
emplateHelp\":null,\"onlineContainerHelp\":null},\"deploymentOptions\":{\"deploymentOption\":\"Large\",\"vcenter\":
\"Aditya-vc\",\"n1kDVSwitch\":\"AdityaN1K\",\"virtualComputePolicy\":\"Aditya-vc - Default Computing
Policy\",\"virtualStoragePolicy\":\"Aditya-vc - Default Storage
Policy\",\"virtualSystemPolicy\":\"local\",\"endUserSelfServicePolicy\":\"\",\"deployCSR\":true,\"deployVSG\":true,\
"deploySLB\":false,\"ha\":\"No\",\"onlineHelp\":null,\"haModeLabel\":null},\"vpnConfig\":{\"enableSiteToSiteIPSecV
PN\":null,\"vpnPreSharedKey\":null,\"encryption\":null,\"hash\":null,\"remoteSiteIPAddress\":null},\"algConfig\":{\"htt
p\":true,\"https\":true,\"ftp\":true,\"dns\":true,\"icmp\":true,\"sqlnet\":false,\"mssql\":false,\"ldap\":false,\"onlineHe
lp\":null}}","onlineHelp":"N/A"}
</jsonPayload>
<configEntryId></configEntryId>
</CreateContainerRestConfig>
]]>
</payload>
</cuicOperationRequest>
8. Only SLBin a non-HA mode
<cuicOperationRequest>
81
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
<payload>
<![CDATA[
<CreateContainerRestConfig>
<actionId></actionId>
<containerName>rest8</containerName>
<groupName>Default Group</groupName>
<jsonPayload>
{"svcTemplateName":"Only SLB Non HA Rest","templateDescription":null,"containerType":"Stingray - Custom
Container","containerTypeSummary":null,"templateDefinitionData":"{\"networkResourcePool\":{\"label_managementip
pool\":null,\"managementIpPool\":\"mgt\",\"label_extraspace\":null,\"label_csrnetconfig\":null,\"csrUplinkIPPool\":\"
uplink\",\"csrIPType\":\"Private\",\"csrL3RoutingProtocol\":\"EIGRP\",\"autonomousNumber\":\"\",\"mtu\":\"1500\"
,\"onlineHelp\":null},\"pnscZones\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCZoneConfi
g\",\"validatorName\":null},\"pnscAcls\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCAclPo
licies\",\"validatorName\":null},\"stgPnscZones\":{\"list\":[{\"zoneName\":\"Web\",\"zoneDesc\":\"\",\"vnmcZoneRu
les\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"vali
datorName\":null},\"onlineHelp\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMC
ZoneConfig\",\"validatorName\":null},\"onlineHelpSecurityZone\":null,\"stgPnscAcls\":{\"list\":[],\"moTypeName\":\"
com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCAclPolicies\",\"validatorName\":null},\"onlineHelpACLRules\
":null,\"vmNetworks\":{\"list\":[{\"networkName\":\"lan0\",\"networkType\":\"VLAN\",\"vlanPool\":\"vlanpolicy\",\"
vxlanPool\":\"\",\"portGroup\":\"\",\"ipSubnetPool\":\"Subnet1\",\"staticIPPool\":\"\",\"onlineHelp\":null}],\"moTyp
eName\":\"com.cloupia.feature.stingray.template.ui.StgStingrayVMNetwork\",\"validatorName\":\"StgStingrayVMNetw
orkListValidator\"},\"onlineHelpVMNetworks\":null,\"vms\":{\"list\":[{\"templateName\":null,\"zone\":\"Web\",\"appN
ame\":\"web-vm1\",\"appDescription\":\"\",\"vmImageType\":\"VM
Template\",\"imageId\":\"AppVM\",\"numVCPUs\":1,\"memoryMB\":256,\"cpuReservationMHz\":0,\"memoryReserv
ationMB\":0,\"diskSize\":0,\"passwordResetType\":1,\"templateRootLogin\":\"root\",\"templateRootPassword\":\"\",
\"appCategory\":null,\"isUseImageNetwork\":false,\"networks\":{\"list\":[{\"appName\":\"eth0\",\"networkName\":\
"lan0\",\"adapterType\":\"e1000\",\"ipAddress\":null,\"enablePublicIPMapping\":false}],\"moTypeName\":\"com.clo
upia.feature.stingray.template.ui.StgStingrayVirtualMachineNetworkConfig\",\"validatorName\":\"StingrayVirtualMachine
NetworkConfigListValidator\"},\"maxQuantity\":1,\"initialQuantity\":1,\"isStorageEfficiencyEnabled\":false,\"onlineHelp
\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.template.ui.StgStingrayVirtualMachineConfig\",\"validatorNam
e\":\"StgStingrayVirtualMachineConfigListValidator\"},\"onlineHelpNewVM\":null,\"slbConfig\":{\"tierHAScale\":\"Web
\",\"networkHAScale\":\"lan0\",\"protocolHAScale\":\"TCP\",\"persistenceHAScale\":\"None\",\"label_http\":null,\"
frontTCPPortHAScale\":80,\"backTCPPortHAScale\":80,\"label_https\":null,\"frontTCPHttpsHAScale\":443,\"backTCP
HttpsHAScale\":443,\"onlineHelp\":null,\"Label_space\":null,\"label_note_for_custom\":null,\"label_note_for_non_cus
tom\":null,\"onlineTemplateHelp\":null,\"onlineContainerHelp\":null},\"deploymentOptions\":{\"deploymentOption\":\"
Large\",\"vcenter\":\"Aditya-vc\",\"n1kDVSwitch\":\"AdityaN1K\",\"virtualComputePolicy\":\"Aditya-vc - Default
Computing Policy\",\"virtualStoragePolicy\":\"Aditya-vc - Default Storage
Policy\",\"virtualSystemPolicy\":\"local\",\"endUserSelfServicePolicy\":\"\",\"deployCSR\":false,\"deployVSG\":false,
\"deploySLB\":true,\"ha\":\"No\",\"onlineHelp\":null,\"haModeLabel\":null},\"vpnConfig\":{\"enableSiteToSiteIPSecV
PN\":null,\"vpnPreSharedKey\":null,\"encryption\":null,\"hash\":null,\"remoteSiteIPAddress\":null},\"algConfig\":{\"htt
p\":true,\"https\":true,\"ftp\":true,\"dns\":true,\"icmp\":true,\"sqlnet\":false,\"mssql\":false,\"ldap\":false,\"onlineHe
lp\":null}}","onlineHelp":"N/A"}
</jsonPayload>
<configEntryId></configEntryId>
</CreateContainerRestConfig>
]]>
</payload>
</cuicOperationRequest>
9. Only CSR in a HA mode
<cuicOperationRequest>
<payload>
<![CDATA[
<CreateContainerRestConfig>
82
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
<actionId></actionId>
<containerName>rest9</containerName>
<groupName>Default Group</groupName>
<jsonPayload>
{"svcTemplateName":"Only CSR HA Rest","templateDescription":null,"containerType":"Stingray - Custom
Container","containerTypeSummary":null,"templateDefinitionData":"{\"networkResourcePool\":{\"label_managementip
pool\":null,\"managementIpPool\":\"mgt\",\"label_extraspace\":null,\"label_csrnetconfig\":null,\"csrUplinkIPPool\":\"
uplink\",\"csrIPType\":\"Private\",\"csrL3RoutingProtocol\":\"EIGRP\",\"autonomousNumber\":\"\",\"mtu\":\"1500\"
,\"onlineHelp\":null},\"pnscZones\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCZoneConfi
g\",\"validatorName\":null},\"pnscAcls\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCAclPo
licies\",\"validatorName\":null},\"stgPnscZones\":{\"list\":[{\"zoneName\":\"Web\",\"zoneDesc\":\"\",\"vnmcZoneRu
les\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"vali
datorName\":null},\"onlineHelp\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMC
ZoneConfig\",\"validatorName\":null},\"onlineHelpSecurityZone\":null,\"stgPnscAcls\":{\"list\":[],\"moTypeName\":\"
com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCAclPolicies\",\"validatorName\":null},\"onlineHelpACLRules\
":null,\"vmNetworks\":{\"list\":[{\"networkName\":\"lan0\",\"networkType\":\"VLAN\",\"vlanPool\":\"vlanpolicy\",\"
vxlanPool\":\"\",\"portGroup\":\"\",\"ipSubnetPool\":\"Subnet1\",\"staticIPPool\":\"\",\"onlineHelp\":null}],\"moTyp
eName\":\"com.cloupia.feature.stingray.template.ui.StgStingrayVMNetwork\",\"validatorName\":\"StgStingrayVMNetw
orkListValidator\"},\"onlineHelpVMNetworks\":null,\"vms\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.
template.ui.StgStingrayVirtualMachineConfig\",\"validatorName\":\"StgStingrayVirtualMachineConfigListValidator\"},\"o
nlineHelpNewVM\":null,\"slbConfig\":{\"tierHAScale\":null,\"networkHAScale\":null,\"protocolHAScale\":null,\"persist
enceHAScale\":null,\"label_http\":null,\"frontTCPPortHAScale\":80,\"backTCPPortHAScale\":80,\"label_https\":null,\"
frontTCPHttpsHAScale\":443,\"backTCPHttpsHAScale\":443,\"onlineHelp\":null,\"Label_space\":null,\"label_note_for
_custom\":null,\"label_note_for_non_custom\":null,\"onlineTemplateHelp\":null,\"onlineContainerHelp\":null},\"deploy
mentOptions\":{\"deploymentOption\":\"Small\",\"vcenter\":\"Adityavc\",\"n1kDVSwitch\":\"AdityaN1K\",\"virtualComputePolicy\":\"Aditya-vc - Default Computing
Policy\",\"virtualStoragePolicy\":\"Aditya-vc - Default Storage
Policy\",\"virtualSystemPolicy\":\"local\",\"endUserSelfServicePolicy\":\"\",\"deployCSR\":true,\"deployVSG\":false,\
"deploySLB\":false,\"ha\":\"Yes\",\"onlineHelp\":null,\"haModeLabel\":null},\"vpnConfig\":{\"enableSiteToSiteIPSecV
PN\":null,\"vpnPreSharedKey\":null,\"encryption\":null,\"hash\":null,\"remoteSiteIPAddress\":null},\"algConfig\":{\"htt
p\":true,\"https\":true,\"ftp\":true,\"dns\":true,\"icmp\":true,\"sqlnet\":false,\"mssql\":false,\"ldap\":false,\"onlineHe
lp\":null}}","onlineHelp":"N/A"}
</jsonPayload>
<configEntryId></configEntryId>
</CreateContainerRestConfig>
]]>
</payload>
</cuicOperationRequest>
10. Only VSG in a non-HA mode
<cuicOperationRequest>
<payload>
<![CDATA[
<CreateContainerRestConfig>
<actionId></actionId>
<containerName>rest10</containerName>
<groupName>Default Group</groupName>
<jsonPayload>
{"svcTemplateName":"Only VSG Non HA Rest","templateDescription":null,"containerType":"Stingray - Custom
Container","containerTypeSummary":null,"templateDefinitionData":"{\"networkResourcePool\":{\"label_managementip
pool\":null,\"managementIpPool\":\"mgt\",\"label_extraspace\":null,\"label_csrnetconfig\":null,\"csrUplinkIPPool\":\"
uplink\",\"csrIPType\":\"Private\",\"csrL3RoutingProtocol\":\"EIGRP\",\"autonomousNumber\":\"\",\"mtu\":\"1500\"
,\"onlineHelp\":null},\"pnscZones\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCZoneConfi
g\",\"validatorName\":null},\"pnscAcls\":{\"list\":[],\"moTypeName\":\"com.cloupia.lib.cIaaS.vnmc.model.VNMCAclPo
83
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
licies\",\"validatorName\":null},\"stgPnscZones\":{\"list\":[{\"zoneName\":\"zon1\",\"zoneDesc\":\"\",\"vnmcZoneR
ules\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMCZoneRuleConfig\",\"va
lidatorName\":null},\"onlineHelp\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVNMC
ZoneConfig\",\"validatorName\":null},\"onlineHelpSecurityZone\":null,\"stgPnscAcls\":{\"list\":[{\"policyName\":null,\
"policyDesc\":null,\"name\":\"acl1\",\"descr\":\"\",\"firewallAction\":\"permit\",\"matchCriteria\":\"matchall\",\"protocolServiceOption\":\"Protocol\",\"protocol\":true,\"protocalOperator\":\"\",\"protocalValue\":\"\",\"servi
ces\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model.StgVnmcACLPolicyServiceConfig
\",\"validatorName\":null},\"srcRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.feature.stingray.firewallpolicy.model
.StgVnmcAclPolicyRuleConfig\",\"validatorName\":null},\"destRules\":{\"list\":[],\"moTypeName\":\"com.cloupia.featu
re.stingray.firewallpolicy.model.StgVnmcAclPolicyRuleConfig\",\"validatorName\":null}}],\"moTypeName\":\"com.cloup
ia.feature.stingray.firewallpolicy.model.StgVNMCAclPolicies\",\"validatorName\":null},\"onlineHelpACLRules\":null,\"vm
Networks\":{\"list\":[{\"networkName\":\"lan0\",\"networkType\":\"VLAN\",\"vlanPool\":\"vlanpolicy\",\"vxlanPool\"
:\"\",\"portGroup\":\"\",\"ipSubnetPool\":\"Subnet1\",\"staticIPPool\":\"\",\"onlineHelp\":null}],\"moTypeName\":\"
com.cloupia.feature.stingray.template.ui.StgStingrayVMNetwork\",\"validatorName\":\"StgStingrayVMNetworkListValida
tor\"},\"onlineHelpVMNetworks\":null,\"vms\":{\"list\":[{\"templateName\":null,\"zone\":\"zon1\",\"appName\":\"1\"
,\"appDescription\":\"\",\"vmImageType\":\"VM
Template\",\"imageId\":\"AppVM\",\"numVCPUs\":1,\"memoryMB\":256,\"cpuReservationMHz\":0,\"memoryReserv
ationMB\":0,\"diskSize\":0,\"passwordResetType\":1,\"templateRootLogin\":\"root\",\"templateRootPassword\":\"\",
\"appCategory\":null,\"isUseImageNetwork\":false,\"networks\":{\"list\":[{\"appName\":\"nic1\",\"networkName\":\"
lan0\",\"adapterType\":\"e1000\",\"ipAddress\":null,\"enablePublicIPMapping\":false}],\"moTypeName\":\"com.clou
pia.feature.stingray.template.ui.StgStingrayVirtualMachineNetworkConfig\",\"validatorName\":\"StingrayVirtualMachine
NetworkConfigListValidator\"},\"maxQuantity\":1,\"initialQuantity\":1,\"isStorageEfficiencyEnabled\":false,\"onlineHelp
\":null}],\"moTypeName\":\"com.cloupia.feature.stingray.template.ui.StgStingrayVirtualMachineConfig\",\"validatorNam
e\":\"StgStingrayVirtualMachineConfigListValidator\"},\"onlineHelpNewVM\":null,\"slbConfig\":{\"tierHAScale\":null,\"
networkHAScale\":null,\"protocolHAScale\":null,\"persistenceHAScale\":null,\"label_http\":null,\"frontTCPPortHAScal
e\":80,\"backTCPPortHAScale\":80,\"label_https\":null,\"frontTCPHttpsHAScale\":443,\"backTCPHttpsHAScale\":443
,\"onlineHelp\":null,\"Label_space\":null,\"label_note_for_custom\":null,\"label_note_for_non_custom\":null,\"onlineT
emplateHelp\":null,\"onlineContainerHelp\":null},\"deploymentOptions\":{\"deploymentOption\":\"Large\",\"vcenter\":
\"Aditya-vc\",\"n1kDVSwitch\":\"AdityaN1K\",\"virtualComputePolicy\":\"Aditya-vc - Default Computing
Policy\",\"virtualStoragePolicy\":\"Aditya-vc - Default Storage
Policy\",\"virtualSystemPolicy\":\"local\",\"endUserSelfServicePolicy\":\"\",\"deployCSR\":false,\"deployVSG\":true,\
"deploySLB\":false,\"ha\":\"No\",\"onlineHelp\":null,\"haModeLabel\":null},\"vpnConfig\":{\"enableSiteToSiteIPSecV
PN\":null,\"vpnPreSharedKey\":null,\"encryption\":null,\"hash\":null,\"remoteSiteIPAddress\":null},\"algConfig\":{\"htt
p\":true,\"https\":true,\"ftp\":true,\"dns\":true,\"icmp\":true,\"sqlnet\":false,\"mssql\":false,\"ldap\":false,\"onlineHe
lp\":null}}","onlineHelp":"N/A"}
</jsonPayload>
<configEntryId></configEntryId>
</CreateContainerRestConfig>
]]>
</payload>
</cuicOperationRequest>
Example
Response Header:
Status
200 OK Loading time: 775
Request headers
Origin: chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo
X-Cloupia-Request-Key: F7894258BDB44299B1AF58991ED40D40
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/45.0.2454.85 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Accept: */*
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
84
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Cookie: JSESSIONID=E9EBA15AEC72768442EB6D71F42B9F35
Response headers
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=ISO-8859-1
Content-Length: 524
Date: Fri, 11 Sep 2015 08:12:46 GMT
Response Body:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cuicOperationResponse>
<Log>
<Messages>2</Messages>
<Message>
<TimeStamp>2015-09-11 08:12:46.811</TimeStamp>
<Severity>INFO</Severity>
<Text>CreateContainerRestHandler rest api logs actionLogger!!!</Text>
</Message>
<Message>
<TimeStamp>2015-09-11 08:12:47.447</TimeStamp>
<Severity>INFO</Severity>
<Text>Container created. Service Request 21 is in progress to setup the container.</Text>
</Message>
</Log>
<operationStatus>0</operationStatus>
<responseMap/>
</cuicOperationResponse>
userAPIGetZones
Method
GET
Resource URL
http://<UCSD IP>/app/api/rest?formatType=json&opName=vacs:userAPIGetZones&opData={param0:<container-id>}
Description
Fetches the zone details from a container.
Sample URL
http://<IP Address>/ /app/api/rest?formatType=json&opName=vacs: userAPIGetZones &opData={param0:3}
Accessible
Administrator/end user
Sample Output
Response:
{ "serviceResult":"[\"WebZone\",\"AppZone\",\"DBZone\"]", "serviceError":null,
"serviceName":"InfraMgr", "opName":"vacs:userAPIGetZones" }
85
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
userAPIGetZonesWithVM
Method
GET
Resource URL
http://<UCSD
IP>/app/api/rest?formatType=json&opName=vacs:userAPIGetZonesWithVMInfo&opData={param0:<container-id>}
Description
Fetches the zone details for a VM.
Sample URL
http://<IP Address>/app/api/rest?formatType=json&opName=vacs: userAPIGetZonesWithVMInfo&opData={param0:3}
Accessible
Administrator/end user
Sample Output
Response:
{ "serviceResult":"{\"web\":[{\"vmName\":\"empty_web_web-vm1-1\",\"vmLabel\":\"empty_web_web-vm11\",\"masterImage\":{\"cloud\":\"Sachin-VC\",\"image\":\"VM-TemplateDC\",\"templateLogin\":\"root\",\"templatePassword\":\"\",\"passwordOption\":1},\"computeConfig\":{\"
deriveFromTemplate\":false,\"numCPUs\":1,\"memoryMB\":256,\"cpuReservationMHz\":0,\"memoryReservation
MB\":0,\"cpuLimitMHz\":0,\"memLimitMB\":0},\"location\":{\"targetCluster\":\"8.8.8.10\",\"targetType\
":\"host\",\"targetDatastore\":\"datastore1\",\"targetFolder\":\"FencedContainers/empty\"},\"nics\":[
{\"enabled\":true,\"alias\":\"lan0\",\"networkName\":\"empty-pglan0\",\"addressType\":\"static\",\"ipAddress\":\"50.50.50.50\",\"networkMask\":\"255.255.255.240\",\
"gateway\":\"50.50.50.49\",\"adapterType\":\"e1000\"}],\"guestConfig\":{\"hostName\":\"emptywebwebvm11\",\"dnsDomain\":\"cisco.com\",\"windowsInfo\":{\"useLicenseFromTemplate\":false,\"productId\":\"\",
\"windowsDomain\":\"\",\"isAutoLogon\":true,\"autoLogonCount\":5,\"password\":\"\",\"domainAdmin\":\"
\",\"domainPassword\":\"\",\"workGroupName\":\"\",\"joinTypeDomain\":true,\"isSIDUnique\":false,\"lic
enseMode\":\"PerSeat\",\"licenseUsers\":5,\"linuxTimezone\":\"US/Pacific\",\"windowsTimezone\":4,\"orgName\":\"Compan
yName\",\"fullName\":\"CompanyFullName\",\"winList\":\"\"}},\"owner\":{\"srId\":15,\"groupId\":1,\"vd
cId\":3,\"containerId\":3},\"options\":{\"powerOn\":true,\"makeVmNameUnique\":true,\"doThinProvisioni
ng\":true,\"useStorageEfficiency\":false,\"enableConsoleAccess\":true,\"overwriteTemplateDiskType\":f
alse},\"leaseInfo\":{\"isUnlimited\":true,\"durationDays\":0,\"durationHours\":0},\"vmType\":\"app\",
\"vmNameInTemplate\":\"webvm1\",\"requestId\":15,\"useImageNetwork\":false,\"diskSize\":0.0}],\"db\":[{\"vmName\":\"empty_db_db
-vm1-1\",\"vmLabel\":\"empty_db_db-vm1-1\",\"masterImage\":{\"cloud\":\"Sachin-VC\",\"image\":\"VMTemplateDC\",\"templateLogin\":\"root\",\"templatePassword\":\"\",\"passwordOption\":1},\"computeConfig\":{\"
deriveFromTemplate\":false,\"numCPUs\":1,\"memoryMB\":256,\"cpuReservationMHz\":0,\"memoryReservation
MB\":0,\"cpuLimitMHz\":0,\"memLimitMB\":0},\"location\":{\"targetCluster\":\"8.8.8.10\",\"targetType\
":\"host\",\"targetDatastore\":\"datastore1\",\"targetFolder\":\"FencedContainers/empty\"},\"nics\":[
{\"enabled\":true,\"alias\":\"lan0\",\"networkName\":\"empty-pglan0\",\"addressType\":\"static\",\"ipAddress\":\"50.50.50.51\",\"networkMask\":\"255.255.255.240\",\
"gateway\":\"50.50.50.49\",\"adapterType\":\"e1000\"}],\"guestConfig\":{\"hostName\":\"emptydbdb-vm11\",\"dnsDomain\":\"cisco.com\",\"windowsInfo\":{\"useLicenseFromTemplate\":false,\"productId\":\"\",
\"windowsDomain\":\"\",\"isAutoLogon\":true,\"autoLogonCount\":5,\"password\":\"\",\"domainAdmin\":\"
\",\"domainPassword\":\"\",\"workGroupName\":\"\",\"joinTypeDomain\":true,\"isSIDUnique\":false,\"lic
enseMode\":\"PerSeat\",\"licenseUsers\":5,\"linuxTimezone\":\"US/Pacific\",\"windowsTimezone\":4,\"orgName\":\"Compan
yName\",\"fullName\":\"CompanyFullName\",\"winList\":\"\"}},\"owner\":{\"srId\":16,\"groupId\":1,\"vd
cId\":3,\"containerId\":3},\"options\":{\"powerOn\":true,\"makeVmNameUnique\":true,\"doThinProvisioni
ng\":true,\"useStorageEfficiency\":false,\"enableConsoleAccess\":true,\"overwriteTemplateDiskType\":f
alse},\"leaseInfo\":{\"isUnlimited\":true,\"durationDays\":0,\"durationHours\":0},\"vmType\":\"app\",
\"vmNameInTemplate\":\"db-vm1\",\"requestId\":16,\"useImageNetwork\":false,\"diskSize\":0.0}]}",
"serviceError":null, "serviceName":"InfraMgr", "opName":"vacs:userAPIGetZonesWithVMInfo" }
86
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
If no VMs available then Response :
{ "serviceResponse":null, "serviceError":"REMOTE_SERVICE_EXCEPTION: No vms depolyed by this
containerid:3", "serviceName":"InfraMgr", "opName":"vacs:userAPIGetZonesWithVMInfo" }
87
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Service Category Operations
userAPIGetServiceCategory
Description
Returns all service categories in Cisco UCS Director.
Parameters
None
Return Value Type
List APIServiceCategoryPojo
Accessible
Administrator/End user
userAPICreateServiceCategory
Description
Creates a service category in Cisco UCS Director.
Parameters
apiPojo APIServiceCategoryPojo
Return Value Type
Boolean
Accessible
Administrator/End user
userAPICloneServiceCategory
Description
Creates a new service category based on the source service category.
Parameters
apiPojo APIServiceCategoryPojo
Return Value Type
Boolean
Accessible
Administrator/End user
userAPIModifyServiceCategory
Description
Updates the service category in Cisco UCS Director.
Parameters
apiPojo APIServiceCategoryPojo
Return Value Type
Boolean
Accessible
88
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Administrator/End user
userAPIDeleteServiceCategory
Description
Deletes a service category from Cisco UCS Director.
Parameters
serviceOfferingName Name of the service offering to be deleted.
Return Value Type
Boolean
Accessible
Administrator/End user
Service Request Operations
userAPISubmitServiceRequest
Description
Submits a service request for provisioning virtual machines (VMs).
Note:
From Cisco UCS Director Release 5.x and later releases, deprecated the userAPISubmitServiceRequest API for
provisioning a VM. Instead, you can use the userAPIProvisionRequest API to provision a VM. For more details, see
UserAPIProvisionRequest.
Parameters

String catalogName Name of the catalog.

String vdcName Name of the VDC.

int durationHours Duration of VM provisioning in hours. After the set duration, VM will be automatically
deprovisioned. Use -1 to set the duration as indefinite.

long beginTime Schedule the time at which you want to start provisioning a VM. For example, January 1, 2014,
00:00:00 GMT. Use 0 or -1 to start the VM provisioning immediately.

int qty Quantity of VM to be provisioned.
Note:
In Cisco UCS Director Release 5.x, the supported quantity is 1.

String comments Comment that is set as the provisioned VM label.
Return Value Type
Integer (Service Request Id)
Accessible
Administrator/end user
89
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
userAPISubmitServiceRequestCustom
Description
Submits a service request for provisioning virtual machines (VMs) with the inputs vmName, vCPU, and memory.
Note:
From Cisco UCS Director Release 5.x and later releases, deprecated the userAPISubmitServiceRequestCustom API
for provisioning a VM. Instead, you can use the userAPIProvisionRequest API to provision a VM. For more details,
see UserAPIProvisionRequest.
Parameters

String catalogName Name of the catalog.

String vdcName Name of the VDC.

int durationHours Duration of VM provisioning in hours. After the set duration, VM will be automatically
deprovisioned. Use -1 to set the duration as indefinite.

long beginTime Schedule the time at which you want to start provisioning a VM. For example, January 1, 2014,
00:00:00 GMT. Use 0 or -1 to start the VM provisioning immediately.

int qty Quantity of VM to be provisioned.
Note:
In Cisco UCS Director Release 5.x, the supported quantity is 1.

String comments Comment that is set as the provisioned VM label.

String vmName Name of the provisioning VM.

double vCPU Number of virtual CPUs for a VM.

double memory Size of memory in MB.
Return Value Type
Integer (Service Request Id)
Accessible
Administrator/end user
userAPIResubmitServiceRequest
Description
Resubmits a service request for processing the specified service request.
Parameters
APIResubmitServiceRequestParams Specify the service request details that you need to process again. The
APIResubmitServiceRequestParams parameter includes the following attributes:



long requestId ID of the service request that you need to resubmit.
String workflowStepId ID of the workflow step from which you want to start the service request process.
boolean skipApprovals Set to true to skip the approvals while processing the service request.
Return Value Type
String
Accessible
Administrator/end user
90
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
userAPIGetServiceRequests
Description
Returns all service requests of the logged in user.
Parameters
None
Return Value Type
APITabularReport
Accessible
Administrator/end user
userAPIGetChildServiceRequests
Description
Returns the child service requests of the specified parent service request.
Parameters
APIServiceRequestParams params Specify the parent service request ID to fetch the child service request details.
The APIServiceRequestParams includes the following parameter:

private int requestId The ID of the parent service request.
Return Value Type
List APIServiceRequestDetails Displays the service request details that include requestId, requestType,
initiatingUser, groupName, requestTime, comments, provisionQuantity, provisionCatalog, provisionVDCName,
provisionDurationHours, and status. The values of status are: Complete, Failed, In Progress, and Cancelled.
Accessible
Administrator/end user
userAPIGetServiceRequestDetails
Description
Returns service request details.
Parameters
int requestId
Return Value Type
APIServiceRequestDetails Displays the service request details that include requestId, requestType, initiatingUser,
groupName, requestTime, comments, provisionQuantity, provisionCatalog, provisionVDCName,
provisionDurationHours, and status. The values of status are: Complete, Failed, In Progress, and Cancelled.
Accessible
Administrator/end user
userAPICancelServiceRequest
Description
Cancels a service request in progress.
Parameters
int requestID
Return Value Type
91
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
boolean
Accessible
Administrator/end user
userAPIGetServiceRequestLogEntries
Description
Returns the log entries of a service request for the requested severity:




0
1
2
3
Debug
Info
Warning
Error
Parameters

int srId

int severity (0 to 3)
Return Value Type
ServiceRequestLogEntry[ ]
Accessible
Administrator
userAPIGetServiceRequestLogEntriesAtLevels
Description
Returns the log entries of a service request for the requested severity:

0 Debug

1 Info

2 Warning

3 Error
Parameters

int srId

String severityList (Comma separated severity values)
Return Value Type
ServiceRequestLogEntry[]
Accessible
Administrator
userAPIGetServiceRequestWorkFlow
Description
Returns service request workflow details.
Parameters
int requestId
Return Value Type
APIWorkFlowStatus
The values set for the different execution status of a workflow are:
92
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations

EXECUTION_STATUS_NOT_STARTED = 0

EXECUTION_STATUS_IN_PROGRESS = 1

EXECUTION_STATUS_FAILED = 2

EXECUTION_STATUS_COMPLETED = 3

EXECUTION_STATUS_COMPLETED_WITH_WARNING = 4

EXECUTION_STATUS_CANCELLED = 5
For an example of this report, see Reports and JSON Object Response Samples.
Accessible
Administrator/end user
userAPISubmitVAppServiceRequest
Description
Submits a service request with the virtual application catalog type and arguments.
Parameters

String catalogName

APINameValueList list
Return Value Type
int (service request ID)
Accessible
Administrator/end user
userAPIGetVMsForServiceRequest
Description
Returns VMs that are currently associated with the specified service request.
Parameters
int requestId
Return Value Type
APIVMList
For an example of this report, see Reports and JSON Object Response Samples.
Accessible
Administrator/end user
userAPISubmitWorkflowServiceRequest
Description
Submits a service request with a workflow. Returns the ID of the service request.
Parameters

String workflowName

APINameValueList list

int parentSRID
Return Value Type
int (service request ID)
Accessible
Administrator/end user
93
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Note:
For more information on operations related to service requests, such as userAPIGetServiceRequestWorkFlow, see
Workflow Operations.
Task Operations
You can find information about the different API operations for tasks in the REST API Browser. For more information, see
Using the REST API Browser.
Note:
See also Workflow Operations.
VDC Operations
userAPIGetAllVDCs
Description
Returns all virtual data centers (vDCs) for the logged-in user group. No parameters are required.
Parameters
None
Return Value Type
APITabularReport
For more information about this report, see Tabular Reports.
Accessible
Administrator/end user
userAPICreateVDC
Description
Creates a vDC defined by the provided data.
Parameters
APIVDCDetails
For an example of this JSON object, see JSON Object Parameter Types.
Return Value Type
boolean (true when successful)
Accessible
Administrator
Note:
See also userAPIOnboarding in User Account Operations and userAPISubmitServiceRequest in Service Request
Operations.
userAPIExportVDC
Description
Exports a vDC from Cisco UCS Director.
Parameters
94
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
vdcName Name of the vDC that you want to export.
Return Value Type
String
Accessible
Administrator/end user
userAPIImportVDC
Description
Imports a vDC into Cisco UCS Director.
Parameters
vdcName Name of the vDC that you want to import.
Return Value Type
VDC
Accessible
Administrator/end user
VM Operations
UserAPIProvisionRequest
Description
Provisions a virtual machine (VM).
Parameters
The following parameters are mandatory for provisioning a VM:

String catalogName

String vdcName

String userID
The following parameters are optional for provisioning a VM:

int durationHours

int beginTime

int quantity

int memoryMB

int diskGB

int cores

int estimatedCost

String comments

String additionalInfo

int chargeFrequency

String nicAliasName

String nicPortGroupName

boolean resourceAllocated

String allocatedHost

String allocatedDataStore

String allocatedResourcePool

String altAllocatedHost

String altAllocatedDataStore

String altAllocatedResourcePool

int customStartupMemory
95
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations

































int customMaxMemory
int customMemoryBuffer
boolean customMemoryConfig
String customStoragePolicy
String allocatedCluster
int customCpuSockets
int customCpuCoresPerSocket
String altAllocatedCluster
String allocatedAddnlDatastores
String altAllocatedAddnlDatastores
String altAllocatedAddnlVNICs
String altAllocatedAddnlVNICsIpv6
String actionId
String vmName
String vdcCategory
String windowsLicensePool
String templateUserId
String templatePassword
String credentialOption
boolean provisionAllDisk
boolean enableGuestCustomization
boolean enablePostProvisioningCustomActions
String workflow
Int vmId
Int vMAppChargeFrequency
Int activeVMAppCost
Int inactiveVMAppCost
boolean useLinkedClone
Int snapshotId
String snapshotKey
String newSnapshotName
boolean isHighlyAvailable
List postProvWFUserInputs
Return Value Type
int (service request ID)
Accessible
Administrator
UserAPIProvisionRequestWithPortGroup
Description
Provisions a VMWare VM and allows a user to select the port group name while provisioning a VM.
Note:
From Cisco UCS Director Release 5.x and later releases, deprecated the UserAPIProvisionRequestWithPortGroup
API. Instead, you can use the userAPIVMWareProvisionRequest API. For more details on VM provisioning, see
userAPIVMWareProvisionRequest.
Parameters

String catalogName

String vdcName

String userID
96
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations












int durationHours
int beginTime
int quantity
int memoryMB
int diskGB
int cores
int estimatedCost
String comments
String additionalInfo
int chargeFrequency
String nicAliasName
String nicPortGroupName
Return Value Type
int (service request ID)
Accessible
Administrator
userAPIGetAllVMs
Description
Returns all VMs for the logged-in user. No parameters are required.
Parameters

int vmId

int hostid
Return Value Type
APITabularReport
Accessible
Administrator/end user
userAPIGetVMSummary
Description
Returns a summary of a specified VM.
Parameters
int vmId
Return Value Type
APITabularReport
Accessible
Administrator/end user
userAPIGetVMsForServiceRequest
Description
Returns VMs that are currently associated with the specified service request.
Parameters
int requestId
97
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Return Value Type
APIVMList
For an example report, see Reports and JSON Object Response Samples.
Accessible
Administrator/end user
userAPIGetVMActionRequests
Description
Returns VM Action requests for a given context.
Parameters

String contextName

String contextValue
Return Value Type
APITabularReport
Accessible
Administrator/end user
userAPIGetAvailableVMActions
Description
Returns the available VM Actions for a given VM ID.
Parameters
int vmId
Return Value Type
List
Accessible
Administrator/end user
userAPIExecuteVMAction (for Generic VMs)
Description
Executes a specific Power Management Option action on a given generic VM.
Parameters

int vmId

String actionName Values for actionName include the following:
o discardSaveState
o pause
o powerOff
o powerOn
o reboot
o rebuildServer
o repairVM
o reset
o resume
o saveState
o shutdownGuest
o standby
98
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations

o suspend
String comments
Return Value Type
String (VM action request ID). Used to get the status of the request.
Accessible
Administrator/end user
userAPIExecuteVMAction (for VMware vSphere VMs)
Description
Executes a specific Power Management Option action on a given VMware vSphere VM.
Parameters

int vmId

String actionName Values for actionName include the following:
createVMDisks
deleteVMDisks
deleteVMvNICs
destroyVM
diskResize
moveVMToVdc
powerOff
powerOn
privateCloudVMClone
reboot
reset
shutdownGuest
standby
suspend
vmMountISOImageAsCDROM
Note:
The following table provides the APIs that can be used to execute other actions on a virtual machine:
Action
XML API/JAVA API
addVMvNICs
vmwareVMVNIC@create
configureVMVNC
vmwareVM@VM_CONFIGURE_VNC
convertVMToTemplate
vmware@CONVERT_VM_AS_IMAGE
migrateVM
vmwareVM@VMWARE_VM_MIGRATE
reconfigure
userAPIReconfigureVM
resynchVM
vmwareVM@VMWARE_VM_RESYNC
saveVMAsTemplate
vmwareVM@SAVE_VM_AS_TEMPLATE

String comments
Return Value Type
String (VM action request ID). Used to get the status of the request.
Accessible
Administrator/end user
userAPIExecuteVMAction (for Microsoft Hyper-V VMs)
Description
99
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Executes a specific Power Management Option action on a given Microsoft Hyper-V VM.
Parameters

int vmId

String actionName Values for actionName include the following:
addHyperVvNics
deleteHyperVvNic
hyperVRepair
hypervSnapshotCreate
powerOn
reset
destroyVM
hypervSnapshotDeleteAll
resume
discardSaveState
hypervDiskResize
hyperVReconfigure
Pause
powerOff
saveState
shutdownGuest
Note:
The following table provides the APIs that can be used to execute other actions on a virtual machine:
Action
XML API
hypervAddVMDisk
HYPERV_ADD_VM_DISK
hypervMarkGoldenSnapshot
HYPERV_MARK_UNMARK_GOLDEN_SNAPSHOT
hypervRemoveVMDiskHYPER
HYPERV_DELETE_VM_DISK
hypervSnapshotRevert
HYPERV_REVERT_VM_SNAPSHOT
hypervSnapshotDelete
HYPERV_DELETE_VM_SNAPSHOT

String comments
Return Value Type
Integer (Service request ID)
Accessible
Administrator/end user
userAPIHypervVMProvisioningWithVMNetwork
Description
Provisions a Hyper-V VM that is associated with the network group.
Parameters

String catalogName

String vdcName

String userID

List<ApiHypervNetworks> hypervNetworkList
o String nicAliasName
o
String vmNetworkName The name of the VM network.
Note:
The format of the vmNetworkName is:
accountName@vmnetworkname@vmsubnetname@vlanid@ismacspoofingenabled
@isdhcp@accountName;ippoolName;ippoolId@portclassification
100
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
If some of the values are not available, replace the unavailable values with a space as shown in the following examples:
hyperv196@Vlan_VMNetwork2@ @ @false@true@ @ :
hyperv196@Vlan_VMNetwork1@ @ @false@false@hyperv196;Vlan_IpPool1
;9e58366c-675d-4e1b-845e-b5f7eeaff107@ :
To get ippoolid, on the menu bar, choose Virtual > Network, choose a Hyperv account and click the Static IP Address
Pools tab.

String allocatedHost

String allocatedDataStore

String altAllocatedHost

String altAllocatedDataStore

int cores

int memoryMB

boolean customMemoryConfig

int customStartupMemory

int customMaxMemory

int customMemoryBuffer

int diskGB

int estimatedCost

String comments

String additionalInfo

String vmName

boolean isHighlyAvailabilityEnabled
Return Value Type
int (service request ID)
Accessible
Administrator/end user
101
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
userAPIReconfigureVM
Description
Resizes the specified VM.
Parameters

int vmId

int memorySizeInMb

int numVCPUS The number of virtual CPUs for a virtual machine

String comments
Return Value Type
String
Accessible
Administrator/end user
userAPIGetVMActionStatus
Description
Returns the VM Action Status for a given VM Action Request.
Parameters
String requestactionId
Return Value Type
APIVMActionStatus
Accessible
Administrator/end user
userAPISetVMProperties
Description
Assigns a user label to a VM.
Parameters

int vmId

String userLabel
Return Value Type
boolean (true when successful)
Accessible
Administrator/end user
userAPIGetVMAccessCredentials
Description
Returns VM access credentials.
Parameters
int vmId
Return Value Type
APIVMAccess
102
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Accessible
Administrator/end user
userAPIGetVMSnapshotDetails
Description
Returns VM snapshot details.
Parameters
int vmId
Return Value Type
APITabularReport
Accessible
Administrator/end user/end user
userAPICreateVMSnapshot
Description
Creates a snapshot based on the parameters provided. The snapshot is a backup of existing data on VM. An end
user can later restore to a snapshot in case of a VM failure.
Parameters

int vmId

String name

String descry

boolean isMemory Set value to true to make a snapshot of memory

boolean isQuiesce Set value to true to quiesce file system
Return Value Type
String (VM action request ID)
Accessible
Administrator/end user
userAPICheckContextActionStatus
Description
Returns the status message details of the VM action.
Parameters
statusId The string ID value used to check the status from the database that is updated from the thread performing
the VM action.
Return Value Type
String
API namespace
genericvm
Accessible
Administrator/end user
103
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
userAPIDeleteCatalogItem
Description
Deletes the catalog that is created for provisioning a VM.
Parameters
catalogItemName Name of the catalog item that needs to be deleted.
Return Value Type
Boolean
Accessible
Administrator/end user
userAPIVMWareProvisionRequest
Description
Provisions a VMware VM using a template and returns the service request (SR) ID as an integer value.
Parameters

String catalogName Name of the catalog.

String vdcName Name of the vDC.

String vmName Name of the VM to be provisioned.

String comment Comment that is set as the VM label.

double vCpus Number of CPUs.

double memory Size of memory in GB.

String datastores Number of VM Disks.

String opNicPortGroup VM networks.
Return Value Type
Integer (Service request ID)
Accessible
Administrator/end user
userAPIVMWareCloneVMProvisionRequest
Description
Clones a VMware VM and returns the service request (SR) ID as an integer value.
Parameters

String vmID ID of VM that needs to be cloned.

String vdcName Name of the vDC.

String vmName Name of VM that needs to be provisioned.

boolean useLinkedClone Set to true to use the linked clone feature.

String snapshotKey Snapshotkey that needs to be used without creating a new snapshot..

String snapshotName Name of a new snapshot. This parameter is used to create a new snapshot

String comment Comment that is set as the VM label.

double vCpus Number of CPUs.

double memory Size of memory in GB.

String chargeFrequency Frequency of charge. This parameter accepts the following values: Hourly or Monthly.

String datastores Number of VM Disks.

String opNicPortGroup VM networks.

String credentials
reset
104
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations






String userid
String password
boolean provisionDiskinSingleDatastore Set to true to provision all disks in a single datastore.
String vmappChargeFrequency Frequency of vmapp charge. This parameter accepts the following values:
Hourly or Monthly.
double activeVMCost
double inactiveVMCost
Return Value Type
Integer (Service request ID)
Accessible
Administrator/end user
userAPIVMWareMoveVMProvisionRequest
Description
Moves a VM to vDC and returns the service request (SR) ID as an integer value.
Parameters

String vmID ID of VM that needs to be moved.

String vdcName Name of the vDC.

String credentials











String userid
String password
boolean provisionDiskinSingleDatastore Set to true to provision all disks in a single datastore.
String vmappChargeFrequency Frequency of vmapp charge. This parameter accepts the following values:
Hourly or Monthly.
double activeVMCost
double inactiveVMCost
String comment Comment that is set as the VM label.
double vCpus Number of CPUs.
double memory Size of memory in GB.
String datastores Number of VM Disks.
String opNicPortGroup VM networks.
Return Value Type
Integer (Service request ID)
Accessible
Administrator/end user
Note:
If you want to set optional inputs, pass an empty string. Do not pass sample as the dummy string.
userAPIConfigureVMLeaseTime
Description
Configures a lease expiration time for a selected VM. Once the lease time expires, the VM is shutdown (poweredoff).
Parameters

String vmIdStr Name of the VM on which you want to configure a lease expiration time.
105
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations

long dateTime The lease expiration date and time of the VM. The date is represented as milliseconds. For
example, the date string Mon Feb 16 2015 00:00:00 GMT-0400 (Eastern Daylight Time) is represented as
1424059200000 in milliseconds.
Return Value Type
String
Accessible
Administrator
Workflow Operations
userAPIGetWorkflows
Description
Returns the workflows that are available in the given folder name.
Note:
From Cisco UCS Director Release 5.x and later releases, the noOfInputFields field that appears in the
userAPIGetWorkflows API response is deprecated. You can use the userAPIGetWorkflowInputs API to get the
workflow user input details. For more details, see userAPIGetWorkflowInputs.
Parameters
String folderName
Return Value Type
CustomActionDefinition[ ]
Accessible
Administrator
userAPIGetWorkflowSteps
Description
Returns the steps involved in the specified workflow.
Parameters
APIServiceRequestParams Specify the service request parameter. The APIServiceRequestParams includes the
following attribute:

int requestId The ID of the workflow request.
Return Value Type
List <APIWorkflowStep>
Accessible
Administrator/End user
userAPIGetWorkflowStatus
Description
Returns the execution status code of a workflow.
Parameters
int srId
106
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Return Value Type
Int
The values set for the different execution status of a workflow are:

EXECUTION_STATUS_NOT_STARTED = 0

EXECUTION_STATUS_IN_PROGRESS = 1

EXECUTION_STATUS_FAILED = 2

EXECUTION_STATUS_COMPLETED = 3

EXECUTION_STATUS_COMPLETED_WITH_WARNING = 4

EXECUTION_STATUS_CANCELLED = 5

EXECUTION_STATUS_PAUSED = 6

EXECUTION_STATUS_SKIPPED = 7
Accessible
Administrator
userAPIGetWorkflowInputs
Description
Returns the workflow user input details of the given workflow name.
Parameters
String workflowName Name of the workflow
Return Value Type
Returns APINameValueList along with the following properties:

isOptional Displays true if the workflow input field is set as mandatory field.

inputFieldType The value of this field indicates the form field type of the workflow input field. The field type
includes text, number, table, boolean, label, embedded-lov, embedded-lov-radio, password, date, time,
date-and-time, html-text, multi-select-list, label-with-space, button-panel, popup-table, embedded-lovcombo, and file-upload.
Accessible
Administrator
userAPIValidateWorkFlow
Description
Validates the workflow and returns the result.
Parameters
String workflowName
Return Value Type
APIWFValidationResult
Accessible
Administrator
userAPISubmitWorkflowServiceRequest
Description
Submits a service request with a workflow. Returns the ID of the service request.
Parameters

String workflowName

APINameValueList list
107
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations

int parentSRID
Return Value Type
int (service request ID)
Accessible
Administrator/end user
userAPIRollbackWorkflow
Description
Rolls back the specified service request ID.
Parameters
int srId
Return Value Type
int (Service Request Id)
Accessible
Administrator
userAPIExportWorkflows
Description
Exports the specified workflows.
Parameters
String workflowNames
Return Value Type
APICustomWorkflowDefinitionList
Accessible
Administrator/end user
userAPIImportWorkflows
Description
Imports the workflow into the system.
Parameters
APIWFExport export
Return Value Type
boolean (true when successful)
Accessible
Administrator/end user
Activity Operations
userAPIGetActivity
Description
108
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Return all activities in Cisco UCS Director.
Parameters
None
Return Value Type
List APIActivityFormPojo
Accessible
Administrator/End user
userAPICreateActivity
Description
Creates an activity in Cisco UCS Director.
Parameters
apiPojo APIActivityFormPojo
Return Value Type
Boolean
Accessible
Administrator/End user
userAPICloneActivity
Description
Creates a new activity based on the source activity.
Parameters
apiPojo APIActivityFormPojo
Return Value Type
Boolean
Accessible
Administrator/End user
userAPIModifyActivity
Description
Updates the activity in Cisco UCS Director.
Parameters
apiPojo APIActivityFormPojo
Return Value Type
Boolean
Accessible
Administrator/End user
userAPIDeleteActivity
Description
Deletes an activity from Cisco UCS Director.
109
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Parameters
apiPojo APIActivityFormPojo
Return Value Type
Boolean
Accessible
Administrator/End user
Tag Operations
userAPIGetTagLibrary
Description
Returns the tags that are available in the tag library.
Parameters
None
Return Value Type
List APIResourceTag
Accessible
Administrator/End user
userAPICreateTag
Description
Creates a tag in Cisco UCS Director.
Parameters
apiPojo APIResourceTag
Return Value Type
Boolean
Accessible
Administrator/End user
userAPICloneTag
Description
Creates a new tag based on the source tag.
Parameters
apiPojo APIResourceTag
Return Value Type
Boolean
Accessible
Administrator/End user
110
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
userAPIModifyTag
Description
Updates the tag in Cisco UCS Director.
Parameters
apiPojo APIResourceTag
Return Value Type
Boolean
Accessible
Administrator/End user
userAPIDeleteTag
Description
Deletes a tag from Cisco UCS Director.
Parameters
String tagName Name of the tag to be deleted.
Return Value Type
Boolean
Accessible
Administrator/End user
Resource Group Operations
userAPIgetResourceGroups
Description
Returns all resource groups in Cisco UCS Director.
Parameters
None
Return Value Type
List APIResourceGroupMainForm
Accessible
Administrator/End user
userAPICreateResourceGroup
Description
Creates a resource group in Cisco UCS Director.
Parameters
apiPojo APIResourceGroupMainForm
Note:
You can pass the environment variables as apiPojo. For more information on environment variables, see Cisco UCS
Director APIC Management Guide.
111
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
The following sample shows an example of how to create a resource group and map the accounts to the resource
group:
/app/api/rest?formatType=json&opName=resourcegroup:userAPICreateResourceGroup&opData=
{param0:{"name":"testrg","desc":"sample","parent":"sample","virtualCompList":
[{"account":"vmware117;2;Default Pod","environments":[{"name":"Container Parent Folder",
"type":"string","showLOV":"false","value":"FencedContainers"}],"capabilities":
[{"resource":"VMware Host","capability":"VMware Host FT Configured,VMware Host vMotion Enabled"},
{"resource":"VMware Cluster","capability":"VMware Cluster HA Mode Enabled,
VMware Cluster DRS Enabled"},{"resource":"VMware Resourcepool","capability":
"VMware Resourcepool CPU Expandable,VMware Resourcepool Memory Expandable"}],
"capacities":[{"resource":"VMware Host","capacity":"VMware Host CPU Speed(GHz/Core),
VMware Host CPU Cores,VMware Host Total CPU Speed (GHz),VMware Host Memory(GB),
VMware Host CPU Sockets"},{"resource":"VMware Cluster","capacity":
"VMware Cluster Number of Hosts,VMware Cluster CPU Speed(GHz),VMware Cluster CPU Cores,
VMware Cluster Total Memory(GB),VMware Cluster CPU Sockets"},{"resource":"VMware Datacenter",
"capacity":"VMware Datacenter Total VMs,VMware Datacenter Active Hostnodes,
VMware Datacenter Active VMs,VMware Datacenter Total Hostnodes,VMware Datacenter CPU Sockets"}
,{"resource":"VMware Resourcepool","capacity":"VMware Resourcepool CPU Configured
Reservation(MHz)
,VMware Resourcepool Memory Configured Reservation(MB),VMware Resourcepool CPU Used
Reservation(MHz)
,VMware Resourcepool Memory Limit(MB),VMware Resourcepool Number of VMs,
VMware Resourcepool CPU Limit(MHz),VMware Resourcepool Memory Used Reservation(MB)"}],
"accountDetails":"vmware117(Pod: Default Pod)","capabilityCount":"3","capacityCount":"4"}],
"virtualStorageList":[{"account":"vmware117;2;Default Pod","environments":[],"capabilities":
[{"resource":"VMware Datastore","capability":"VMware Datastore Accessible"},{"resource":
"VMware Account","capability":"VMware VSC Enabled"}],"capacities":[{"resource":
"VMware Datastore","capacity":"VMware Datastore Number of Hosts,VMware Datastore Free %,
VMware Datastore Capacity(GB),VMware Datastore Free(GB),VMware Datastore Number of VMs,
VMware Datastore Used(GB)"}],"accountDetails":"vmware117(Pod: Default Pod)","capabilityCount":
"2","capacityCount":"1"}],"virtualNetList":[{"account":"vmware117;2;Default Pod","environments":
[],"capabilities":[{"resource":"VMware VirtualMachine Portgroup","capability":
"VMware Virtual Portgroup Promiscuous Mode"},{"resource":"VMware DV Portgroup","capability":
"VMware VMKernal Portgroup Promiscuous Mode"}],"capacities":[{"resource":
"VMware VirtualMachine Portgroup","capacity":"VMware Virtual Portgroup Number of VMs,
VMware Virtual Portgroup VLAN ID"},{"resource":"VMware DV Portgroup","capacity":
"VMware DVPortgroup Number of Ports,VMware DVPortgroup Number of Available Ports,
VMware DVPortgroup VLAN ID"}],"accountDetails":"vmware117(Pod: Default Pod)","capabilityCount":
"2","capacityCount":"2"}],"computeList":[{"account":"UCSM;11;Default Pod","environments":[],
"capabilities":[{"resource":"UCS Server","capability":"is FC Capable,is ISCSI Capable,
is Local Boot Capable"}],"capacities":[{"resource":"UCS Server","capacity":"Memory(GB),CPU Count,
No. of Cores"},{"resource":"UCS Server Pool","capacity":"No. of Servers used in Server Pool,
No. of Servers in Server Pool"},{"resource":"Service Profile Template","capacity":
"No. of vNICs,No. of vHBAs,No. of Free Servers"}],"accountDetails":"UCSM(Pod: Default Pod)",
"capabilityCount":"1","capacityCount":"3"}],"storageList":[{"account":"VNXUnified;
EMC VNX Unified;Default Pod","environments":[],"capabilities":[{"resource":"VNX Storage Pools",
"capability":"is Raid Type RAID1/0 Capable,is Serial ATA Drive Capable,is Raid Type RAID5
Capable,
is SAS Drive Capable,is NL SAS Drive Capable,is SAS Flash VP Drive Capable,is ISCSI Capable,
is Raid Type RAID6 Capable,is SATA Flash Drive Capable,is FC Capable,is Raid Type Mixed Capable,
is Mixed Drive Capable,is SAS Flash Capable"},{"resource":"VNX Raid Groups","capability":
"is Raid Type RAID1/0 Capable,is Serial ATA Drive Capable,is Raid Type RAID5 Capable,
is SAS Drive Capable,is NL SAS Drive Capable,is ISCSI Capable,is SAS Flash VP Drive Capable,
is Raid Type RAID6 Capable,is Raid Type RAID0 Capable,is Raid Type RAID1 Capable,
is SATA Flash Drive Capable,is Raid Type DISK Capable,is Raid Type RAID3 Capable,is FC Capable,
is Raid Type Mixed Capable,is Mixed Drive Capable,is SAS Flash Capable"},{"resource":"VNX Ports",
"capability":"is FC Capable,is ISCSI Capable"}],"capacities":[{"resource":"VNX Storage Pools",
"capacity":"Storage Size(GB)"},{"resource":"VNX Raid Groups","capacity":"Storage Size(GB)"},
{"resource":"VNX File Storage Pools","capacity":"Storage Size(GB)"}],"accountDetails":
"VNXUnified(Pod: Default Pod)","capabilityCount":"3","capacityCount":"3"}],"networkList":
[{"account":"APIC;APIC;Default Pod","environments":[],"capabilities":[{"resource":
"APIC Controller","capability":"APIC Capable"}],"capacities":[],"accountDetails":
"APIC(Pod: Default Pod)","capabilityCount":"1","capacityCount":"0"}]}}
112
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Catalog Operations
Return Value Type
Boolean
Accessible
Administrator/End user
userAPIModifyResourceGroup
Description
Updates the resource group in Cisco UCS Director.
Parameters
apiPojo APIResourceGroupMainForm
Note:
You can pass the environment variables as apiPojo. For more information on environment variables, see Cisco UCS
Director APIC Management Guide.
Return Value Type
Boolean
Accessible
Administrator/End user
userAPIDeleteResourceGroup
Description
Deletes a resource group from Cisco UCS Director.
Parameters
String rgName Name of the resource group to be deleted.
Return Value Type
Boolean
Accessible
Administrator/End user
113
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Understanding Workflows
Script Operations
userAPIExecuteVIXScript
Description
Allows you to execute commands in a guest operating system (OS) for configuring parameters in the guest OS
through the script commands.
Note:
The following characters are used to escape special characters in the JSON object: $, ", and \.
The following sample shows an example of how to use escape special characters:
/app/api/rest?formatType=json&opName=genericvm:userAPIExecuteVIXScript&opData={param0:355,
param1:"root",param2:"cloupia123",param3:"/bin/echo \"Hello\";/bin/echo 'NPROXY=\$1' "}
Parameters

int vmId ID of the virtual machine (VM) on which you want to run the VIX script.

String username User name that is used for accessing the VM.

String password Password that is set for accessing the VM.

String script VIX script commands that need to be executed on the VM.
Return Value Type
Integer (service request ID)
Accessible
Administrator/end user
Understanding Workflows
Cisco UCS Director Orchestrator allows you to organize workflows so that you can automate simple or complex actions
on your infrastructure (either physical or virtual). By using Orchestrator, you can organize tasks into distinct workflows to
accomplish specific IT services, such as adding VMs. You can then add multiple tasks to a workflow using the workflow
UI designer. Triggers help initiate actions inside a workflow. You can execute the workflow directory or have a trigger
begin the process. A typical workflow consists of the following elements:


Workflow Designer (GUI interface)
Predefined Tasks
The simplest workflow consists of two connected tasks. A task represents a particular action or operation. The workflow
determines the order in which your tasks are executed by Orchestrator. When constructing workflows, by dragging-anddropping tasks, it is possible to route the output of one workflow into the input of another workflow. This connecting of
multiple tasks is how you create more complex workflows.
114
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Understanding Workflows
Workflow Designer
You use the workflow designer to implement actions or to select tasks from a list and then drag and drop them onto your
Workflow Designer pane.
Common workflow editing actions are as follows:
Name
Description
Add Workflow
Adds a new workflow.
Import Workflow
Imports a workflow to the other sources.
Export Workflow
Exports a workflow from Cisco UCS Director.
Clone Workflow
Clones the selected workflows.
Edit Workflow
Edits a selected workflow.
Delete Workflow
Deletes a selected workflow.
Workflow Designer
Opens the workflow designer for a selected workflow.
Export as Template
Exports the selected workflow as a template.
Execute Now
Executes the selected workflow.
Schedule
Schedules a workflow.
Lock/Unlock Workflow
Locks a workflow to prevent any modifications. Once locked, the workflow cannot be
deleted or unlocked.
Workflow Designer Window
(Full View)
Provides a full view button at the top, which displays the entire workflow in one
window. To magnify a portion of the workflow move your cursor over a workflow
segment.
The Workflow Designer viewing options are as follows:
Name
Description
Edit Workflow Properties
Modifies existing workflow properties from within the Workflow Designer pane.
Compact View Mode
Displays the workflow task list in compact view in order to display a large number of
tasks without having to scroll through your display.
Auto Layout
Formats the task icons within the Workflow Designer to a linear design.
Validate Workflow
Checks if the tasks, their input mappings and their connections are valid or not.
Execute Now
Executes (runs) the existing workflow.
115
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Understanding Workflows
Predefined Tasks
A predefined task is a specific action or operation that has inputs and outputs. Orchestrator uses several predefined tasks for
compute, storage and network functions in both virtual and physical infrastructures. The predefined tasks can be grouped
together and used as inputs to other pre-defined tasks.
Task
Description
SSH Command
Executes a command in a secure shell (SSH) session.
Collect Inventory
Collects inventory collection task for available devices.
Execute Cloupia Script
Execute a script within a workflow.
Notify URL
Notifies the specified URL.
Predefined Workflows
An index of predefined workflows, written by Cisco engineering and support staff, is available for download in the Cisco
Communities Forum. You can view, copy, and modify these workflows and use them in Orchestrator.
Note: The workflows available on the Cisco Communities Forum are provided "as is," and in no event does Cisco
warrant that the workflows are error free.
View the Workflow Index at: https://communities.cisco.com/docs/DOC-56419.
Cisco VACS Workflows
Cisco VACS provides the following predefined workflows:
1.
2.
3.
4.
5.
6.
7.
8.
9.
Install Cisco Nexus 1000V
Install PNSC
Add Hosts to Cisco Nexus 1000V
Manage the Service VM Password
Setting up the Container
Add VMs to a Container
Deleting VMs
Configure ERSPAN
Configure StaticNAT
Creating a Workflow
To create a workflow, perform the following steps:
______________________________________________________________________________________________
1. On the menu bar, choose Policies > Orchestration.
2. Choose the Workflows tab.
3. Click Add New Workflow.
4. In the Add Workflow screen, complete the following fields:
Name
Workflow Name field
Description field
Description
The workflow name.
The description of the workflow.
116
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Understanding Workflows
Workflow Context from the drop-down list
Save as Compound Task checkbox
Place in New Folder checkbox
Select Folder drop-down list
Notify status of execution to initiating User check
box
Additional User(s) to send Email notification field
Email Policy drop-down list
5.
6.
The workflow context. Orchestrator supports the following
options:

Any- Lets the workflow be used in any context.

Selected VM Lets the workflow be executed
only when the VM is selected.
Defines the workflow as a compound task.
Assigns the workflow to a new folder.
Choose the proper folder from the drop-down list.
Allows multiple email notifications.
The email IDs of the recipients who should be notified.
The email policy to be associated with the workflow.
Click Next.
In the Worklfow: Add User Inputs screen, complete the fields:
Name
Associate to Activity check box
Description
Assigns the user input(s) of the workflow to the selected
activities.
The list of existing activities.
Click + to add additional user inputs.
Click Submit.
Activity drop-down list
7.
8.
Click Next.
In the Worklfow: Add User Outputs screen, click + to add new entries and complete the fields:
Name
Output Label check box
Output Description field
Description
The name of the output label.
The description of the output label.
Output Type button
The type of output.
Click Submit.
9. Click Submit. An empty workflow is created.
10. From inside the Workflow Designer pane, place your cursor on the Start task icon. A portion of the task icon is
highlighted green or red.
11. From the Available Task pane drag-and-drop a onto the Workflow Designer page.
12. From the Available Task pane drag-and-drop the task icon onto the Workflow Designer page.
13. Click on the green portion of the Start task icon and drag your cursor to the first. A link is established.
When this task is successful, the workflow grows in functionality. Do this step for all tasks of a workflow (both
success and failure).
14. Click on the red portion of the Start task icon and drag your cursor to the Completed (Failed) task icon.
15. On the CreateClusterLogicalInterface task icon move your cursor over the red area (right-side) and drag to the
Completed (Failed) task icon.
16. Click Validate Workflows.
_________________________________________________________________________________________________
Adding Tasks to a Workflow
Orchestrator contains a set of predefined tasks that you can readily use to create workflows. Tasks are categorized
based on their functionality and can be accessed from the Workflow Designer interface.
117
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Understanding Workflows
To add a task to an existing workflow, perform the following steps:
________________________________________________________________________________________________
1. From the Orchestration window, choose a workflow.
2. Click Workflow Designer. The Workflow Designer window appears.
3. On the left-side of the Workflow Designer, select a category and click the Available Tasks folder.
4. Click on a required task and drag-and-drop the selected task onto the Workflow Designer window.
The orchestration task library appears. Click an entry to see more information about specific inputs and outputs
that are available.
________________________________________________________________________________________________
Linking Tasks
Linking tasks is required in order to assemble a complete workflow. Some elements of workflow construction are
automatically. For example, every workflow has the following three task icons added by default:



Start task icon (blue)
Completed (Success) task icon (green)
Completed (Failure) task icon (red)
Tasks need to be linked to each other in the required flow. Every task has both the success (green) and failure (red)
options embedded with them. The entire process begins by creating a new workflow.
118
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Sample Custom Tasks or Workflows
Accessing the Task Documentation
To access the task documentation, perform the following steps:
________________________________________________________________________________________________
1. On the Menu bar, choose Policies > Orchestration.
2. Click the Task Library icon.
3. Check the Regenerate document check box to view a list of all new tasks and those by open automation.
4. Click Submit.
The orchestration task library appears. Click on an entry to see more information about specific inputs and
outputs that are available.
________________________________________________________________________________________________
Sample Custom Tasks or Workflows
This section includes the following topics:


Adding a Custom Task to an Existing Workflow
Creating a New Custom Task Workflow
Adding a Custom Task to an Existing Workflow
This procedure explains how to add an additional task to an existing workflow. As an example, we will add an email task
to an existing add VM workflow. The contents of the send email will be the list of the VM IDs, that are newly added.
Note: Take a copy of the existing workflow before you modify the existing workflow.
To add a custom task to an existing workflow, perform the following steps:
_________________________________________________________________________________________________
1. On the menu bar, choose Policies > Orchestration.
2. Expand the VACS folder and double click VACS Add VMs to Container.
The Workflow Designer VACS Add VMs to Container screen appears.
3. In the Available Tasks area, navigate to Cloupia Tasks > General Tasks > Send Email.
Alternatively, enter send email in the Search field to search for this task.
4. Drag and drop the Send Email task to the design area.
The Add Task (Send Email) wizard appears.
119
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Sample Custom Tasks or Workflows
5.
In the Workflow Task Basic Information
Enter task name and comments screen, complete the following fields:
Name
Task Name field
Task Category drop-down list
Task Type drop-down list
Comment field
Retry Execution check box
Retry Count drop-down list
This field is displayed only if you check
the Retry Execution check box.
Retry Frequency field
Description
Enter a task description. This is a
mandatory field.
The category of the task. The value is auto
generated and this field cannot be edited.
The type of the task. This value is auto
generated and this field cannot be edited.
Enter your comments for this task.
Check this checkbox if you want the task to
be retried.
Choose the number of counts for this task
to retry. The available values are from 1 to
5.
Enter the frequency value.
This field is displayed only if you check
the Retry Execution check box.
6.
7.
Click Next.
In the User Input Mapping screen that appears, complete the following fields:
Name
Manage Workflow User Inputs button
Map to User Input check box
User Input drop-down list
8.
Description
Allows you to add new input labels and
associate them to an activity.
Click this button to display the Add User
Inputs dialog box.
Select the available Input Label and
associate it to an activity.
Click + to add a new input label.
Click Submit.
Check the check box to map the email
address to the workflow user input.
Select the input from the list of available
values.
Click Next. The Tasks Inputs screen appears.
120
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Sample Custom Tasks or Workflows
9.
In the Task Inputs screen that appears, complete the following fields:
Name
E-mail Addresses field
Subject field
Body field
Description
Enter the email addresses.
Enter the subject for the email.
Enter the email content. You must
specify the variable that fetches the VM
ID for the additionally added VMs.
10. Click Next.
11. In the User Output Mappings to Task Output Attributes screen, complete the following fields:
Name
Map to User Output checkbox
User Output drop-down list
Description
Check the check box if you want to map
the user output mappings to the task
output attributes.
Choose the output that needs to be
mapped to the task output attribute.
This list is displayed only if you check the
Map to User Output check box.
12. Click Submit.
13. Link the Re-SyncContainerVMs to the newly added Send Email task.
121
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Sample Custom Tasks or Workflows
14. Click Validate Workflow.
When new VMs are added using this workflow, an email will be sent with the list of the VM IDs that were added.
_________________________________________________________________________________________________
122
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Sample Custom Tasks or Workflows
Creating a New Custom Workflow
This procedure explains how to add a new custom workflow. As an example, we will add a workflow which logs in to the
CSR and executes commands.
To create a new custom workflow, perform the following steps:
________________________________________________________________________________________________
1. On the menu bar, choose Policies > Orchestration.
2. Choose the Workflows tab.
3. Click Add New Workflow. The Add Workflow screen appears.
4.
In the Add Workflow screen, complete the following fields:
Name
Workflow Name field
Description field
Workflow Context from the drop-down
list
Save as Compound Task checkbox
Place in New Folder checkbox
Select Folder drop-down list
Notify status of execution to initiating
User check box
Additional User(s) to send Email
notification field
Email Policy drop-down list
5.
Description
The workflow name. For example, VACS CSR Config Custom Workflow.
The description of the workflow.
The workflow context. Choose the option Any.
Defines the workflow as a compound task.
Assigns the workflow to a new folder.
Choose VACS from the drop-down list.
Allows multiple email notifications.
The email IDs of the recipients who should be notified.
The email policy to be associated with the workflow. Choose Send e-mail to
Initiator.
Click Next. The Workflow: Add User Inputs screen appears.
123
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Sample Custom Tasks or Workflows
6.
In the Worklfow: Add User Inputs screen, complete the fields:
Name
Associate to Activity check box
Activity drop-down list
Description
Assigns the user input(s) of the workflow to the selected activities.
The list of existing activities.
Click + to add the following user inputs.
1.
2.
3.
Click Submit.
7.
8.
Click Next.
In the Worklfow: Add User Outputs screen, click + to add new entries and complete the fields:
Name
Output Label check box
Output Description drop-down list
Description
The name of the output label.
The description of the output label.
Output Type button
The type of output.
Click Submit.
9. Click Submit. The new workflow is created.
10. Double click the workflow and search SSH Command in the Available Task pane.
124
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Sample Custom Tasks or Workflows
11. Map the Workflow inputs to the SSH Command.
12. Enter the following commands to execute on CSR:
a. show version
b. show ip interface brief
c. show clock
13. Click Next.
14. View the workflow in the Workflow Designer screen.
125
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Code Snippets
15. Click Validate Workflows.
16. Execute the Workflow task.
_________________________________________________________________________________________________
Code Snippets
This section includes the following topics:
126
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Code Snippets









How to
How to
How to
How to
How to
How to
How to
How to
How to
get the list of catalog items for a given group?
order a Cisco VACS container based on the catalog items?
view a container details?
get the status of a service request?
execute VM life-cycle operations on a workload VM?
get the status of workload VMs?
get the StaticNAT information for a container?
add a workload VM to a container?
delete a workload VM in a container?
127
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Code Snippets
1. How to get the list of catalog items for a given group?
The following example shows how to get a list of catalog items for a given group:
#!/usr/bin/python
import json
import requests
#INPUT DATA/PARAMETERS
#Following variable have to changed as per user environment
GROUP_NAME = "Default Group"
UCSD_KEY = "A2FD6ADED355411490650E7B8BD278D3"
# UCSD KEY
UCSD_IP = "10.197.140.252"
# UCSD IP
UCSD_API_GETCATALOG = "userAPIGetCatalogsPerGroup"
# UCSD API TO FETCH Catalogs for a given Group
headers={'X-Cloupia-Request-Key':UCSD_KEY}
url = 'http://%s/app/api/rest?formatType=json&opName=%s&opData={param0="%s"}' %
(UCSD_IP,UCSD_API_GETCATALOG,GROUP_NAME)
resp = requests.get(url,headers=headers)
if 200 == resp.status_code:
data = resp.json()
status = data['serviceResult']['rows']
print "Catalogs present in Group",GROUP_NAME,"are:"
print "*"* 40
for i in range(len(status)):
print " Template Name:",status[i]['Template_Name']
print " Catalog Name :",status[i]['Catalog_Name']
print ""
else:
print "*"*10,"Request failed","*"*10
print "Response status code is ",resp.status_code
Sample Output:
python GetCatalogPerGroup.py
Catalogs present in Group Default Group are:
****************************************
Template Name: InternalSLB
Catalog Name : slbin
Template Name: cToM
Catalog Name : Ctempl
Template Name: vinurao
Catalog Name : vinurao
2. How to order a Cisco VACS container based on the catalog items?
The following example shows how to order a Cisco VACS container based on the catalog items:
#!/usr/bin/python
""" This program Creates Container with a Catalog"""
import json
import requests
#INPUT DATA
GRP_NAME = "Default Group"
# UCSD Service Request ID
UCSD_KEY = "A2FD6ADED355411490650E7B8BD278D3"
# UCSD KEY
UCSD_IP = "10.197.140.252"
# UCSD IP
API_CR_CONT_CATALOG = "userAPICreateServiceContainer"
# UCSD API TO CREATE CONTAINER
CONTAINER_NAME = "CON2"
128
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Code Snippets
CATALOG_NAME = "vinurao"
COMMENTS = "New Container"
headers={'X-Cloupia-Request-Key':UCSD_KEY}
url =
'http://%s/app/api/rest?formatType=json&opName=%s&opData={param0="%s",param1="%s",param2="%s",param3=
"%s"}' \
% (UCSD_IP,API_CR_CONT_CATALOG,GRP_NAME,CATALOG_NAME,CONTAINER_NAME,COMMENTS)
resp = requests.get(url,headers=headers)
data = resp.json()
if 200 == resp.status_code:
print data
if (data['serviceError'] == 'null') or (data['serviceError'] == None):
SR_ID = data['serviceResult']
print "Successfully Initiated Container Creation"
print "Service Request is",SR_ID
else:
print "Failed to create Container, with error", data['serviceError']
else:
print "*"*10,"Request failed","*"*10
print "Response status code is ",resp.status_code
3. How to view a container details?
The following example shows how to get the container details:
#Packages to be imported
import json
import requests
#INPUT DATA/PARAMETERS
#Follwing Parameters has to be changed as per user environment
ucsdIp = "10.197.140.252"
# UCSD IP
ucsdKey = "A2FD6ADED355411490650E7B8BD278D3"
# UCSD KEY
ContainerId = 48
# Container Id
headers = {'X-Cloupia-Request-Key': ucsdKey}
url =
'http://%s/app/api/rest?formatType=json&opName=vacs:userAPIGetContainerDetails&opData={param0:%s}' %
(ucsdIp,ContainerId)
resp = requests.get(url,headers=headers)
if 200 == resp.status_code:
resp_data = resp.json()
if (resp_data["serviceError"] is "null") or (resp_data["serviceError"] is None):
data = resp_data['serviceResult']
CSR_VM_count = 0
VSG_VM_count = 0
SLB_VM_count = 0
WL_VM_count = 0
#Work Load VM Count
data = json.loads(data)
print "length of data is ", len(data)
for i in range(len(data)):
if 'csr' in data[i]['instanceId']:
CSR_VM_count += 1
print "CSR VM"
129
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Code Snippets
print "VM Name : ", data[i]['instanceId']
print "VM Id
: ", data[i]['vmId']
print "VM Mac
: ", data[i]['vmMacAddr']
print "VM Ip
: ", data[i]['ipAddress']
print ""
elif 'vsg' in data[i]['instanceId']:
VSG_VM_count += 1
print "VSG VM"
print "VM Name : ", data[i]['instanceId']
print "VM Id
: ", data[i]['vmId']
print "VM Mac
: ", data[i]['vmMacAddr']
print "VM Ip
: ", data[i]['ipAddress']
print ""
elif 'slb' in data[i]['instanceId'] and (('primary' in data[i]['instanceId']) or
('secondary' in data[i]['instanceId'])):
SLB_VM_count += 1
print "SLB VM"
print "VM Name :
print "VM Id
:
print "VM Mac
:
print "VM Ip
:
print ""
else:
WL_VM_count += 1
print
print
print
print
print
print
print
print
print
print
print
print
print
",
",
",
",
data[i]['instanceId']
data[i]['vmId']
data[i]['vmMacAddr']
data[i]['ipAddress']
"Work Load VM"
"VM Name : ",
"VM Id
: ",
"VM Mac
: ",
"VM Ip
: ",
"VM Status: ",
""
data[i]['instanceId']
data[i]['vmId']
data[i]['vmMacAddr']
data[i]['ipAddress']
data[i]['status']
"Total VM Count is: ", WL_VM_count + CSR_VM_count + VSG_VM_count + SLB_VM_count
"CSR VM Count is ",CSR_VM_count
"VSG VM Count is ",VSG_VM_count
"SLB VM Count is ",SLB_VM_count
"Work Load VM Count is ", WL_VM_count
""
else:
print "Can't get serviceResult", resp_data["serviceError"]
else:
print "*"*10,"Request failed","*"*10
print "Response status code is ",resp.status_code
4. How to get the status of a service request?
The following example shows how to view the status of a service request:
#!/usr/bin/python
""" This program fetches the status of UCSD Service Request"""
import json
import requests
#INPUT DATA/PARAMETERS
#Following variable have to be changed as per user environment
SR_ID = 78
# UCSD Service Request ID
UCSD_KEY = "A2FD6ADED355411490650E7B8BD278D3"
# UCSD KEY
UCSD_IP = "10.197.140.252"
# UCSD IP
UCSD_API_GETSRSTATUS = "userAPIGetServiceRequestDetails" # UCSD API TO FETCH Service Request STATUS
headers={'X-Cloupia-Request-Key':UCSD_KEY}
130
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Code Snippets
url = 'http://%s//app/api/rest?formatType=json&opName=%s&opData={param0=%s}' %
(UCSD_IP,UCSD_API_GETSRSTATUS,SR_ID)
resp = requests.get(url,headers=headers)
if 200 == resp.status_code:
data = resp.json()
status = data['serviceResult']['status']
print "Status of Service Request", SR_ID, "is:", status
else:
print "*"*10,"Request failed","*"*10
print "Response status code is ",resp.status_code
Sample Output:
python GetSRStatus.py
Status of Service Request 78 is: Complete
How to get the list of VMs currently monitored through ERSPAN?
"""
This program fetches list of VM for which ERSPAN has been configured/enabled.
"""
import json
import requests
import sys
#INPUT DATA/PARAMETERS
#Following variables have to be changed as per user environment
UCSD_IP = "10.197.140.252"
#UCSD IP
UCSD_API_GET_ERSPAN = "vacs:userAPIGetERSPAN"
#UCSD API TO FETCH ERSPAN DETAILS
UCSD_API_GET_CONTAINER_ID = "fenced:userAPIGetContainerId"
#UCSD API TO GET CONTAINER ID
UCSD_CONTAINER_NAME = "CON2"
# Name of the Container
UCSD_KEY = "A2FD6ADED355411490650E7B8BD278D3"
#UCSD Key
#Header
headers={'X-Cloupia-Request-Key':UCSD_KEY}
#GET CONTAINER ID FROM CONTAINER NAME
url = 'http://%s/app/api/rest?formatType=json&opName=%s&opData={param0="%s"}' %
(UCSD_IP,UCSD_API_GET_CONTAINER_ID,UCSD_CONTAINER_NAME)
resp = requests.get(url,headers=headers)
data = resp.json()
ContainerId = data['serviceResult']
print "ContainerId of",UCSD_CONTAINER_NAME,"is:",ContainerId
#GET ERSPAN DETAILS FOR GIVEN CONTAINER
url = 'http://%s//app/api/rest?formatType=json&opName=%s&opData={param0=%s}' %
(UCSD_IP,UCSD_API_GET_ERSPAN,ContainerId)
resp = requests.get(url,headers=headers)
if 200 == resp.status_code:
data = resp.json()
print "Erspan details of",UCSD_CONTAINER_NAME,"are:"
print data
if (data["serviceError"] is "null") or (data["serviceError"] is None):
x = data['serviceResult']
x = json.loads(x)
for i in range(len(x)):
print ""
print "Session Id:",x[i]['sessionId']
print "Description:",x[i]['description']
print "Source VM are:"
131
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Code Snippets
for a in range(len(x[i]['vmCfgList'])):
print " VM Name:",x[i]['vmCfgList'][a]['vmName']
print ""
else:
print "*"*10,"Request failed","*"*10
print "Can't get serviceResult", data["serviceError"]
else:
print "*"*10,"Request failed","*"*10
print "Response status code is ",resp.status_code
5. How to execute VM life-cycle operations on a workload VM?
This is a script to perform the VM operations such as:
1. Power On
2. Power Off
3. Reboot
4. Shutdown
import sys
import xml.etree.cElementTree as ET
from xml.etree.ElementTree import Element, SubElement, Comment, tostring
import requests
import json
def vmLifeCycle(UcsdIp,ucsdKey,vmId,vmAction):
headers = {'X-Cloupia-Request-Key': ucsdKey}
url = "http://%s/cloupia/api-v2/customActions" % (UcsdIp)
top=Element('cuicOperationRequest')
child0 = SubElement(top,'operationType')
child0.text = "VMWARE_VM_POWER_ACTION"
child1 = SubElement(top,'payload')
child2 = SubElement(child1,'![CDATA[')
child3 = SubElement(child2,'VMwareVMPowerAction')
child4 = SubElement(child3,'vmId')
child4.text =
str(vmId)
child5 = SubElement(child3,'vmAction')
child5.text = vmAction
print "payload before top",top
xml_payload = tostring(top)
# xml_payload = top
xml_payload = xml_payload.replace("</![CDATA[","]]")
xml_payload = xml_payload.replace("CDATA[>","CDATA[")
print "*"* 30
print ""
print "XML Payload is ", xml_payload
resp =
root =
status
status
requests.post(url,data=xml_payload,headers=headers)
ET.fromstring(resp.text)
= None
= root.findtext("./errorMessage")
if status == None:
status = root.findtext("./Log/Message/Text")
print "*"*40
print status
return 0
else:
132
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Code Snippets
# error = root.findtext("./cuicOperationResponse/errorMessage")
print "*"*40
print "Reason for failure is:"
print status
print "*"*40
return -1
def option(x):
return {
'a': "powerOn",
'b': "powerOff",
'c': "reboot",
'd': "shutdownGuest",
}.get (x,None)
#Input Parameters/DATA
#Following variables have to changed as per user environment
UCSD_IP = "10.197.140.78"
#UCSD IP
UCSD_KEY = "47C53A286EAC453CBE4338BD3129D7DE"
# UCSD KEY
vmId = 88
#Id of VM on which VM Operations are to be done
if __name__ == '__main__':
#Headers
headers={'X-Cloupia-Request-Key':UCSD_KEY}
print
print
print
print
print
value
"*"*40
"a) Power On"
"b) Power Off"
"c) Reboot"
"d) Shutdown"
= raw_input("Choose one of the above action:")
action = option(value)
if action != None:
print "Action is ", action
else:
print "Invalid input, Exit!!!"
exit(0)
result = vmLifeCycle(UCSD_IP,UCSD_KEY,vmId,action)
if result != -1:
print "*"*40
print action, "is Successful"
else:
print action,"Failed"
6. How to get the status of workload VMs?
The following example shows how to the status of the workload VMs:
#Packages to be imported
import json
import requests
#INPUT DATA/PARAMETERS
#Follwing Parameters has to be changed as per user environment
ucsdIp = "10.197.140.78"
# UCSD IP
ucsdKey = "47C53A286EAC453CBE4338BD3129D7DE"
# UCSD KEY
ContainerId = 20
# Container Id
if __name__ == '__main__':
133
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Code Snippets
headers = {'X-Cloupia-Request-Key': ucsdKey}
url =
'http://%s/app/api/rest?formatType=json&opName=vacs:userAPIGetContainerDetails&opData={param0:%s}' %
(ucsdIp,ContainerId)
resp = requests.get(url,headers=headers)
if 200 == resp.status_code:
resp_data = resp.json()
if (resp_data["serviceError"] is "null") or (resp_data["serviceError"] is None):
data = resp_data['serviceResult']
WL_VM_count = 0
#Work Load VM Count
data = json.loads(data)
print "length of data is ", len(data)
for i in range(len(data)):
if 'csr' in data[i]['instanceId']:
continue
elif 'vsg' in data[i]['instanceId']:
continue
elif 'slb' in data[i]['instanceId'] and (('primary' in data[i]['instanceId']) or
('secondary' in data[i]['instanceId'])):
continue
else:
WL_VM_count += 1
print "Work Load VM"
print "VM Name : ", data[i]['instanceId']
print "VM Id
: ", data[i]['vmId']
print "VM Mac
: ", data[i]['vmMacAddr']
print "VM Ip
: ", data[i]['ipAddress']
print "VM Status: ", data[i]['status']
print "OS
: ", data[i]['guestOS']
print ""
print "Total Work Load VM Count is ", WL_VM_count
print ""
else:
print "Can't get serviceResult", resp_data["serviceError"]
else:
print "*"*10,"Request failed","*"*10
print "Response status code is ",resp.status_code
7. How to get the StaticNAT information for a container?
This script invokes the Get Static NAT REST API call to fetch VM which have the Static NAT configured:
import sys
import requests
import json
def GetStaticNATperContainer (UcsdIp,key,ContainerId):
headers = {'X-Cloupia-Request-Key': key}
#print headers
url='http://%s/app/api/rest?formatType=json&opName=vacs:userAPIGetStaticNAT&opData={param0:%s}' %
(UcsdIp,ContainerId)
#print url
resp = requests.get(url,headers=headers)
if 200 == resp.status_code:
resp_data = resp.json()
print resp_data
if "serviceResult" in resp_data:
134
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Code Snippets
raw_data = resp_data['serviceResult']
data = json.loads(raw_data)
print data
return data
return 0
#INPUT DATA/PARAMETERS
#
UcsdIp = "10.197.140.78"
#UCSD IP
ucsdKey = "47C53A286EAC453CBE4338BD3129D7DE" #Ucsd Key
ContainerId = 20
#Container ID for which Static NAT details are fetched
if __name__ == '__main__':
data = GetStaticNATperContainer(UcsdIp,ucsdKey,ContainerId)
if (data != 0):
listLength = len(data)
for x in range(0,listLength):
print "*" * 30
for key,value in data[x].iteritems():
print key,": ",value
print "*"*30
else:
print "Unable to get Static NAT info or no Static NAT entries present for Container Id '%s'" %
(ContainerId)
8. How to add a workload VM to a container?
This script invokes the ADD VM REST API call to add VM containers:
import sys
import xml.etree.cElementTree as ET
from xml.etree.ElementTree import Element, SubElement, Comment, tostring
import requests
import json
How to get the list of Virtual Machines currently monitored though ERSPAN
def addVM(UcsdIp,ucsdKey,ContainerId,zoneName,vmName,TemplateName,count):
headers = {'X-Cloupia-Request-Key': ucsdKey}
url = "http://%s/cloupia/api-v2/VACSaddVM" % (UcsdIp)
#paramaeters
VM_payload = {}
VM_payload['templateName'] = "null"
VM_payload['zone'] = zoneName
VM_payload['appName'] = vmName
VM_payload['appDescription'] =""
VM_payload['imageId'] = TemplateName
VM_payload['numVCPU'] = "1"
VM_payload['memoryMB'] =
"512"
VM_payload['cpuReservationMHz'] = "0"
VM_payload['memoryReservationMB'] = "0"
VM_payload['diskSize'] = "0"
VM_payload['passwordResetType'] = "1"
VM_payload['templateRootLogin']
= "root"
VM_payload['templateRootPassword'] = ""
VM_payload['appCategory'] = "null"
VM_payload['isUseImageNetwork'] = "false"
nicInfo = {}
nicInfoList = {}
nicInfoList['moTypeName'] =
"com.cloupia.model.serviceContainer.stingray.StingrayVirtualMachineNetworkConfig"
nicInfoList['validatorName'] = "StingrayVirtualMachineNetworkConfigListValidator"
135
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Code Snippets
nicInfoList['list']
= []
VM_payload['networks'] = nicInfoList
VM_payload['maxQuantity'] = "1"
VM_payload['initialQuantity'] = count
VM_payload['isStorageEfficiencyEnabled'] = "false"
VM_payload = json.dumps(VM_payload)
print "VM Pay load is ", VM_payload
top=Element('cuicOperationRequest')
child = SubElement(top,'payload')
child2 = SubElement(child,'![CDATA[')
child3 = SubElement(child2,'AddVMsConfigElement')
child4 = SubElement(child3,'container')
child4.text =
str(ContainerId)
child5 = SubElement(child3,'jsonPayload')
child5.text = VM_payload
print "payload before top",top
xml_payload =
xml_payload =
xml_payload =
tostring(top)
xml_payload.replace("</![CDATA[","]]")
xml_payload.replace("CDATA[>","CDATA[")
print "*"* 30
print ""
print "XML Payload is ", xml_payload
resp = requests.put(url,data=xml_payload,headers=headers)
print "\n\n"
print "Response is ", resp.text
print "\n\n"
root = ET.fromstring(resp.text)
srId = root.findtext("./responseMap/entry/value")
if srId != None:
print "*"*40
print "Service Request for addVM",VM_NAME,"is", srId
return srId
else:
error = root.findtext("./Log/Message/Text")
print "*"*40
print "Reason for failure is:"
print error
print "*"*40
return None
#Input Parameters/DATA
#Following variables have to changed as per user environment
UCSD_IP = "10.197.140.252"
#UCSD IP
UCSD_KEY = "A2FD6ADED355411490650E7B8BD278D3"
# UCSD KEY
CONT_NAME = "slbvm1"
# Container Name to which VM has to be added
VM_NAME = "addVM_api"
# VM Name which will be given to newly added VM
TEMP_NAME = "NewHTTPS"
# VM Template Name used for creating new VM
NoofVMs = 2
# No of VMs to be deployed
ZoneName = "WebZone"
# Zone Name to which New VM has to be added
UCSD_API_GET_CONTAINER_ID = "fenced:userAPIGetContainerId"
#UCSD API TO GET CONTAINER ID
if __name__ == '__main__':
#Headers
headers={'X-Cloupia-Request-Key':UCSD_KEY}
136
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Code Snippets
#GET CONTAINER ID FROM CONTAINER NAME
url = 'http://%s/app/api/rest?formatType=json&opName=%s&opData={param0="%s"}' %
(UCSD_IP,UCSD_API_GET_CONTAINER_ID,CONT_NAME)
resp = requests.get(url,headers=headers)
if 200 == resp.status_code:
data = resp.json()
containerId = data['serviceResult']
print "ContainerId of",CONT_NAME,"is:",containerId
if containerId != 0 :
srId = addVM(UCSD_IP,UCSD_KEY,containerId,ZoneName,VM_NAME,TEMP_NAME,NoofVMs)
if srId != None:
print "*"*40
print "Service Request for adding VM",VM_NAME,"is", srId
else:
print "Failed to add VM ",VM_NAME
else:
print "Unable to fetch Continer Id, '%s' could be invalid ContainerName" % ContainerName
else:
print "*"*10,"Request failed","*"*10
print "Response status code is ",resp.status_code
9. How to delete a workload VM in a container?
This script invokes the Delete VM REST API call to delete the VM:
import sys
import xml.etree.cElementTree as ET
from xml.etree.ElementTree import Element, SubElement, Comment, tostring
import requests
import json
def DeleteVM(UcsdIp,key,ContainerId,vmName):
headers = {'X-Cloupia-Request-Key': key}
url = "http://%s/cloupia/api-v2/VACSdeleteVM" % (UcsdIp)
deleteVM_payload = {}
deleteVM_payload['vmName'] = vmName
payload_string = str(deleteVM_payload)
#Payload for Delete VM
top=Element('cuicOperationRequest')
child = SubElement(top,'payload')
child2 = SubElement(child,'![CDATA[')
child3 = SubElement(child2,'DeleteVMRestConfigElement')
child4 = SubElement(child3,'container')
child4.text =
str(ContainerId)
child5 = SubElement(child3,'jsonPayload')
child5.text = payload_string
xml_payload = (tostring(top))
xml_payload=xml_payload.replace("</![CDATA[","]]")
xml_payload=xml_payload.replace("CDATA[>","CDATA[")
print "XML Payload is:"
print "*"*40
print xml_payload
print "*"*40
resp = requests.put(url,data=xml_payload,headers=headers)
root = ET.fromstring(resp.text)
srId = root.findtext("./responseMap/entry/value")
if srId != None:
print "*"*40
print "Service Request for deleting",VM_NAME,"is", srId
return srId
137
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Obtaining Documentation and Submitting a Service Request
else:
error = root.findtext("./errorMessage")
print "*"*40
print "Reason for failure is:"
print error
print "*"*40
return None
#INPUT DATA/PARAMETERS
#Following variables have to be changed as per user environment
UCSD_IP = "10.197.140.252"
#UCSD IP
UCSD_API_DELETE_VM = "VACSdeleteVM"
#UCSD API TO FETCH ERSPAN DETAILS
UCSD_API_GET_CONTAINER_ID = "fenced:userAPIGetContainerId"
#UCSD API TO GET CONTAINER ID
VM_NAME = "slbvm1_WebZone_wl-2"
# Name of VM which has to be deleted
UCSD_CONTAINER_NAME = "slbvm1"
# Name of the Container in which VM is present
UCSD_KEY = "A2FD6ADED355411490650E7B8BD278D3"
# UCSD Key
if __name__ == '__main__':
#Headers
headers={'X-Cloupia-Request-Key':UCSD_KEY}
#GET CONTAINER ID FROM CONTAINER NAME
url = 'http://%s/app/api/rest?formatType=json&opName=%s&opData={param0="%s"}' %
(UCSD_IP,UCSD_API_GET_CONTAINER_ID,UCSD_CONTAINER_NAME)
resp = requests.get(url,headers=headers)
if 200 == resp.status_code:
data = resp.json()
containerId = data['serviceResult']
print "ContainerId of",UCSD_CONTAINER_NAME,"is:",containerId
if containerId != 0 :
srId = DeleteVM(UCSD_IP,UCSD_KEY,containerId,VM_NAME)
if srId != None:
print "*"*40
print "Service Request for deleting",VM_NAME,"is", srId
else:
print "Failed to Delete",VM_NAME
else:
print "Unable to fetch Continer Id, '%s' could be invalid ContainerName" % ContainerName
else:
print "*"*10,"Request failed","*"*10
print "Response status code is ",resp.status_code
Obtaining Documentation and Submitting a Service Request
For information on obtaining documentation, using the Cisco Bug Search Tool (BST), submitting a service request, and
gathering additional information, see
New in Cisco Product Documentation at:
http://www.cisco.com/c/en/us/td/docs/general/whatsnew/whatsnew.html
Subscribe to
Product Documentation, which lists all new and revised Cisco technical
documentation, as an RSS feed and deliver content directly to your desktop using a reader application. The RSS feeds
are a free service.
Related Documentation
This section lists the documents used with the Cisco VACS components and are available on Cisco.com at the following
URL:
Cisco Virtual Application Container Services Documentation
UCS UCS Director Documentation
138
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Related Documentation

Cisco UCS Director Documentation
Programming Guide

Cisco UCS Director REST Developer Guide

Cisco UCS Director Cookbook
139
Cisco Virtual Application Cloud Segmentation Services REST API Guide, Release 5.4STV2.1.1
Related Documentation
THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE
WITHOUT NOTICE. ALL STATEMENTS, INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE
ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. USERS MUST TAKE FULL
RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE
INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE.
IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO
REPRESENTATIVE FOR A COPY.
The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of
Copyright © 1981, Regents of the University of California.
NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS
-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES,
EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE
PRACTICE.
IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR
INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING
OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF
THE POSSIBILITY OF SUCH DAMAGES.
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses
and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in
the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative
content is unintentional and coincidental.
All printed copies and duplicate soft copies are considered un-Controlled copies and the original on-line version should
be referred to for latest version.
Cisco has more than 200 offices worldwide. Addresses, phone numbers, and fax numbers are listed on the Cisco
website at www.cisco.com/go/offices.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other
countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks
mentioned are the property of their respective owners. The use of the word partner does not imply a partnership
relationship between Cisco and any other company. (1110R)
© 2016 Cisco Systems, Inc. All rights reserved.
140