Download - VMware vCloud Application Director API Programming - vCloud ...

Transcript

VMware vCloud Application DirectorAPI Programming

vCloud Application Director 6.0

This document supports the version of each product listed andsupports all subsequent versions until the document isreplaced by a new edition. To check for more recent editionsof this document, see http://www.vmware.com/support/pubs.

EN-001247-00

VMware vCloud Application Director API Programming

2 VMware, Inc.

You can find the most up-to-date technical documentation on the VMware Web site at:

http://www.vmware.com/support/

The VMware Web site also provides the latest product updates.

If you have comments about this documentation, submit your feedback to:

[email protected]

Copyright © 2013 VMware, Inc. All rights reserved. Copyright and trademark information.

VMware, Inc.3401 Hillview Ave.Palo Alto, CA 94304www.vmware.com

Contents

Using VMware vCloud Application Director API Programming 5

1 Using vCloud Application Director REST APIs 7

2 REST APIs for Groups 9

3 REST APIs for Certificates 13

4 REST APIs for Applications 17

5 REST APIs for Application Blueprints 23

6 REST APIs for Cloud Providers 27

7 REST APIs for Templates 37

8 REST APIs for Logical Templates 45

9 REST APIs for Services 59

10 REST APIs for Operating Systems 63

11 REST APIs for Tags 65

12 REST APIs for Deployment Environment 67

13 REST APIs for Deployment Profiles 79

14 REST APIs for Deployment 143

15 REST APIs for Scheduling a Deployment 147

16 REST APIs for Publishing Deployment Profiles 155

17 REST APIs for Update Profile 159

18 REST APIs for Managing Deployments 169

19 REST APIs to Export and Import Application Packages 173

VMware, Inc. 3

20 REST API for Notification Registration 177

Index 181

VMware vCloud Application Director API Programming

4 VMware, Inc.

Using VMware vCloud Application Director APIProgramming

The VMware® vCloud Application Director API Programming guide provides information aboutRepresentational State Transfer (REST) APIs to software developers who are interested in creating RESTfulclients.

This guide describes how to use REST APIs to automate an application deployment, configure cloud andservice components, update a deployed application, and tear down a deployed application from a cloudenvironment in vCloud Application Director. You can use clients of the REST APIs to register for AdvancedMessage Queuing Protocol (AMQP) notifications when vCloud Application Director operations occur.

Intended AudienceThis information is intended for software developers who are building hybrid cloud services. Developersmust be familiar with technologies such as JSON, HTTPS, and AMQP.

VMware, Inc. 5

VMware vCloud Application Director API Programming

6 VMware, Inc.

Using vCloud Application DirectorREST APIs 1

vCloud Application Director 6.0 supports REST API 2.0, the notification registration and export and importapplication packages REST API 1.0. All of the remaining REST APIs in REST API 1.0 are not supported.

Before you implement the REST APIs for automation purposes, verify the availability of applicationblueprints in the vCloud Application Director appliance user interface. You can also use the CLI to importapplication blueprints from vCloud Application Director 5.0 and 5.2 to the vCloud Application Director 6.0appliance or between different vCloud Application Director 6.0 appliances.

NOTE If an application blueprint is modified, create a deployment profile that includes the changes for theREST API to use.

Set Up EnvironmentYou must download and install a REST client application in your Web browser to make HTTP requests. TheREST client must use valid user credentials to access the vCloud Application Director server.

IMPORTANT You cannot simultaneously use the REST client application on a Web browser tab and log in tovCloud Application Director appliance on another Web browser tab.

Use Basic Auth to authenticate with the vCloud Application Director server. Set Content-type and AcceptHTTP headers to application/json in the REST client application.

To use REST APIs in a different group you must add a special HTTP header calleddarwin-user-current-group. The value of the header should be the name of that group otherwise the RESTAPI uses the current user group. Always use this header so that the REST API behavior is not affected whenthe current group is changed in the CLI or vCloud Application Director user interface by the logged in user.Without this header the REST API might become inconsistent.

All of the URIs in REST API 2.0 have the prefix https://ApplicationDirectorServerIP:8443/darwin/api/2.0.

ResourcesThe REST API manages a set of resources, all of which are uniquely identifiable through a string identifier.The API also manages a collection of these resources. For example, the URI for a single resource instance canbe https://ApplicationDirectorServerIP:8443/darwin/api/2.0/ResourceTypeID. The collection of the resourcemight return one or more different URIs.

For a sample deployment environment instance with an ID=5, the URI is https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-environment/5. In this example, the URIs refer to a different collection ofdeployment environments https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-environment?page=1&page-size=5 and https://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider/4/deployment-environment.

VMware, Inc. 7

Table 1‑1. List of Resources and Corresponding URIs

Resource Name Resource URI

Certificate .../certificate/CertificateID

Cloud Provider Type .../cloud-provider-type/CloudProviderTypeID

Cloud Provider .../cloud-provider/CloudProviderID

Deployment Environment .../deployment-environment/DeploymentEnvironmentID

Application .../application/ ApplicationID

Application Version .../application-version/ApplicationVersionID

Logical Template Version …/logical-template-version/LogicalTemplateVersionID

Service Version .../service-version/ServiceVersionID

Operating System Version .../operating-system-version/OperatingSystemVersionID

Tag .../tag/TagID

Deployment Profile .../deployment-profile/DeploymentProfileID

Blueprint .../blueprint/BlueprintID

Cloud Template .../registered-physical-template/RegisteredPhysicalTemplateID

Deployment .../deployment/DeploymentID

Deployment Task .../deployment-task/DeploymentTaskID

Update Profile .../update-profile/UpdateProfieID

Group .../group/current

ReferencesREST APIs use references to resources and resource collections wherever possible to keep the data sizeconcise and tractable. The vCloud Application Director REST API supports the following types ofreferences.

Resource References Point to existing resources. They include the identifier of the resource, thename of the resource, and the relative URI used to access the resource.

List References Point to a collection of resources. List references include only a relative URIthat returns a list of resources.

External References Point to items that are external to vCloud Application Director. They includean identifier that points to an external item such as a cloud template and thename of the external resource.

HTTP MethodsThe REST APIs support the following HTTP methods.

GET Retrieve data.

POST Modify data, perform an action, or create an object.

PUT Modify or replace data.

DELETE Delete data.

VMware vCloud Application Director API Programming

8 VMware, Inc.

REST APIs for Groups 2You can view a list of groups a user belongs to and the group details of the logged in user only. You cannotview the list of groups another user belongs to in the same login session. To create groups, you must use theCLI command.

Get GroupsRetrieves a list of groups that the logged in vCloud Application Director user belongs to.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/group

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/group

Response{

"errors": false,

"messageList": [],

"count": 3,

"results": [

{

"id": "2",

"lockVersion": 1,

"name": "QA",

"description": "Quality Assurance.",

"lastUpdated": 1378692213749,

"lastUpdateUser": "SYSTEM",

"created": 1378692213749,

"createUser": "SYSTEM"

},

{

VMware, Inc. 9

"id": "1",

"lockVersion": 1,

"name": "Default",

"description": "The Default vCloud Application Director group.",

"lastUpdated": 1378692213591,

"lastUpdateUser": "SYSTEM",

"created": 1378692213591,

"createUser": "SYSTEM"

},

{

"id": "3",

"lockVersion": 1,

"name": "R-D",

"description": "Research and development.",

"lastUpdated": 1378692213750,

"lastUpdateUser": "SYSTEM",

"created": 1378692213750,

"createUser": "SYSTEM"

}

]

}

Get Group DetailsRetrieves current group details of the user logged in to vCloud Application Director.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/group/current

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/group/current

Response{

"errors": false,

"messageList": [],

"result": {

"id": "1",

"lockVersion": 1,

"name": "Default",

"description": "The Default vCloud Application Director group.",

"lastUpdated": 1378692213591,

"lastUpdateUser": "SYSTEM",

VMware vCloud Application Director API Programming

10 VMware, Inc.

"created": 1378692213591,

"createUser": "SYSTEM"

}

}

Chapter 2 REST APIs for Groups

VMware, Inc. 11

VMware vCloud Application Director API Programming

12 VMware, Inc.

REST APIs for Certificates 3You can view the available certificates from the truststore and import existing certificates to thevCloud Application Director server trusted list.

Get CertificatesRetrieves all of the existing certificates from the truststore.

The user account with the SYSTEM_ADMIN system admin role can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/certificate

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/certificate

Response{

"errors":false,

"messageList":[

],

"count":0,

"results":[

{

"id":"1",

"lockVersion":0,

"name":"appd.test1",

"description":"appd test1 host",

"lastUpdated":1379543429798,

"lastUpdateUser":"admin",

"created":1379543429798,

"createUser":"admin",

"alias":"appd.test1",

"type":"Certificate",

VMware, Inc. 13

"thumbprint":"AF:8B:67:62:A1:E5:28:22:81:61:A9:5D:5C:55:9E:E2:66:27:8F:75:D7:9E:

83:01:89:A5:03:50:6A:BD:6B:4C"

},

{

"id":"2",

"lockVersion":0,

"name":"appd.test2",

"description":"appd test2 host",

"lastUpdated":1379543839084,

"lastUpdateUser":"admin",

"created":1379543839084,

"createUser":"admin",

"alias":"appd.test2",

"type":"Certificate",

"thumbprint":"AF:8B:67:62:A1:E5:28:22:81:61:A9:5D:5C:55:9E:E2:66:27:8F:75:D7:9E:

83:01:89:A5:03:50:6A:BD:6B:4C"

}

]

}

Get Certificate DetailsRetrieves the existing certificates from the truststore based on the provided ID.

The user account with the SYSTEM_ADMIN system admin role can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/certificate/CertificateID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/certificate/1

Response{

"errors":false,

"messageList":[

],

"result":{

"id":"1",

"lockVersion":0,

"name":"appd.test1",

"description":"appd test1 host",

"lastUpdated":1379543429798,

"lastUpdateUser":"admin",

"created":1379543429798,

"createUser":"admin",

"alias":"appd.test1",

"type":"Certificate",

VMware vCloud Application Director API Programming

14 VMware, Inc.

"thumbprint":"AF:8B:67:62:A1:E5:28:22:81:61:A9:5D:5C:55:9E:E2:66:27:8F:75:D7:9E:

83:01:89:A5:03:50:6A:BD:6B:4C"

}

}

Import CertificateImports a certificate to the vCloud Application Director server trusted list.

The user account with the SYSTEM_ADMIN system admin role can access this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/certificate-importer

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/certificate-importer

RequestTable 3‑1. Description for Response Messages

Response Message Description

alias Represents the unique or domain name.

type Represents the supported type. The supported type is Certificate.

sslTrusts Represents the encoded certificate value .

{

"alias":"test_env",

"type":"Certificate",

"ssltrust":"MIIDajCCAlKgAwIBAgIGATTE5hINMA0GCSqGSIb3DQEBBQUAMFIxIDAeBgNVBAMMF0FwcGxpY2F0aW9uIERpc

mVjdG9yIENBMR0wGwYDVQQLDBRBcHBsaWNhdGlvbiBEaXJlY3RvcjEPMA0GA1UECgwGVk13YXJlMB4XDTEyMDEwOTIzNTUzOV

oXDTMyMDEwNDIzNTUzOVowVjEkMCIGA1UEAwwbQXBwbGljYXRpb24gRGlyZWN0b3IgU2VydmVyMR0wGwYDVQQLDBRBcHBsaWN

hdGlvbiBEaXJlY3RvcjEPMA0GA1UECgwGVk13YXJlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAywgAi4MptZRh

JSz1bCtSqJLzbxRr1ySPCF7TBM3kWDgG4xyneIcL9oiq4zG2gdyMJkeDEzzCi4akC+Ix2AVimBPyG811fAY9KLQ

+NVuzUJzFT6nNonQ4WfoJO9joC1R2whKXSleylp5pRPaLhnukkuYxlFUJfywD1Xcq3JB7BQie7gbTeyub1+9/mmBFBc3JBIcT

Kb/mDliZBBz/vXq27uLJ6neyX22vIfNX7DflW8huTf7/Enl1bAXcsodUZwZkqGlYVmWiMG/5s4X0y/m+ZS6mBrazUCGd

+nt3HvWvovrntwpy1toDcylbMIktgiMZcCJbQTwq38v/KMZMZNz4zwIDAQABo0IwQDAdBgNVHQ4EFgQU7kDFZwPiBlCMEcWCh

hyqWtJ9+XgwHwYDVR0jBBgwFoAUWHOnlItMd6lG6DB

+qDvK4drY4kEwDQYJKoZIhvcNAQEFBQADggEBACH2IzNAzmSbhdOCQ4p9/1ekDwaMf8/+gswd4TBhx5kCFtXgeYJd9aRyT4xw

TfZzBHYa/sONoiPwJFPd2QmstkCAI4vDCynr28rIYz7LTwx2+OJ9uF7PNNK/P3j5Ex2z8QIEVgRSdnIx2RZIqD7QTfaxH8+fo

4C2QY2ivtUcGSHHeg7eKYI/SHTpf

+omQM79kwUX5LUtreM5+9T4mXjz2bsaupnrBwOPkyLnJYuURJlrN0yFHCR0gpHjHdSgOs9LGkGyust2kIoZymeuMFAWVnXd4S

TcpKG06CnsReMjiLHrvj7mxoCspP+5B0VrjOKz7Q9oJxDqBR6yVng5iLXobao="

}

Chapter 3 REST APIs for Certificates

VMware, Inc. 15

Response{

"errors":false,

"messageList":[

],

"result":{

"id":"29",

"lockVersion":0,

"name":"test-env",

"description":"test-env",

"lastUpdated":1379701731051,

"lastUpdateUser":"admin",

"created":1379701731051,

"createUser":"admin",

"alias":"test-env",

"type":"Certificate",

"thumbprint":"98:23:95:64:54:9C:94:58:6A:C5:68:11:9B:60:83:F9:4E:C1:A6:A1:DE:19:CB:DB:

34:79:B5:51:74:45:4E:1A"

}

}

Delete Certificate DetailsRemoves the existing certificate from the truststore based on the provided ID.

The user account with the SYSTEM_ADMIN system admin role can access this API.

HTTP MethodDELETE

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/certificate/CertificateID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/certificate/1

Response{

"errors":false,

"messageList":[

{

"messageType":"INFO",

"message":"Successfully deleted CertificateStoreEntry.",

"messageKey":"delete.msg",

"property":null

}

]

}

VMware vCloud Application Director API Programming

16 VMware, Inc.

REST APIs for Applications 4You can view applications and associated application versions. The APIs are useful for retrieving all of theexisting application and application versions in the current group. You can create an application in thevCloud Application Director user interface. You can also use the CLI to import applications fromvCloud Application Director 5.0 and 5.2 versions to the vCloud Application Director 6.0 appliance orbetween different vCloud Application Director 6.0 appliances.

Get ApplicationsRetrieves a paginated list of applications and associated application versions invCloud Application Director.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/application?page=Page&page-size=PageSize

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/application?page=0&page-size=1

Response{

"errors": false,

"messageList": [],

"count": 4,

"results": [

{

"id": "599",

"lockVersion": 1,

"name": "Clustered DotShoppingCart",

"description": "An ASP.NET E-Commerce and CMS solution.",

"lastUpdated": 1378763304778,

"lastUpdateUser": "SYSTEM",

"created": 1378763304778,

VMware, Inc. 17

"createUser": "SYSTEM",

"applicationVersions": [

{

"id": "598",

"lockVersion": 1,

"name": "Clustered DotShoppingCart",

"description": "Three-tier DotShoppingCart on Windows Server 2008 R2; Apache HTTP

Server for load balancer, Microsoft IIS for application server, and Microsoft SQL Server for

database server.",

"lastUpdated": 1331830800000,

"lastUpdateUser": "SYSTEM",

"created": 1331830800000,

"createUser": "SYSTEM",

"version": {

"major": "1",

"minor": "0",

"micro": "0",

"qualifier": ""

},

"deploymentProfileListRef": {

"uri": "/darwin/api/2.0/application-version/598/deployment-profile"

},

"blueprintRef": {

"uri": "/darwin/api/2.0/blueprint/598",

"id": "99",

"name": "DotShoppingCart_Open_Source_Edition"

},

"groupMembership": {

"id": "100599",

"lockVersion": 1,

"ownerGroupRef": {

"uri": null,

"id": "1",

"name": "Default"

}

}

}

],

"groupMembership": {

"id": "100599",

"lockVersion": 1,

"ownerGroupRef": {

"uri": null,

"id": "1",

"name": "Default"

}

}

}

]

}

VMware vCloud Application Director API Programming

18 VMware, Inc.

Get Application VersionRetrieves an application version in vCloud Application Director based on the application versionidentification.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/application-version/ApplicationVersionID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

The ApplicationID variable has the object-type-id format, which is used across severalvCloud Application Director REST APIs. In this case, the object type is the application and the id is the idelement that was retrieved from the get applications call.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/application-version/598

Response{

"errors": false,

"messageList": [],

"result": {

"id": "598",

"lockVersion": 1,

"name": "Clustered DotShoppingCart",

"description": "Three-tier DotShoppingCart on Windows Server 2008 R2; Apache HTTP Server for

load balancer, Microsoft IIS for application server, and Microsoft SQL Server for database

server.",

"lastUpdated": 1331830800000,

"lastUpdateUser": "SYSTEM",

"created": 1331830800000,

"createUser": "SYSTEM",

"version": {

"major": "1",

"minor": "0",

"micro": "0",

"qualifier": ""

},

"deploymentProfileListRef": {

"uri": "/darwin/api/2.0/application-version/598/deployment-profile"

},

"blueprintRef": {

"uri": "/darwin/api/2.0/blueprint/598",

"id": "99",

"name": "DotShoppingCart_Open_Source_Edition"

},

"groupMembership": {

"id": "100599",

Chapter 4 REST APIs for Applications

VMware, Inc. 19

"lockVersion": 1,

"ownerGroupRef": {

"uri": null,

"id": "1",

"name": "Default"

}

}

}

}

Get Application by IDRetrieves an application based on the provided identification and corresponding application versions invCloud Application Director.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/application/ApplicationID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

The ApplicationID variable has the object-type-id format, which is used across severalvCloud Application Director REST APIs. In this case, the object type is the application and the id is the idelement that was retrieved from the get applications call. The ApplicationID variable is the id elementcreated when you run the Get Applications REST API.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/application/599

Response{

"errors": false,

"messageList": [],

"result": {

"id": "599",

"lockVersion": 1,

"name": "Clustered DotShoppingCart",

"description": "An ASP.NET E-Commerce and CMS solution.",

"lastUpdated": 1378763304778,

"lastUpdateUser": "SYSTEM",

"created": 1378763304778,

"createUser": "SYSTEM",

"applicationVersions": [

{

"id": "598",

"lockVersion": 1,

"name": "Clustered DotShoppingCart",

"description": "Three-tier DotShoppingCart on Windows Server 2008 R2; Apache HTTP Server

for load balancer, Microsoft IIS for application server, and Microsoft SQL Server for database

server.",

VMware vCloud Application Director API Programming

20 VMware, Inc.

"lastUpdated": 1331830800000,

"lastUpdateUser": "SYSTEM",

"created": 1331830800000,

"createUser": "SYSTEM",

"version": {

"major": "1",

"minor": "0",

"micro": "0",

"qualifier": ""

},

"deploymentProfileListRef": {

"uri": "/darwin/api/2.0/application-version/598/deployment-profile"

},

"blueprintRef": {

"uri": "/darwin/api/2.0/blueprint/598",

"id": "99",

"name": "DotShoppingCart_Open_Source_Edition"

},

"groupMembership": {

"id": "100599",

"lockVersion": 1,

"ownerGroupRef": {

"uri": null,

"id": "1",

"name": "Default"

}

}

}

],

"groupMembership": {

"id": "100599",

"lockVersion": 1,

"ownerGroupRef": {

"uri": null,

"id": "1",

"name": "Default"

}

}

}

}

Chapter 4 REST APIs for Applications

VMware, Inc. 21

VMware vCloud Application Director API Programming

22 VMware, Inc.

REST APIs for Application Blueprints 5You can view the application blueprint associated with an application version and the specific nodecomponent details of the application blueprint.

Get Application BlueprintRetrieves the application blueprint for an application version.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/blueprint/ApplicationVersionID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/blueprint/598

Response{

"errors": false,

"messageList": [],

"result": {

"id": "99",

"lockVersion": 1,

"nodes": [

{

"id": "98",

"lockVersion": 1,

"name": "AppServer",

"description": "Application/web server tier node",

"cluster": true,

"clusterSize": 1,

"memoryMb": 2048,

"vcpuCount": 1,

"hostname": "",

VMware, Inc. 23

"logicalTemplateVersionRef": {

"uri": "/darwin/api/2.0/logical-template-version/313",

"id": "313",

"name": "W2K8 R2 Enterprise SP1 v1.0.0"

},

"osVersionRef": {

"uri": "/darwin/api/2.0/operating-system-version/111",

"id": "111",

"name": "WIN64 v6.1.7601"

},

"serviceNodeComponents": [

[…]

{

"id": "498",

"lockVersion": 0,

"name": "IIS_with_.NET_W2K8R2",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/498",

"id": "498",

"name": "IIS_with_.NET_W2K8R2"

},

"serviceRef": {

"uri": "/darwin/api/2.0/service-version/297",

"id": "297",

"name": "Microsoft IIS with .Net Framework on W2K8R2 v1.0.0"

},

"preinstalled": false,

"applicationNodeComponents": [

{

"id": "495",

"lockVersion": 0,

"name": "DotShoppingCart_App",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/495",

"id": "495",

"name": "DotShoppingCart_App"

}

}

]

}

],

"applicationNodeComponents": [],

"disks": [],

"nics": [

{

"id": "98",

"lockVersion": 1,

"name": "NIC0",

"description": null,

"networkName": "ServiceNetwork"

}

]

},

VMware vCloud Application Director API Programming

24 VMware, Inc.

[…]

],

"dependencies": [

{

"id": null,

"lockVersion": 0,

"fromComponentId": "496",

"toComponentId": "497"

},

[…]

],

"applicationVersionRef": {

"uri": "/darwin/api/2.0/application-version/598",

"id": "598",

"name": "Clustered DotShoppingCart v1.0.0"

}

}

}

Get Node Component InformationRetrieves the node component information such as property details, scripts, and overridable nodecomponent values.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/node-component-details/NodeComponentID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/node-component-details/495

Response{

"errors": false,

"messageList": [],

"result": {

"id": "495",

"lockVersion": 0,

"properties": [

{

"propertyDefinition": {

"id": "782",

"lockVersion": 0,

"name": null,

"description": null,

"key": "NODE_INDEX",

"type": "STRING",

Chapter 5 REST APIs for Application Blueprints

VMware, Inc. 25

"secure": false,

"required": true

},

"value": "${['self']['host']['node_array_index']}",

"overrideable": false

},

[…]

],

"scripts": [

{

"id": "140",

"lockVersion": 1,

"lifecycleStage": "INSTALL",

"scriptType": "Windows Cmd Script",

"script": "[…]\n",

"rebootAfter": false

},

[…]

]

}

}

VMware vCloud Application Director API Programming

26 VMware, Inc.

REST APIs for Cloud Providers 6You can view cloud provider and associated deployment environment information. You can also use theAPIs to create and delete cloud providers.

Get Cloud ProvidersRetrieves a paginated list of the cloud providers from the cloud environment.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider?page=Page&page-

size=PageSize

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider?page=0&page-size=1

Response{

"errors": false,

"messageList": [],

"count": 1,

"results": [

{

"id": "1",

"lockVersion": 4,

"name": "Cloud",

"description": "",

"lastUpdated": 1378765277631,

"lastUpdateUser": "admin",

"created": 1378764940480,

"createUser": "admin",

"cloudProviderTypeRef": {

"uri": "/darwin/api/2.0/cloud-provider-type/1",

VMware, Inc. 27

"id": "1",

"name": "vCloud 5.1.2"

},

"host": "vcloud.test.com",

"proxyUrl": "",

"credential": {

"id": "2",

"lockVersion": 2,

"userName": "appdirector-qe",

"passKey": "19QlBRwamVEmN0yLxN6AqUErxMDQtyqQTuOlGect42bqVZeqMcw5jW9Y707onwG/",

"encrypted": true,

"type": "PASSWORD"

},

"properties": [

{

"propertyDefinition": {

"id": "1023",

"lockVersion": 0,

"name": "Organization",

"description": "vCloud Director Organization",

"key": "organization",

"type": "STRING",

"secure": false,

"required": false

},

"value": "QE",

"overrideable": false

}

],

"deploymentEnvironmentListRef": {

"uri": "/darwin/api/2.0/cloud-provider/1/deployment-environment"

}

}

]

}

Get Cloud Provider TypesRetrieves a list of the cloud provider type and associated deployment environment information from thecloud environment to create cloud providers.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider-type

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider-type

VMware vCloud Application Director API Programming

28 VMware, Inc.

Response{

"errors": false,

"messageList": [],

"count": 4,

"results": [

[…]

{

"id": "1",

"lockVersion": 1,

"name": "vCloud 5.1.2",

"description": "vCloud cloud provider implementation used to provision VMs.",

"nameMsgKey": null,

"descriptionMsgKey": null,

"cloudProviderPropertyDefs": [

{

"id": "1023",

"lockVersion": 0,

"name": "Organization",

"description": "vCloud Director Organization",

"key": "organization",

"type": "STRING",

"secure": false,

"required": false

}

],

"deploymentEnvironmentPropertyDefs": [

{

"id": "1024",

"lockVersion": 0,

"name": "VDC URI",

"description": "Virtual Data Center URI",

"key": "vdc_uri",

"type": "STRING",

"secure": false,

"required": false

}

]

}

]

}

Get Cloud Provider Type IDRetrieves a cloud provider type and associated deployment environment information from the cloudenvironment to create cloud providers based on the provided ID.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

Chapter 6 REST APIs for Cloud Providers

VMware, Inc. 29

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider-type/CloudProviderID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider-type/1

Response{

"errors": false,

"messageList": [],

"result": {

"id": "1",

"lockVersion": 1,

"name": "vCloud 5.1.2 - 5.5",

"description": "VCloud cloud provider implementation used to provision VMs.",

"nameMsgKey": null,

"descriptionMsgKey": null,

"cloudProviderPropertyDefs": [

{

"id": "1023",

"lockVersion": 0,

"name": "Organization",

"description": "vCloud Director Organization",

"key": "organization",

"type": "STRING",

"secure": false,

"required": false

}

],

"deploymentEnvironmentPropertyDefs": [

{

"id": "1024",

"lockVersion": 0,

"name": "VDC URI",

"description": "Virtual Data Center URI",

"key": "vdc_uri",

"type": "STRING",

"secure": false,

"required": false

}

]

}

}

Get Cloud Provider DetailsRetrieves all of the cloud provider information from the cloud environment.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

VMware vCloud Application Director API Programming

30 VMware, Inc.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider/CloudProviderID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider/1

Response{

"errors": false,

"messageList": [],

"result": {

"id": "1",

"lockVersion": 1,

"name": "vCloud 5.1.2",

"description": "vCloud cloud provider implementation used to provision VMs.",

"nameMsgKey": null,

"descriptionMsgKey": null,

"cloudProviderPropertyDefs": [

{

"id": "1023",

"lockVersion": 0,

"name": "Organization",

"description": "vCloud Director Organization",

"key": "organization",

"type": "STRING",

"secure": false,

"required": false

}

],

"deploymentEnvironmentPropertyDefs": [

{

"id": "1024",

"lockVersion": 0,

"name": "VDC URI",

"description": "Virtual Data Center URI",

"key": "vdc_uri",

"type": "STRING",

"secure": false,

"required": false

}

]

}

}

Create Cloud ProviderCreates a cloud provider in the cloud environment.

Chapter 6 REST APIs for Cloud Providers

VMware, Inc. 31

Include Content-Type=application/json in the header.

Verify that your user account has the ROLE_CLOUD_ADMIN cloud administrator role assigned to it.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider

Request{

"id": "0",

"lockVersion": 0,

"name": "New Cloud",

"description": "cloud provider description",

"cloudProviderTypeRef": {

"id": "1"

},

"host": "vcloud.test.com",

"proxyUrl": "",

"credential": {

"userName": "appdirector-qe",

"passKey": "password",

"encrypted": false,

"type": "PASSWORD"

},

"properties": [

{

"propertyDefinition": {

"id": "1023",

"lockVersion": 0,

"name": "Organization",

"description": "vCloud Director Organization",

"key": "organization",

"type": "STRING",

"secure": false,

"required": false

},

"value": "QE",

"overrideable": false

}

]

}

VMware vCloud Application Director API Programming

32 VMware, Inc.

Response{

"errors": false,

"messageList": [

{

"messageType": "INFO",

"message": "Cloud Provider saved successfully.",

"messageKey": null,

"property": null

}

],

"result": {

"id": "5",

"lockVersion": 1,

"name": "New Cloud",

"description": "cloud provider description",

"lastUpdated": 1378924488110,

"lastUpdateUser": "admin",

"created": 1378924488110,

"createUser": "admin",

"cloudProviderTypeRef": {

"uri": "/darwin/api/2.0/cloud-provider-type/1",

"id": "1",

"name": "vCloud 5.1.2"

},

"host": "vcloud.test.com",

"proxyUrl": "",

"credential": {

"id": "6",

"lockVersion": 0,

"userName": "appdirector-qe",

"passKey": "XLtppJs/YtTkJhHjuA47MOulHiz3WB0AsXBfVAH+VMUkT8BLJwlb+RAKJo23uyhs",

"encrypted": true,

"type": "PASSWORD"

},

"properties": [

{

"propertyDefinition": {

"id": "1023",

"lockVersion": 0,

"name": "Organization",

"description": "vCloud Director Organization",

"key": "organization",

"type": "STRING",

"secure": false,

"required": false

},

"value": "QE",

"overrideable": false

}

],

"deploymentEnvironmentListRef": {

Chapter 6 REST APIs for Cloud Providers

VMware, Inc. 33

"uri": "/darwin/api/2.0/cloud-provider/5/deployment-environment"

}

}

}

Test Cloud Provider ConnectionVerifies that the cloud provider is connected to vCloud Application Director.

Verify that your user account has the ROLE_CLOUD_ADMIN cloud administrator role assigned to it.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider-validator

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider-validator

Request{

"cloudProviderTypeRef": {

"id": "5"

},

"properties": [{ "propertyDefinition":

{"key": "provisioning_group_name", "id":"1", "type": "STRING"}

, "value": "default"}, {"propertyDefinition":

{"id":"2", "key": "provisioning_group_uri", "type": "STRING"}

, "value": "07e74e6a-4d05-43fe-b0ce-84048fdacd46"}], "host": "https://invalid.url","credential":

{ "userName":

"[email protected]", "passKey": "password", "encrypted": false, "type": "PASSWORD"}}' -u

admin:password -k

https://localhost:8443/darwin/api/2.0/cloud-provider-validator

}

}

Response{

"errors": false,

"messageList": [

{

"messageType": "INFO",

"message": "Connection to the Cloud Provider at https://vcac-oci-061.test.com is

successful.",

"messageKey": "cloudProvider.connection.success.msg",

VMware vCloud Application Director API Programming

34 VMware, Inc.

"property": null

}

]

}

Delete Cloud ProviderUses identification to delete the cloud provider from vCloud Application Director.

Verify that your user account has the ROLE_CLOUD_ADMIN cloud administrator role assigned to it.

HTTP MethodDELETE

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider/CloudProviderID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider/5

Response{

"errors": false,

"messageList": [

{

"messageType": "INFO",

"message": "Successfully deleted Cloud Provider.",

"messageKey": "delete.msg",

"property": null

}

]

}

Get Associated Deployment EnvironmentUses identification to retrieve the associated deployment environments of the cloud provider from the cloudenvironment.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-

provider/CloudProviderID/deployment-environment

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Chapter 6 REST APIs for Cloud Providers

VMware, Inc. 35

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider/1/deployment-environment

Response{

"errors": false,

"messageList": [],

"count": 0,

"results": [

{

"id": "1",

"lockVersion": 4,

"name": "DE",

"description": "QA Deployment Environment",

"lastUpdated": 1378765277632,

"lastUpdateUser": "admin",

"created": 1378765102894,

"createUser": "admin",

"cloudProviderRef": {

"uri": "/darwin/api/2.0/cloud-provider/1",

"id": "1",

"name": "Cloud"

},

"properties": [

{

"propertyDefinition": {

"id": "1024",

"lockVersion": 0,

"name": "VDC URI",

"description": "Virtual Data Center URI",

"key": "vdc_uri",

"type": "STRING",

"secure": false,

"required": false

},

"value": "https:// vcloud.test.com/api/vdc/a2079642-0bde-42e5-8646-7a333618355b",

"overrideable": false

}

]

}

]

}

VMware vCloud Application Director API Programming

36 VMware, Inc.

REST APIs for Templates 7You can view cloud template information from the cloud environment. Register multiple cloud templates tovCloud Application Director.

Get Template CategoryRetrieves the cloud template category from the cloud environment.

Verify that your user account has the ROLE_CLOUD_ADMIN cloud administrator role assigned to it.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider/CloudProviderID/physical-

template-category

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider/1/physical-template-

category

Response{

"errors": false,

"messageList": [],

"count": 22,

"results": [

{

"id": "0",

"lockVersion": 0,

"name": "QE-catalog",

"description": null,

"cloudTemplateCategoryExtref": {

"id": "https://192.0.2.255/api/catalog/967ab959-5fcb-4c7d-bb3e-3a476048ee59",

"name": "QE-catalog"

VMware, Inc. 37

}

}

]

}

Find Template InformationSearches for a specific cloud template in the cloud environment.

Verify that your user account has the ROLE_CLOUD_ADMIN cloud administrator role assigned to it.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider/CloudProviderID/physical-

template-finder

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider/1/physical-template-finder

Request{

"id": "https://192.0.2.255/api/catalog/967ab959-5fcb-4c7d-bb3e-3a476048ee59",

}

Response{

"errors": false,

"messageList": [],

"count": 1,

"results": [

{

"id": "0",

"lockVersion": 0,

"name": "Centos58-32bit-base",

"description": "",

"lastUpdated": null,

"lastUpdateUser": null,

"created": null,

"createUser": null,

"cloudTemplateExtref": {

"id": "https://192.0.2.255/api/vAppTemplate/vappTemplate-

df51ec56-3b3c-4f5d-8482-90fe212bffff",

"name": "Centos58-32bit-base"

},

"cloudProviderRef": {

"uri": "/darwin/api/2.0/cloud-provider/1",

"id": "1",

"name": "Cloud"

VMware vCloud Application Director API Programming

38 VMware, Inc.

},

"osName": "centosGuest",

"properties": [

{

"propertyDefinition": {

"id": null,

"lockVersion": 0,

"name": null,

"description": null,

"key": "disksize",

"type": null,

"secure": false,

"required": false

},

"value": "66560",

"overrideable": false

},

{

"propertyDefinition": {

"id": null,

"lockVersion": 0,

"name": null,

"description": null,

"key": "goldMaster",

"type": null,

"secure": false,

"required": false

},

"value": "false",

"overrideable": false

}

]

}

]

}

Register a TemplateRegisters multiple cloud templates to vCloud Application Director. Provides a paginated list of all theregistered templates.

Verify that your user account has the ROLE_CLOUD_ADMIN cloud administrator role assigned to it.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-

provider/CloudProviderID/registered-physical-template

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Chapter 7 REST APIs for Templates

VMware, Inc. 39

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider/3/registered-physical-

template

Request{

"list": [

{

"cloudTemplateExtref": {

"id": "https://192.0.2.255/api/vAppTemplate/vappTemplate-

df51ec56-3b3c-4f5d-8482-90fe212bffff",

"name": "Centos58-32bit-base"

}

}

]

}

Response{

"errors": false,

"messageList": [],

"count": 1,

"results": [

{

"id": "4",

"lockVersion": 2,

"name": "Centos58-32bit-base",

"description": "",

"lastUpdated": 1378946109490,

"lastUpdateUser": "admin",

"created": 1378946096470,

"createUser": "admin",

"cloudTemplateExtref": {

"id": "https://192.0.2.255/api/vAppTemplate/vappTemplate-

df51ec56-3b3c-4f5d-8482-90fe212bffff",

"name": "Centos58-32bit-base"

},

"cloudProviderRef": {

"uri": "/darwin/api/2.0/cloud-provider/3",

"id": "3",

"name": "New Cloud"

},

"osName": "centosGuest",

"properties": []

}

]

}

VMware vCloud Application Director API Programming

40 VMware, Inc.

Get Registered TemplatesRetrieves registered cloud templates in vCloud Application Director from the cloud environment based onthe cloud provider ID.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-

provider/CloudProviderID/registered-physical-template

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider/1/registered-physical-

template

Response{

"errors": false,

"messageList": [],

"count": 2,

"results": [

{

"id": "1",

"lockVersion": 2,

"name": "C56x32_v9",

"description": "",

"lastUpdated": 1378765277631,

"lastUpdateUser": "admin",

"created": 1378765191716,

"createUser": "admin",

"cloudTemplateExtref": {

"id": "https://192.0.2.255/api/vAppTemplate/vappTemplate-61ba1dd9-8759-48a5-

bf6f-0e858bfc3744",

"name": "C56x32_v9"

},

"cloudProviderRef": {

"uri": "/darwin/api/2.0/cloud-provider/1",

"id": "1",

"name": "Cloud"

},

"osName": "centosGuest",

"properties": []

},

{

"id": "2",

"lockVersion": 1,

"name": "w2k8r2sp1_changesid_v5",

Chapter 7 REST APIs for Templates

VMware, Inc. 41

"description": "Windows 2008 R2 Enterprise SP1 with ChangeSID enabled, bootstrap 5.0 and

JRE 1.6.0_31.",

"lastUpdated": 1378765277632,

"lastUpdateUser": "admin",

"created": 1378765277630,

"createUser": "admin",

"cloudTemplateExtref": {

"id": "https://192.0.2.255/api/vAppTemplate/vappTemplate-

f57b63cd-20c0-4158-836f-13f7d9c39206",

"name": "w2k8r2sp1_changesid_v5"

},

"cloudProviderRef": {

"uri": "/darwin/api/2.0/cloud-provider/1",

"id": "1",

"name": "Cloud"

},

"osName": "windows7Server64Guest",

"properties": []

}

]

}

Get Registered Template Using IDRetrieves the registered cloud template in vCloud Application Director from the cloud environment basedon the provided ID.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/registered-physical-

template/RegisteredPhysicalTemplateID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/registered-physical-template/2

Response{

"errors": false,

"messageList": [],

"result": {

"id": "2",

"lockVersion": 1,

"name": "w2k8r2sp1_changesid_v5",

"description": "Windows 2008 R2 Enterprise SP1 with ChangeSID enabled, bootstrap 5.0 and JRE

1.6.0_31.",

"lastUpdated": 1378765277632,

"lastUpdateUser": "admin",

VMware vCloud Application Director API Programming

42 VMware, Inc.

"created": 1378765277630,

"createUser": "admin",

"cloudTemplateExtref": {

"id": "https://192.0.2.255/api/vAppTemplate/vappTemplate-

f57b63cd-20c0-4158-836f-13f7d9c39206",

"name": "w2k8r2sp1_changesid_v5"

},

"cloudProviderRef": {

"uri": "/darwin/api/2.0/cloud-provider/1",

"id": "1",

"name": "Cloud"

},

"osName": "windows7Server64Guest",

"properties": []

}

}

Replace a TemplateReplaces multiple cloud templates in the cloud environment.

Verify that your user account has the ROLE_CLOUD_ADMIN cloud administrator role assigned to it.

HTTP MethodPUT

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-

provider/CloudProviderID/registered-physical-template

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider/3/registered-physical-

template

Request{

"list": [

{

"cloudTemplateExtref": {

"id": "https://192.0.2.255/api/vAppTemplate/vappTemplate-

df51ec56-3b3c-4f5d-8482-90fe212bffff",

"name": "Centos58-32bit-base"

}

}

]

}

Chapter 7 REST APIs for Templates

VMware, Inc. 43

Response{

"errors": false,

"messageList": [],

"count": 1,

"results": [

{

"id": "4",

"lockVersion": 2,

"name": "Centos58-32bit-base",

"description": "",

"lastUpdated": 1378946109490,

"lastUpdateUser": "admin",

"created": 1378946096470,

"createUser": "admin",

"cloudTemplateExtref": {

"id": "https://192.0.2.255/api/vAppTemplate/vappTemplate-

df51ec56-3b3c-4f5d-8482-90fe212bffff",

"name": "Centos58-32bit-base"

},

"cloudProviderRef": {

"uri": "/darwin/api/2.0/cloud-provider/3",

"id": "3",

"name": "New Cloud"

},

"osName": "centosGuest",

"properties": []

}

]

}

VMware vCloud Application Director API Programming

44 VMware, Inc.

REST APIs for Logical Templates 8You can view logical templates mapped to a cloud template. You can also use the APIs to manage theselogical templates in the existing logical template list.

Get Logical TemplatesRetrieves a paginated list of logical template versions from vCloud Application Director.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-version?page=Page&page-

size=PageSize

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-version?page=0&page-

size=1

Response{

"errors": false,

"messageList": [],

"count": 16,

"results": [

{

"id": "306",

"lockVersion": 1,

"name": "CentOS 32bit with MySQL",

"description": "CentOS 6.3 32bit with MySQL Server 5.0",

"lastUpdated": 1322020758327,

"lastUpdateUser": "SYSTEM",

"created": 1322020758327,

"createUser": "SYSTEM",

"version": {

VMware, Inc. 45

"major": "1",

"minor": "0",

"micro": "0",

"qualifier": ""

},

"osVersionRef": {

"uri": "/darwin/api/2.0/operating-system-version/115",

"id": "115",

"name": "CentOS32 v6.3.0"

},

"tags": [

{

"id": "9",

"lockVersion": 1,

"name": "Database Servers",

"description": "Database servers",

"lastUpdated": 1378763302507,

"lastUpdateUser": "SYSTEM",

"created": 1378763302507,

"createUser": "SYSTEM",

"type": "Server Type"

},

{

"id": "20",

"lockVersion": 1,

"name": "OS Templates",

"description": "OS Templates",

"lastUpdated": 1378763302509,

"lastUpdateUser": "SYSTEM",

"created": 1378763302509,

"createUser": "SYSTEM",

"type": "Server Type"

}

],

"serviceVersions": [

{

"id": "215",

"lockVersion": 1,

"name": "Preinstalled MySQL Server for CentOS",

"description": "MySQL Server 5.0 preinstalled in CentOS 6.3 32bit",

"version": {

"major": "5",

"minor": "0",

"micro": "0",

"qualifier": ""

},

"properties": [],

"scripts": [

{

"id": "50",

"lockVersion": 1,

"lifecycleStage": "CONFIGURE",

"scriptType": "Bash Script",

"script": "#!/bin/bash\n […] ",

"rebootAfter": false

VMware vCloud Application Director API Programming

46 VMware, Inc.

}

],

"groupMembership": {

"id": "413",

"lockVersion": 1,

"ownerGroupRef": {

"uri": null,

"id": "1",

"name": "Default"

}

}

}

],

"groupMembership": {

"id": "306",

"lockVersion": 1,

"ownerGroupRef": {

"uri": null,

"id": "1",

"name": "Default"

}

}

}

]

}

Get Logical Template Version MappingRetrieves a list of cloud templates mapped to a logical template in vCloud Application Director when youspecify the cloud provider identification.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-

version/LogicalTemplateVersionID/mapped-physical-template/cloud-provider/CloudProviderID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-version/313/mapped-

physical-template/cloud-provider/1

Response{

"errors": false,

"messageList": [],

"count": 1,

"results": [

{

Chapter 8 REST APIs for Logical Templates

VMware, Inc. 47

"id": "2",

"lockVersion": 1,

"name": "w2k8r2sp1_changesid_v5",

"description": "Windows 2008 R2 Enterprise SP1 with ChangeSID enabled, bootstrap 5.0 and

JRE 1.6.0_31.",

"lastUpdated": 1378765277632,

"lastUpdateUser": "admin",

"created": 1378765277630,

"createUser": "admin",

"cloudTemplateExtref": {

"id": "https://192.0.2.255/api/vAppTemplate/vappTemplate-

f57b63cd-20c0-4158-836f-13f7d9c39206",

"name": "w2k8r2sp1_changesid_v5"

},

"cloudProviderRef": {

"uri": "/darwin/api/2.0/cloud-provider/1",

"id": "1",

"name": "Cloud"

},

"osName": "windows7Server64Guest",

"properties": []

}

]

}

Get Logical Template Version DetailsRetrieves the specific logical template version based on the logical template version identification.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-

version/LogicalTemplateVersionID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-version/313

Response{

"errors": false,

"messageList": [],

"result": {

"id": "313",

"lockVersion": 2,

"name": "W2K8 R2 Enterprise SP1",

"description": "Windows Server 2008 R2 Enterprise SP1 VM",

"lastUpdated": 1378765310743,

VMware vCloud Application Director API Programming

48 VMware, Inc.

"lastUpdateUser": "admin",

"created": 1331830800000,

"createUser": "SYSTEM",

"version": {

"major": "1",

"minor": "0",

"micro": "0",

"qualifier": ""

},

"osVersionRef": {

"uri": "/darwin/api/2.0/operating-system-version/111",

"id": "111",

"name": "WIN64 v6.1.7601"

},

"tags": [

{

"id": "20",

"lockVersion": 1,

"name": "OS Templates",

"description": "OS Templates",

"lastUpdated": 1378763302509,

"lastUpdateUser": "SYSTEM",

"created": 1378763302509,

"createUser": "SYSTEM",

"type": "Server Type"

}

],

"serviceVersions": [],

"groupMembership": {

"id": "313",

"lockVersion": 1,

"ownerGroupRef": {

"uri": null,

"id": "1",

"name": "Default"

}

}

}

}

Create Logical Template VersionCreates a logical template version.

The user account with the ROLE_CATALOG_ADMIN catalog administrator role can access this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-version

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Chapter 8 REST APIs for Logical Templates

VMware, Inc. 49

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-version

Request{

"id": "0",

"lockVersion": 0,

"name": "CentOS 32bit with MySQL 2",

"description": "CentOS 6.3 32bit with MySQL Server 5.0",

"version": {

"major": "1",

"minor": "0",

"micro": "0",

"qualifier": ""

},

"osVersionRef": {

"id": "115",

"name": "CentOS32 v6.3.0"

},

"tags": [

{

"id": "9",

"name": "Database Servers",

"description": "Database servers",

"type": "Server Type"

},

{

"id": "20",

"name": "OS Templates",

"description": "OS Templates",

"type": "Server Type"

}

],

"serviceVersions": []

}

}

Response{

"errors": false,

"messageList": [

{

"messageType": "INFO",

"message": "Logical VM template version saved successfully.",

"messageKey": "vmTemplateVersion.save.msg",

"property": null

}

],

"result": {

"id": "60088",

"lockVersion": 1,

"name": "CentOS 32bit with MySQL 2",

"description": "CentOS 6.3 32bit with MySQL Server 5.0",

VMware vCloud Application Director API Programming

50 VMware, Inc.

"lastUpdated": 1378949002080,

"lastUpdateUser": "admin",

"created": 1378949002080,

"createUser": "admin",

"version": {

"major": "1",

"minor": "0",

"micro": "0",

"qualifier": ""

},

"osVersionRef": {

"uri": "/darwin/api/2.0/operating-system-version/115",

"id": "115",

"name": "CentOS32 v6.3.0"

},

"tags": [

{

"id": "9",

"lockVersion": 1,

"name": "Database Servers",

"description": "Database servers",

"lastUpdated": 1378763302507,

"lastUpdateUser": "SYSTEM",

"created": 1378763302507,

"createUser": "SYSTEM",

"type": "Server Type"

},

{

"id": "20",

"lockVersion": 1,

"name": "OS Templates",

"description": "OS Templates",

"lastUpdated": 1378763302509,

"lastUpdateUser": "SYSTEM",

"created": 1378763302509,

"createUser": "SYSTEM",

"type": "Server Type"

}

],

"serviceVersions": [],

"groupMembership": {

"id": "437091",

"lockVersion": 0,

"ownerGroupRef": {

"uri": null,

"id": "1",

"name": "Default"

}

}

}

}

Chapter 8 REST APIs for Logical Templates

VMware, Inc. 51

Get Mapped Cloud Templates to a Logical TemplateRetrieves the mapped cloud templates to a vCloud Application Director logical template..

The user account with the ROLE_CATALOG_ADMIN catalog administrator role can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-

version/LogicalTemplateVersionID/mapped-physical-template

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-version/60597/mapped-

physical-template

Response{

"errors": false,

"messageList": [],

"count": 2,

"results": [

{

"id": "1",

"lockVersion": 1,

"name": "centos63x32",

"description": "",

"lastUpdated": 1383952048669,

"lastUpdateUser": "admin",

"created": 1383952048664,

"createUser": "admin",

"cloudTemplateExtref": {

"id": "vcac://pg/ab9d048f-0ba7-414c-9676-c2ea0646823b/bp/4b125c3c-

f6a3-4d19-93f9-3b99cd74d567",

"name": "centos63x32"

},

"cloudProviderRef": {

"uri": "/darwin/api/2.0/cloud-provider/1",

"id": "1",

"name": "vCAC-6.0-CP"

},

"osName": "",

"properties": [

{

"propertyDefinition": {

"id": "2004",

"lockVersion": 0,

"name": "reservation_policy_id",

"description": null,

VMware vCloud Application Director API Programming

52 VMware, Inc.

"key": "reservation_policy_id",

"type": "STRING",

"secure": false,

"required": true

},

"value": "",

"overrideable": true

},

{

"propertyDefinition": {

"id": "2005",

"lockVersion": 0,

"name": "provisioning_group_id",

"description": null,

"key": "provisioning_group_id",

"type": "STRING",

"secure": false,

"required": true

},

"value": "ab9d048f-0ba7-414c-9676-c2ea0646823b",

"overrideable": false

}

]

},

{

"id": "11",

"lockVersion": 1,

"name": "RHEL61x64",

"description": "",

"lastUpdated": 1383956550555,

"lastUpdateUser": "admin",

"created": 1383956550542,

"createUser": "admin",

"cloudTemplateExtref": {

"id": "vcac://pg/56283f48-764a-43c3-bcf8-8905ca5b7e07/bp/2a6f4868-0dd8-430b-

bceb-2b8a72690998",

"name": "RHEL61x64"

},

"cloudProviderRef": {

"uri": "/darwin/api/2.0/cloud-provider/3",

"id": "3",

"name": "ADAutomationCP-vCAC-prme"

},

"osName": null,

"properties": [

{

"propertyDefinition": {

"id": "2004",

"lockVersion": 0,

"name": "reservation_policy_id",

"description": null,

"key": "reservation_policy_id",

"type": "STRING",

"secure": false,

"required": true

Chapter 8 REST APIs for Logical Templates

VMware, Inc. 53

},

"value": "3f98e478-f941-4aeb-ae4a-3cc77df908d3",

"overrideable": false

},

{

"propertyDefinition": {

"id": "2005",

"lockVersion": 0,

"name": "provisioning_group_id",

"description": null,

"key": "provisioning_group_id",

"type": "STRING",

"secure": false,

"required": true

},

"value": "56283f48-764a-43c3-bcf8-8905ca5b7e07",

"overrideable": false

}

]

}

]

}

Add Logical Template MappingAdds the mapped logical template to the existing logical template list.

The user account with the ROLE_CATALOG_ADMIN catalog administrator role can access this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-

version/LogicalTemplateVersionID/mapped-physical-template

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-version/3/mapped-

physical-template

Request{

"list": [

{

"id": "3"

}

]

}

VMware vCloud Application Director API Programming

54 VMware, Inc.

Response{

"errors": false,

"messageList": [],

"count": 1,

"results": [

{

"id": "3",

"lockVersion": 4,

"name": "C63x32_v9",

"description": "",

"lastUpdated": 1378945924330,

"lastUpdateUser": "admin",

"created": 1378849355048,

"createUser": "admin",

"cloudTemplateExtref": {

"id": "https://192.0.2.255/api/vAppTemplate/vappTemplate-893d12f0-2c46-4ea9-a88b-

d8269f605643",

"name": "C63x32_v9"

},

"cloudProviderRef": {

"uri": "/darwin/api/2.0/cloud-provider/1",

"id": "1",

"name": "Cloud"

},

"osName": "centosGuest",

"properties": []

}

]

}

Replace Logical Template MappingReplaces all of the mapped logical templates from the existing logical template list.

The user account with the ROLE_CATALOG_ADMIN catalog administrator role can access this API.

HTTP MethodPUT

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-

version/LogicalTemplateVersionID/mapped-physical-template

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-version/3/mapped-

physical-template

Chapter 8 REST APIs for Logical Templates

VMware, Inc. 55

Request{

"list": [

{

"id": "3"

}

]

}

Response{

"errors": false,

"messageList": [],

"count": 1,

"results": [

{

"id": "3",

"lockVersion": 4,

"name": "C63x32_v9",

"description": "",

"lastUpdated": 1378945924330,

"lastUpdateUser": "admin",

"created": 1378849355048,

"createUser": "admin",

"cloudTemplateExtref": {

"id": "https://192.0.2.255/api/vAppTemplate/vappTemplate-893d12f0-2c46-4ea9-a88b-

d8269f605643",

"name": "C63x32_v9"

},

"cloudProviderRef": {

"uri": "/darwin/api/2.0/cloud-provider/1",

"id": "1",

"name": "Cloud"

},

"osName": "centosGuest",

"properties": []

}

]

}

Update the Preinstalled ServicesUpdates the available preinstalled services when you specify the logical template version identification.

The user account with the ROLE_CATALOG_ADMIN catalog administrator role can access this API.

HTTP MethodPOST

VMware vCloud Application Director API Programming

56 VMware, Inc.

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-

version/LogicalTemplateVersionID/preinstalled-services

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-

version/215/preinstalled-services

Request{

"list": [

{

"id": "215"

}

]

}

Response{

"errors": false,

"messageList": [

{

"messageType": "INFO",

"message": "Logical VM template version saved successfully.",

"messageKey": "vmTemplateVersion.save.msg",

"property": null

}

],

"result": null

}

Delete the Logical Template VersionDeletes a logical template version from the existing logical template list.

The user account with the ROLE_CATALOG_ADMIN catalog administrator role can access this API.

HTTP MethodDELETE

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-

version/LogicalTemplateVersionID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/logical-template-version/320

Chapter 8 REST APIs for Logical Templates

VMware, Inc. 57

Response{

"errors": false,

"messageList": [

{

"messageType": "INFO",

"message": "Successfully deleted Logical template version.",

"messageKey": "delete.msg",

"property": null

}

]

}

}

VMware vCloud Application Director API Programming

58 VMware, Inc.

REST APIs for Services 9You can view the service versions and service version details. You can also use the CLI command to importservices from vCloud Application Director 5.0 and 5.2 versions to the vCloud Application Director 6.0appliance or between different vCloud Application Director 6.0 appliances.

Get Service VersionRetrieves a paginated list of service versions.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/service-version?page=Page&page-

size=PageSize

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/service-version?page=0&page-size=1

Response{

"errors": false,

"messageList": [],

"count": 22,

"results": [

{

"id": "202",

"lockVersion": 1,

"name": "MySQL",

"description": "MySQL 5.0\MySQL is the most popular open-source database system.",

"version": {

"major": "5",

"minor": "0",

"micro": "0",

"qualifier": ""

VMware, Inc. 59

},

"properties": [

{

"propertyDefinition": {

"id": "900",

"lockVersion": 0,

"name": null,

"description": null,

"key": "global_conf",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "https://192.0.2.255:8443/darwin/conf/darwin_global.conf",

"overrideable": false

},

[…]

],

"scripts": [

{

"id": "2",

"lockVersion": 1,

"lifecycleStage": "INSTALL",

"scriptType": "Bash Script",

"script": "#!/bin/bash\n# I[… cut script …]\n",

"rebootAfter": false

},

[…]

],

"groupMembership": {

"id": "402",

"lockVersion": 1,

"ownerGroupRef": {

"uri": null,

"id": "1",

"name": "Default"

}

}

}

]

}

Get Service Version DetailsRetrieves the service version details based on the provided identification.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/service-version/ServiceVersionID

VMware vCloud Application Director API Programming

60 VMware, Inc.

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/service-version/297

Response{

"errors": false,

"messageList": [],

"result": {

"id": "297",

"lockVersion": 1,

"name": "Microsoft IIS with .Net Framework on W2K8R2",

"description": "Install and enable IIS Server 7 and .Net Framework 3.5 on Windows Server

2008 R2.",

"version": {

"major": "1",

"minor": "0",

"micro": "0",

"qualifier": ""

},

"properties": [

{

"propertyDefinition": {

"id": "806",

"lockVersion": 0,

"name": null,

"description": null,

"key": "Install_Path",

"type": "COMPUTED",

"secure": false,

"required": false

},

"value": "",

"overrideable": false

}

],

"scripts": [

{

"id": "109",

"lockVersion": 1,

"lifecycleStage": "INSTALL",

"scriptType": "Windows Powershell Script",

"script": "import-module Servermanager\nAdd-WindowsFeature Net-Framework\nAdd-

WindowsFeature web-asp-net\nAdd-WindowsFeature Web-Static-Content\nAdd-WindowsFeature as-http-

activation\nAdd-WindowsFeature web-mgmt-tools\n#Set Install Path to the default install path

(for monitoring)\n$Install_Path=\"${env:SYSTEMROOT}\\System32\"\necho \"Install_Path is set to

$Install_Path, please modify this script if the install path is not correct.\"\n",

"rebootAfter": false

}

],

"groupMembership": {

"id": "433",

"lockVersion": 1,

Chapter 9 REST APIs for Services

VMware, Inc. 61

"ownerGroupRef": {

"uri": null,

"id": "1",

"name": "Default"

}

}

}

}

VMware vCloud Application Director API Programming

62 VMware, Inc.

REST APIs for Operating Systems 10You can view the preinstalled operating system details included in vCloud Application Director.

Get Operating SystemsRetrieves the operating system details based on the provided ID.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/operating-system-

version/OperatingSystemVersionID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/operating-system-version/111

Response{

"errors": false,

"messageList": [],

"result": {

"id": "111",

"lockVersion": 1,

"name": "WIN64",

"description": "Windows Server 2008 R2 Enterprise SP1",

"lastUpdated": 1331830800000,

"lastUpdateUser": "SYSTEM",

"created": 1331830800000,

"createUser": "SYSTEM",

"version": {

"major": "6",

"minor": "1",

"micro": "7601",

"qualifier": ""

VMware, Inc. 63

},

"architecture": "x86_64",

"osFamily": "Windows"

}

}

VMware vCloud Application Director API Programming

64 VMware, Inc.

REST APIs for Tags 11You can view the tag associated with logical templates and services.

Get TagRetrieves a tag associated with a logical template or a service based on the provided ID.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/tag/TagID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/tag/20

Response{

"errors": false,

"messageList": [],

"result": {

"id": "20",

"lockVersion": 1,

"name": "OS Templates",

"description": "OS Templates",

"lastUpdated": 1378763302509,

"lastUpdateUser": "SYSTEM",

"created": 1378763302509,

"createUser": "SYSTEM",

"type": "Server Type"

}

}

VMware, Inc. 65

VMware vCloud Application Director API Programming

66 VMware, Inc.

REST APIs for DeploymentEnvironment 12

You can view the associated deployment environments to a cloud provider. You can also use the APIs tomanage these deployment environments.

Get Deployment EnvironmentsRetrieves a paginated list of deployment environments.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-environment?page=Page&page-

size=PageSize

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-environment?page=0&page-

size=10

Response{

"errors": false,

"messageList": [],

"count": 1,

"results": [

{

"id": "1",

"lockVersion": 4,

"name": "DE",

"description": "QA Deployment Environment",

"lastUpdated": 1378765277632,

"lastUpdateUser": "admin",

"created": 1378765102894,

"createUser": "admin",

"cloudProviderRef": {

VMware, Inc. 67

"uri": "/darwin/api/2.0/cloud-provider/1",

"id": "1",

"name": "Cloud"

},

"properties": [

{

"propertyDefinition": {

"id": "1024",

"lockVersion": 0,

"name": "VDC URI",

"description": "Virtual Data Center URI",

"key": "vdc_uri",

"type": "STRING",

"secure": false,

"required": false

},

"value": "https://192.0.2.255/api/vdc/a2079642-0bde-42e5-8646-7a333618355b",

"overrideable": false

}

]

}

]

}

Get Deployment EnvironmentRetrieves the deployment environment based on the provided identification.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-

environment/DeploymentEnvironmentID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-environment/1

Response{

"errors": false,

"messageList": [],

"result": {

"id": "1",

"lockVersion": 4,

"name": "DE",

"description": "QA Deployment Environment",

"lastUpdated": 1378765277632,

"lastUpdateUser": "admin",

VMware vCloud Application Director API Programming

68 VMware, Inc.

"created": 1378765102894,

"createUser": "admin",

"cloudProviderRef": {

"uri": "/darwin/api/2.0/cloud-provider/1",

"id": "1",

"name": "Cloud"

},

"properties": [

{

"propertyDefinition": {

"id": "1024",

"lockVersion": 0,

"name": "VDC URI",

"description": "Virtual Data Center URI",

"key": "vdc_uri",

"type": "STRING",

"secure": false,

"required": false

},

"value": "https://192.0.2.255/api/vdc/a2079642-0bde-42e5-8646-7a333618355b",

"overrideable": false

}

]

}

}

Create Deployment EnvironmentCreates a deployment environment.

The user account with the ROLE_CLOUD_ADMIN cloud administrator role can access this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-environment

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-environment

Request{

"id": "0",

"lockVersion": 0,

"name": "New DE",

"description": "Deployment Environment",

"cloudProviderRef": {

"uri": "/darwin/api/2.0/cloud-provider/1",

"id": "1",

"name": "Cloud"

Chapter 12 REST APIs for Deployment Environment

VMware, Inc. 69

},

"properties": [

{

"propertyDefinition": {

"id": "1024",

"lockVersion": 0,

"name": "VDC URI",

"description": "Virtual Data Center URI",

"key": "vdc_uri",

"type": "STRING",

"secure": false,

"required": false

},

"value": "https://192.0.2.255/api/vdc/a2079642-0bde-42e5-8646-7a333618355b",

"overrideable": false

}

]

}

Response{

"errors": false,

"messageList": [

{

"messageType": "INFO",

"message": "Deployment Environment saved successfully.",

"messageKey": "deploymentEnvironment.save.msg",

"property": null

}

],

"result": {

"id": "2",

"lockVersion": 1,

"name": "New DE",

"description": "Deployment Environment",

"lastUpdated": 1378935302738,

"lastUpdateUser": "admin",

"created": 1378935302737,

"createUser": "admin",

"cloudProviderRef": {

"uri": "/darwin/api/2.0/cloud-provider/1",

"id": "1",

"name": "Cloud"

},

"properties": [

{

"propertyDefinition": {

"id": "1024",

"lockVersion": 0,

"name": "VDC URI",

"description": "Virtual Data Center URI",

"key": "vdc_uri",

"type": "STRING",

"secure": false,

VMware vCloud Application Director API Programming

70 VMware, Inc.

"required": false

},

"value": "https://192.0.2.255/api/vdc/a2079642-0bde-42e5-8646-7a333618355b",

"overrideable": false

}

]

}

}

Get Deployment Environment Property ValuesRetrieves the property value definitions of a deployment environment associated to a cloud provider.

The user account with the ROLE_CLOUD_ADMIN cloud administrator role can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider/CloudProviderID/de-

property-value-choices/Key

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/cloud-provider/3/de-property-value-

choices/reservation_policy_uri

Response{

"errors": false,

"messageList": [],

"count": 5,

"results": [

"vcac://auto",

"vcac://rp/3f98e478-f941-4aeb-ae4a-3cc77df908d3",

"vcac://rp/b942ab8d-10ff-41c2-b4e8-777c89e3cfbc",

"vcac://rp/4443368b-8246-4194-9dd3-d4aecdd06996",

"vcac://rp/0d73b1a2-effc-4ec0-bd25-d4b20dbfdf06"

]

}

Get Cloud StorageRetrieves a list of cloud storage associated to a deployment environment.

The user account with the ROLE_CLOUD_ADMIN cloud administrator role can access this API.

HTTP MethodGET

Chapter 12 REST APIs for Deployment Environment

VMware, Inc. 71

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-

environment/DeploymentEnvironmentID/cloud-storage

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-environment/3/cloud-storage

Response{

"errors": false,

"messageList": [],

"count": 1,

"results": [

{

"id": "0",

"lockVersion": 0,

"name": "gold",

"description": null,

"cloudStorageExtref": {

"id": "vcac://sp/964185d6-3f40-44e0-9743-be5eed5528e1",

"name": "gold"

},

"properties": []

}

]

}

Get Cloud NetworkRetrieves a list of cloud networks associated to a deployment environment.

The user account with the ROLE_CLOUD_ADMIN cloud administrator role can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-

environment/DeploymentEnvironmentID/cloud-network

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-environment/24/cloud-network

VMware vCloud Application Director API Programming

72 VMware, Inc.

Response{

"errors": false,

"messageList": [],

"count": 2,

"results": [

{

"id": "0",

"lockVersion": 0,

"name": "AppDir-Direct",

"description": null,

"cloudNetworkExtref": {

"id": "https://vcd-server-bat-3.test.com/api/admin/network/548d8ee5-2459-42b4-

affc-920e8292f1c3",

"name": "AppDir-Direct"

},

"properties": [

{

"propertyDefinition": {

"id": null,

"lockVersion": 0,

"name": null,

"description": null,

"key": "isolated",

"type": null,

"secure": false,

"required": false

},

"value": "false",

"overrideable": false

},

{

"propertyDefinition": {

"id": null,

"lockVersion": 0,

"name": null,

"description": null,

"key": "routed",

"type": null,

"secure": false,

"required": false

},

"value": "false",

"overrideable": false

},

{

"propertyDefinition": {

"id": null,

"lockVersion": 0,

"name": null,

"description": null,

"key": "gatewayIp",

"type": null,

Chapter 12 REST APIs for Deployment Environment

VMware, Inc. 73

"secure": false,

"required": false

},

"value": "192.0.2.255.253",

"overrideable": false

},

{

"propertyDefinition": {

"id": null,

"lockVersion": 0,

"name": null,

"description": null,

"key": "pool",

"type": null,

"secure": false,

"required": false

},

"value": "true",

"overrideable": false

},

{

"propertyDefinition": {

"id": null,

"lockVersion": 0,

"name": null,

"description": null,

"key": "bridged",

"type": null,

"secure": false,

"required": false

},

"value": "true",

"overrideable": false

},

{

"propertyDefinition": {

"id": null,

"lockVersion": 0,

"name": null,

"description": null,

"key": "dhcp",

"type": null,

"secure": false,

"required": false

},

"value": "false",

"overrideable": false

}

]

},

{

"id": "0",

"lockVersion": 0,

"name": "Test-Routed",

"description": null,

VMware vCloud Application Director API Programming

74 VMware, Inc.

"cloudNetworkExtref": {

"id": "https://vcd-server-bat-3.test.com/api/admin/network/124f244a-

c3b4-4b0f-98c8-dbab4e95905e",

"name": "Test-Routed"

},

"properties": [

{

"propertyDefinition": {

"id": null,

"lockVersion": 0,

"name": null,

"description": null,

"key": "isolated",

"type": null,

"secure": false,

"required": false

},

"value": "false",

"overrideable": false

},

{

"propertyDefinition": {

"id": null,

"lockVersion": 0,

"name": null,

"description": null,

"key": "routed",

"type": null,

"secure": false,

"required": false

},

"value": "true",

"overrideable": false

},

{

"propertyDefinition": {

"id": null,

"lockVersion": 0,

"name": null,

"description": null,

"key": "gatewayIp",

"type": null,

"secure": false,

"required": false

},

"value": "192.0.2.255",

"overrideable": false

},

{

"propertyDefinition": {

"id": null,

"lockVersion": 0,

"name": null,

"description": null,

"key": "pool",

Chapter 12 REST APIs for Deployment Environment

VMware, Inc. 75

"type": null,

"secure": false,

"required": false

},

"value": "true",

"overrideable": false

},

{

"propertyDefinition": {

"id": null,

"lockVersion": 0,

"name": null,

"description": null,

"key": "bridged",

"type": null,

"secure": false,

"required": false

},

"value": "false",

"overrideable": false

},

{

"propertyDefinition": {

"id": null,

"lockVersion": 0,

"name": null,

"description": null,

"key": "dhcp",

"type": null,

"secure": false,

"required": false

},

"value": "false",

"overrideable": false

}

]

}

]

}

Delete Deployment EnvironmentDeletes the deployment environment associated to a cloud provider.

The user account with the ROLE_CLOUD_ADMIN cloud administrator role can access this API.

HTTP MethodDELETE

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-

environment/DeploymentEnvironmentID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

VMware vCloud Application Director API Programming

76 VMware, Inc.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-environment/2

Response{

"errors": false,

"messageList": [

{

"messageType": "INFO",

"message": "Successfully deleted Deployment Environment.",

"messageKey": "delete.msg",

"property": null

}

]

}

Chapter 12 REST APIs for Deployment Environment

VMware, Inc. 77

VMware vCloud Application Director API Programming

78 VMware, Inc.

REST APIs for Deployment Profiles 13You can view deployment profile for an application version. You can also use the APIs to create and delete adeployment profile.

Get Deployment Profile IDRetrieves the deployment profile for an application version based on the provided identification.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/application-

version/DeploymentProfileID/deployment-profile

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/application-version/513/deployment-

profile

Response{

"errors": false,

"messageList": [],

"count": 1,

"results": [

{

"id": "311",

"lockVersion": 1,

"name": "SPRING TRAVEL DP - IT",

"description": "IT Profile Content for Spring Travel App",

"lastUpdated": 1322020758327,

"lastUpdateUser": "SYSTEM",

"created": 1322020758327,

"createUser": "SYSTEM",

"profileNodes": [

VMware, Inc. 79

{

"id": "20",

"lockVersion": 1,

"node": {

"id": "16",

"lockVersion": 1,

"name": "SpringTravel",

"description": "Spring Travel app node",

"cluster": false,

"clusterSize": 1,

"memoryMb": 2048,

"vcpuCount": 1,

"hostname": "",

"logicalTemplateVersionRef": {

"uri": "/darwin/api/2.0/logical-template-version/324",

"id": "324",

"name": "CentOS63 32bit v1.0.0"

},

"osVersionRef": {

"uri": "/darwin/api/2.0/operating-system-version/115",

"id": "115",

"name": "CentOS32 v6.3.0"

},

"serviceNodeComponents": [],

"applicationNodeComponents": [],

"disks": [],

"nics": [

{

"id": "8",

"lockVersion": 1,

"name": "NIC0",

"description": null,

"networkName": "ServiceNetwork"

},

{

"id": "14",

"lockVersion": 1,

"name": "NIC1",

"description": null,

"networkName": "MgmtNetwork"

}

]

},

"physicalTemplateRef": {

"uri": "/darwin/api/2.0/registered-physical-template/49",

"id": "49",

"name": "C63x32_v10"

},

"profileDisks": [],

"properties": [

{

"propertyDefinition": {

"id": "521",

"lockVersion": 0,

"name": "vCPU",

VMware vCloud Application Director API Programming

80 VMware, Inc.

"description": null,

"key": "vCPU",

"type": "STRING",

"secure": false,

"required": true

},

"value": "1",

"overrideable": true

}

[…]

]

}

],

"profileNodeComponents": [

{

"id": "33",

"lockVersion": 1,

"name": null,

"description": null,

"nodeComponent": {

"id": "9820",

"lockVersion": 0,

"name": "SpringTravelApp",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/9820",

"id": "9820",

"name": "SpringTravelApp"

}

},

"properties": [

{

"propertyDefinition": {

"id": "152",

"lockVersion": 0,

"name": null,

"description": null,

"key": "war_file",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "https://nexus.springsource.com/service/local/repositories/darwin-

artifact-binary/content/com/vmware/darwin/app/swf-booking-mvc/1.0/swf-booking-mvc-1.0.war",

"overrideable": true

}

[…]

],

"scripts": []

},

{

"id": "34",

"lockVersion": 1,

"name": null,

"description": null,

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 81

"nodeComponent": {

"id": "9801",

"lockVersion": 0,

"name": "tcServer",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/9801",

"id": "9801",

"name": "tcServer"

},

"serviceRef": {

"uri": null,

"id": null,

"name": null

},

"preinstalled": false,

"applicationNodeComponents": []

},

"properties": [

{

"propertyDefinition": {

"id": "905",

"lockVersion": 0,

"name": null,

"description": null,

"key": "global_conf",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "https://${darwin.server.ip}:8443/darwin/conf/darwin_global.conf",

"overrideable": true

}

[…]

],

"scripts": []

}

],

"applicationVersionRef": {

"uri": "/darwin/api/2.0/application-version/513",

"id": "513",

"name": "Spring Travel v1.0.0"

},

"deploymentProfileNetworkMappings": [

{

"id": "5",

"lockVersion": 1,

"networkName": "ServiceNetwork",

"cloudNetworkExtref": {

"id": "https://10.64.62.75/api/admin/network/c6c751df-4a78-4f18-bbef-82bb8e30372e",

"name": "itest-PAYG-T2-direct"

},

"nodeNames": [

"SpringTravel"

]

VMware vCloud Application Director API Programming

82 VMware, Inc.

},

{

"id": "6",

"lockVersion": 1,

"networkName": "MgmtNetwork",

"cloudNetworkExtref": {

"id": "https://10.64.62.75/api/admin/network/c6c751df-4a78-4f18-bbef-82bb8e30372e",

"name": "itest-PAYG-T2-direct"

},

"nodeNames": [

"SpringTravel"

]

}

],

"deploymentEnvironmentRef": {

"uri": "/darwin/api/2.0/deployment-environment/10",

"id": "10",

"name": "itest-PAYG-T2"

}

}

]

}

Create Deployment ProfileCreates a deployment profile. You must specify the property values to override.

NOTE The URI should not contain a deployment profile identification. Remove the identification or set it as0.

The user account with the ROLE_DEPLOYER deployer role or SYSTEM_ADMIN system admin role canaccess this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-profile

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-profile

Request {

"id": "",

"lockVersion": 1,

"name": "SPRING TRAVEL DP2",

"description": "IT Profile Content for Spring Travel App",

"lastUpdated": 1322020758327,

"lastUpdateUser": "SYSTEM",

"created": 1322020758327,

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 83

"createUser": "SYSTEM",

"profileNodes": [

{

"id": "20",

"lockVersion": 1,

"node": {

"id": "16",

"lockVersion": 1,

"name": "SpringTravel",

"description": "Spring Travel app node",

"cluster": false,

"clusterSize": 1,

"memoryMb": 2048,

"vcpuCount": 1,

"hostname": "",

"logicalTemplateVersionRef": {

"uri": "/darwin/api/2.0/logical-template-version/324",

"id": "324",

"name": "CentOS63 32bit v1.0.0"

},

"osVersionRef": {

"uri": "/darwin/api/2.0/operating-system-version/115",

"id": "115",

"name": "CentOS32 v6.3.0"

},

"serviceNodeComponents": [],

"applicationNodeComponents": [],

"disks": [],

"nics": [

{

"id": "8",

"lockVersion": 1,

"name": "NIC0",

"description": null,

"networkName": "ServiceNetwork"

},

{

"id": "14",

"lockVersion": 1,

"name": "NIC1",

"description": null,

"networkName": "MgmtNetwork"

}

]

},

"physicalTemplateRef": {

"uri": "/darwin/api/2.0/registered-physical-template/51",

"id": "51",

"name": "C63x32_OneMirror_v10"

},

"profileDisks": [],

"properties": [

{

"propertyDefinition": {

"id": "521",

VMware vCloud Application Director API Programming

84 VMware, Inc.

"lockVersion": 0,

"name": "vCPU",

"description": null,

"key": "vCPU",

"type": "STRING",

"secure": false,

"required": true

},

"value": "1",

"overrideable": true

}

]

}

],

"profileNodeComponents": [

{

"id": "33",

"lockVersion": 1,

"name": null,

"description": null,

"nodeComponent": {

"id": "9820",

"lockVersion": 0,

"name": "SpringTravelApp",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/9820",

"id": "9820",

"name": "SpringTravelApp"

}

},

"properties": [

{

"propertyDefinition": {

"id": "152",

"lockVersion": 0,

"name": null,

"description": null,

"key": "war_file",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "https://nexus.springsource.com/service/local/repositories/darwin-

artifact-binary/content/com/vmware/darwin/app/swf-booking-mvc/1.0/swf-booking-mvc-1.0.war",

"overrideable": true

}

],

"scripts": []

},

{

"id": "34",

"lockVersion": 1,

"name": null,

"description": null,

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 85

"nodeComponent": {

"id": "9801",

"lockVersion": 0,

"name": "tcServer",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/9801",

"id": "9801",

"name": "tcServer"

},

"serviceRef": {

"uri": null,

"id": null,

"name": null

},

"preinstalled": false,

"applicationNodeComponents": []

},

"properties": [

{

"propertyDefinition": {

"id": "905",

"lockVersion": 0,

"name": null,

"description": null,

"key": "global_conf",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "https://${darwin.server.ip}:8443/darwin/conf/darwin_global.conf",

"overrideable": true

}

],

"scripts": []

}

],

"applicationVersionRef": {

"uri": "/darwin/api/2.0/application-version/513",

"id": "513",

"name": "Spring Travel v1.0.0"

},

"deploymentProfileNetworkMappings": [

{

"id": "5",

"lockVersion": 1,

"networkName": "ServiceNetwork",

"cloudNetworkExtref": {

"id":

"https://vcloud.eng.vmware.com/api/network/b95fc04d-99cc-4b9d-965c-80e9915abdba",

"name": "ExternalNetwork-IPPOOL"

},

"nodeNames": [

"SpringTravel"

]

VMware vCloud Application Director API Programming

86 VMware, Inc.

},

{

"id": "6",

"lockVersion": 1,

"networkName": "MgmtNetwork",

"cloudNetworkExtref": {

"id":

"https://vcloud.eng.vmware.com/api/network/5d69948b-1360-455f-888e-05bf48f8db26",

"name": "appit-red.orgnet.org"

},

"nodeNames": [

"SpringTravel"

]

}

],

"deploymentEnvironmentRef": {

"uri": "/darwin/api/2.0/deployment-environment/5",

"id": "5",

"name": "itest-PAYG"

}

}

Response{

"errors": false,

"messageList": [

{

"messageType": "INFO",

"message": "Deployment Profile saved successfully.",

"messageKey": "deployment.profile.save.msg",

"property": null

}

],

"result": {

"id": "1001",

"lockVersion": 2,

"name": "SPRING TRAVEL DP2",

"description": "IT Profile Content for Spring Travel App",

"lastUpdated": 1383599165170,

"lastUpdateUser": "admin",

"created": 1383599165129,

"createUser": "admin",

"profileNodes": [

{

"id": "1001",

"lockVersion": 2,

"node": {

"id": "16",

"lockVersion": 1,

"name": "SpringTravel",

"description": "Spring Travel app node",

"cluster": false,

"clusterSize": 1,

"memoryMb": 2048,

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 87

"vcpuCount": 1,

"hostname": "",

"logicalTemplateVersionRef": {

"uri": "/darwin/api/2.0/logical-template-version/324",

"id": "324",

"name": "CentOS63 32bit v1.0.0"

},

"osVersionRef": {

"uri": "/darwin/api/2.0/operating-system-version/115",

"id": "115",

"name": "CentOS32 v6.3.0"

},

"serviceNodeComponents": [],

"applicationNodeComponents": [],

"disks": [],

"nics": [

{

"id": "8",

"lockVersion": 1,

"name": "NIC0",

"description": null,

"networkName": "ServiceNetwork"

},

{

"id": "14",

"lockVersion": 1,

"name": "NIC1",

"description": null,

"networkName": "MgmtNetwork"

}

]

},

"physicalTemplateRef": {

"uri": "/darwin/api/2.0/registered-physical-template/51",

"id": "51",

"name": "C63x32_OneMirror_v10"

},

"profileDisks": [],

"properties": [

{

"propertyDefinition": {

"id": "521",

"lockVersion": 0,

"name": "vCPU",

"description": null,

"key": "vCPU",

"type": "STRING",

"secure": false,

"required": true

},

"value": "1",

"overrideable": true

},

{

"propertyDefinition": {

VMware vCloud Application Director API Programming

88 VMware, Inc.

"id": "524",

"lockVersion": 0,

"name": "Hostname",

"description": null,

"key": "Hostname",

"type": "STRING",

"secure": false,

"required": false

},

"value": "",

"overrideable": true

}

]

}

],

"profileNodeComponents": [

{

"id": "1001",

"lockVersion": 2,

"name": null,

"description": null,

"nodeComponent": {

"id": "9820",

"lockVersion": 0,

"name": "SpringTravelApp",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/9820",

"id": "9820",

"name": "SpringTravelApp"

}

},

"properties": [

{

"propertyDefinition": {

"id": "152",

"lockVersion": 0,

"name": null,

"description": null,

"key": "war_file",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "https://nexus.springsource.com/service/local/repositories/darwin-artifact-

binary/content/com/vmware/darwin/app/swf-booking-mvc/1.0/swf-booking-mvc-1.0.war",

"overrideable": true

},

{

"propertyDefinition": {

"id": "153",

"lockVersion": 0,

"name": null,

"description": null,

"key": "webapps_dir",

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 89

"type": "STRING",

"secure": false,

"required": true

},

"value": "${['self']['tcServer']['webapps_dir']}",

"overrideable": false

}

],

"scripts": []

},

{

"id": "1002",

"lockVersion": 2,

"name": null,

"description": null,

"nodeComponent": {

"id": "9801",

"lockVersion": 0,

"name": "tcServer",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/9801",

"id": "9801",

"name": "tcServer"

},

"serviceRef": {

"uri": null,

"id": null,

"name": null

},

"preinstalled": false,

"applicationNodeComponents": []

},

"properties": [

{

"propertyDefinition": {

"id": "905",

"lockVersion": 0,

"name": null,

"description": null,

"key": "global_conf",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "https://${darwin.server.ip}:8443/darwin/conf/darwin_global.conf",

"overrideable": true

}

],

"applicationVersionRef": {

"uri": "/darwin/api/2.0/application-version/513",

"id": "513",

"name": "Spring Travel v1.0.0"

},

"deploymentProfileNetworkMappings": [

VMware vCloud Application Director API Programming

90 VMware, Inc.

{

"id": "1001",

"lockVersion": 1,

"networkName": "ServiceNetwork",

"cloudNetworkExtref": {

"id": "https://darwin-vcloud-

cell.eng.vmware.com/api/network/b95fc04d-99cc-4b9d-965c-80e9915abdba",

"name": "ExternalNetwork-IPPOOL"

},

"nodeNames": [

"SpringTravel"

]

},

{

"id": "1002",

"lockVersion": 1,

"networkName": "MgmtNetwork",

"cloudNetworkExtref": {

"id": "https://darwin-vcloud-

cell.eng.vmware.com/api/network/5d69948b-1360-455f-888e-05bf48f8db26",

"name": "appit-red.orgnet.org"

},

"nodeNames": [

"SpringTravel"

]

}

],

"deploymentEnvironmentRef": {

"uri": "/darwin/api/2.0/deployment-environment/5",

"id": "5",

"name": "itest-PAYG"

}

}

}

Update Deployment ProfileUpdates the existing deployment profile.

The user account with the ROLE_DEPLOYER deployer role or SYSTEM_ADMIN system admin role canaccess this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-profile/DeploymentProfileID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-profile/454

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 91

Request{

"lockVersion": 1,

"name": "Deployment Profile for CDB",

"profileNodes": [

{

"id": "1314",

"lockVersion": 1,

"node": {

"id": "2",

"lockVersion": 7,

"name": "database",

"description": "DB TIER NODE",

"cluster": false,

"clusterSize": 1,

"memoryMb": 512,

"vcpuCount": 1,

"hostname": "",

"logicalTemplateVersionRef": {

"uri": "/darwin/api/2.0/logical-template-version/324",

"id": "324",

"name": "CentOS63 32bit v1.0.0"

},

"osVersionRef": {

"uri": "/darwin/api/2.0/operating-system-version/115",

"id": "115",

"name": "CentOS32 v6.3.0"

},

"serviceNodeComponents": [],

"applicationNodeComponents": [],

"disks": [],

"nics": [

{

"id": "1",

"lockVersion": 7,

"name": "NIC0",

"description": null,

"networkName": "ServiceNetwork"

}

]

},

"physicalTemplateRef": {

"uri": "/darwin/api/2.0/registered-physical-template/1",

"id": "1",

"name": "centos63x32"

},

"profileDisks": [],

"properties": [

{

"propertyDefinition": {

"id": "501",

"lockVersion": 0,

"name": "vCPU",

VMware vCloud Application Director API Programming

92 VMware, Inc.

"description": null,

"key": "vCPU",

"type": "STRING",

"secure": false,

"required": true

},

"value": "1",

"overrideable": true

},

{

"propertyDefinition": {

"id": "502",

"lockVersion": 0,

"name": "Memory(MB)",

"description": null,

"key": "Memory(MB)",

"type": "STRING",

"secure": false,

"required": true

},

"value": "512",

"overrideable": true

},

{

"propertyDefinition": {

"id": "503",

"lockVersion": 0,

"name": "ClusterSize",

"description": null,

"key": "ClusterSize",

"type": "STRING",

"secure": false,

"required": true

},

"value": "1",

"overrideable": true

},

{

"propertyDefinition": {

"id": "570",

"lockVersion": 0,

"name": "Hostname",

"description": null,

"key": "Hostname",

"type": "STRING",

"secure": false,

"required": false

},

"value": "",

"overrideable": true

}

]

},

{

"id": "1315",

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 93

"lockVersion": 1,

"node": {

"id": "3",

"lockVersion": 7,

"name": "appserver",

"description": "APP SERVER TIER NODE",

"cluster": true,

"clusterSize": 1,

"memoryMb": 2048,

"vcpuCount": 1,

"hostname": "",

"logicalTemplateVersionRef": {

"uri": "/darwin/api/2.0/logical-template-version/324",

"id": "324",

"name": "CentOS63 32bit v1.0.0"

},

"osVersionRef": {

"uri": "/darwin/api/2.0/operating-system-version/115",

"id": "115",

"name": "CentOS32 v6.3.0"

},

"serviceNodeComponents": [],

"applicationNodeComponents": [],

"disks": [],

"nics": [

{

"id": "2",

"lockVersion": 7,

"name": "NIC0",

"description": null,

"networkName": "ServiceNetwork"

}

]

},

"physicalTemplateRef": {

"uri": "/darwin/api/2.0/registered-physical-template/1",

"id": "1",

"name": "centos63x32"

},

"profileDisks": [],

"properties": [

{

"propertyDefinition": {

"id": "504",

"lockVersion": 0,

"name": "vCPU",

"description": null,

"key": "vCPU",

"type": "STRING",

"secure": false,

"required": true

},

"value": "2",

"overrideable": true

},

VMware vCloud Application Director API Programming

94 VMware, Inc.

{

"propertyDefinition": {

"id": "505",

"lockVersion": 0,

"name": "Memory(MB)",

"description": null,

"key": "Memory(MB)",

"type": "STRING",

"secure": false,

"required": true

},

"value": "2048",

"overrideable": true

},

{

"propertyDefinition": {

"id": "506",

"lockVersion": 0,

"name": "ClusterSize",

"description": null,

"key": "ClusterSize",

"type": "STRING",

"secure": false,

"required": true

},

"value": "3",

"overrideable": true

},

{

"propertyDefinition": {

"id": "571",

"lockVersion": 0,

"name": "Hostname",

"description": null,

"key": "Hostname",

"type": "STRING",

"secure": false,

"required": false

},

"value": "",

"overrideable": true

}

]

},

{

"id": "1316",

"lockVersion": 1,

"node": {

"id": "60102",

"lockVersion": 4,

"name": "load_balancer",

"description": "WEB SERVER TIER NODE",

"cluster": false,

"clusterSize": 1,

"memoryMb": 512,

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 95

"vcpuCount": 1,

"hostname": "",

"logicalTemplateVersionRef": {

"uri": "/darwin/api/2.0/logical-template-version/324",

"id": "324",

"name": "CentOS63 32bit v1.0.0"

},

"osVersionRef": {

"uri": "/darwin/api/2.0/operating-system-version/115",

"id": "115",

"name": "CentOS32 v6.3.0"

},

"serviceNodeComponents": [],

"applicationNodeComponents": [],

"disks": [],

"nics": [

{

"id": "60114",

"lockVersion": 1,

"name": "NIC1",

"description": null,

"networkName": "MgmtNetwork"

},

{

"id": "60108",

"lockVersion": 3,

"name": "NIC0",

"description": null,

"networkName": "ServiceNetwork"

}

]

},

"physicalTemplateRef": {

"uri": "/darwin/api/2.0/registered-physical-template/1",

"id": "1",

"name": "centos63x32"

},

"profileDisks": [],

"properties": [

{

"propertyDefinition": {

"id": "171446",

"lockVersion": 0,

"name": "Memory(MB)",

"description": null,

"key": "Memory(MB)",

"type": "STRING",

"secure": false,

"required": true

},

"value": "512",

"overrideable": true

},

{

"propertyDefinition": {

VMware vCloud Application Director API Programming

96 VMware, Inc.

"id": "171447",

"lockVersion": 0,

"name": "vCPU",

"description": null,

"key": "vCPU",

"type": "STRING",

"secure": false,

"required": true

},

"value": "1",

"overrideable": true

},

{

"propertyDefinition": {

"id": "171448",

"lockVersion": 0,

"name": "ClusterSize",

"description": null,

"key": "ClusterSize",

"type": "STRING",

"secure": false,

"required": true

},

"value": "1",

"overrideable": true

},

{

"propertyDefinition": {

"id": "171449",

"lockVersion": 0,

"name": "Hostname",

"description": null,

"key": "Hostname",

"type": "STRING",

"secure": false,

"required": false

},

"value": "",

"overrideable": true

}

]

}

],

"profileNodeComponents": [

{

"id": "3027",

"lockVersion": 1,

"name": null,

"description": null,

"nodeComponent": {

"id": "1001",

"lockVersion": 0,

"name": "MySql",

"description": null,

"nodeComponentDetailsRef": {

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 97

"uri": "/darwin/api/2.0/node-component-details/1001",

"id": "1001",

"name": "MySql"

},

"serviceRef": {

"uri": null,

"id": null,

"name": null

},

"preinstalled": false,

"applicationNodeComponents": []

},

"properties": [

{

"propertyDefinition": {

"id": "3",

"lockVersion": 0,

"name": null,

"description": null,

"key": "db_port",

"type": "STRING",

"secure": false,

"required": true

},

"value": "3306",

"overrideable": true

},

{

"propertyDefinition": {

"id": "288",

"lockVersion": 0,

"name": null,

"description": null,

"key": "max_allowed_packet",

"type": "STRING",

"secure": false,

"required": true

},

"value": "1024M",

"overrideable": true

},

{

"propertyDefinition": {

"id": "291",

"lockVersion": 0,

"name": null,

"description": null,

"key": "Install_Path",

"type": "COMPUTED",

"secure": false,

"required": false

},

"value": "",

"overrideable": false

},

VMware vCloud Application Director API Programming

98 VMware, Inc.

{

"propertyDefinition": {

"id": "292",

"lockVersion": 0,

"name": null,

"description": null,

"key": "db_root_password",

"type": "STRING",

"secure": true,

"required": true

},

"value": "V!rtua1Mach!ne",

"overrideable": true

},

{

"propertyDefinition": {

"id": "298",

"lockVersion": 0,

"name": null,

"description": null,

"key": "db_root_username",

"type": "STRING",

"secure": false,

"required": true

},

"value": "root",

"overrideable": false

},

{

"propertyDefinition": {

"id": "900",

"lockVersion": 0,

"name": null,

"description": null,

"key": "global_conf",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "https://${darwin.server.ip}:8443/darwin/conf/darwin_global.conf",

"overrideable": true

},

{

"propertyDefinition": {

"id": "43010",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JAVA_HOME",

"type": "STRING",

"secure": false,

"required": true

},

"value": "/opt/vmware-jre",

"overrideable": true

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 99

}

],

"scripts": []

},

{

"id": "3028",

"lockVersion": 1,

"name": null,

"description": null,

"nodeComponent": {

"id": "2000",

"lockVersion": 0,

"name": "initialize_db_script",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/2000",

"id": "2000",

"name": "initialize_db_script"

}

},

"properties": [

{

"propertyDefinition": {

"id": "26",

"lockVersion": 0,

"name": "",

"description": null,

"key": "initialize_db_script",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://${darwin.content.server.ip}/artifacts/app-

components/dukesbank/create_bank_db.sql",

"overrideable": true

},

{

"propertyDefinition": {

"id": "40",

"lockVersion": 0,

"name": "",

"description": null,

"key": "db_username",

"type": "STRING",

"secure": false,

"required": true

},

"value": "dukes_admin",

"overrideable": true

},

{

"propertyDefinition": {

"id": "41",

"lockVersion": 0,

"name": "",

VMware vCloud Application Director API Programming

100 VMware, Inc.

"description": null,

"key": "db_password",

"type": "STRING",

"secure": true,

"required": true

},

"value": "ENC{umXy9VOJOFPbaIuUgFE3JA/snipG4YRCqsmlWwhC58cV

+3IQEK5RYkLlXNJ2pDiS}CNE",

"overrideable": true

},

{

"propertyDefinition": {

"id": "290",

"lockVersion": 0,

"name": "",

"description": null,

"key": "init_db_password",

"type": "STRING",

"secure": true,

"required": true

},

"value": "${['database']['MySql']['db_root_password']}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "296",

"lockVersion": 0,

"name": "",

"description": null,

"key": "init_db_username",

"type": "STRING",

"secure": false,

"required": true

},

"value": "${['database']['MySql']['db_root_username']}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "299",

"lockVersion": 0,

"name": "",

"description": null,

"key": "sample_db",

"type": "STRING",

"secure": false,

"required": true

},

"value": "dukes_db",

"overrideable": true

}

],

"scripts": []

},

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 101

{

"id": "3029",

"lockVersion": 1,

"name": null,

"description": null,

"nodeComponent": {

"id": "1002",

"lockVersion": 0,

"name": "JBossAppServer",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/1002",

"id": "1002",

"name": "JBossAppServer"

},

"serviceRef": {

"uri": null,

"id": null,

"name": null

},

"preinstalled": false,

"applicationNodeComponents": []

},

"properties": [

{

"propertyDefinition": {

"id": "9",

"lockVersion": 0,

"name": null,

"description": null,

"key": "cheetah_install_script",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://$

{darwin.content.server.ip}/artifacts/services/jboss/cheetah_install.sh",

"overrideable": true

},

{

"propertyDefinition": {

"id": "10",

"lockVersion": 0,

"name": null,

"description": null,

"key": "jboss_install_script",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://$

{darwin.content.server.ip}/artifacts/services/jboss/install.sh",

"overrideable": true

},

{

VMware vCloud Application Director API Programming

102 VMware, Inc.

"propertyDefinition": {

"id": "11",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JBOSS_JMX_CONSOLE_USERS_TEMPLATE",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://${darwin.content.server.ip}/artifacts/services/jboss/jmx-

console-users.properties.tmpl",

"overrideable": true

},

{

"propertyDefinition": {

"id": "14",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JBOSS_NAME_AND_VERSION",

"type": "STRING",

"secure": false,

"required": true

},

"value": "jboss-5.1.0.GA",

"overrideable": true

},

{

"propertyDefinition": {

"id": "18",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JBOSS_JMX_USER",

"type": "STRING",

"secure": false,

"required": true

},

"value": "admin",

"overrideable": true

},

{

"propertyDefinition": {

"id": "19",

"lockVersion": 0,

"name": null,

"description": null,

"key": "cheetah_tgz_url",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://$

{darwin.content.server.ip}/artifacts/services/jboss/cheetah-2.4.4.tar.gz",

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 103

"overrideable": true

},

{

"propertyDefinition": {

"id": "20",

"lockVersion": 0,

"name": null,

"description": null,

"key": "jboss_configure_script",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://$

{darwin.content.server.ip}/artifacts/services/jboss/configure.sh",

"overrideable": true

},

{

"propertyDefinition": {

"id": "22",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JBOSS_JMX_PWD",

"type": "STRING",

"secure": true,

"required": true

},

"value": "V!rtua1Mach!ne",

"overrideable": true

},

{

"propertyDefinition": {

"id": "23",

"lockVersion": 0,

"name": null,

"description": null,

"key": "zip_url",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://$

{darwin.content.server.ip}/artifacts/services/jboss/jboss-5.1.0.GA.zip",

"overrideable": true

},

{

"propertyDefinition": {

"id": "24",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JBOSS_INSTANCE_NAME",

"type": "STRING",

"secure": false,

VMware vCloud Application Director API Programming

104 VMware, Inc.

"required": true

},

"value": "default",

"overrideable": true

},

{

"propertyDefinition": {

"id": "25",

"lockVersion": 0,

"name": null,

"description": null,

"key": "Install_Path",

"type": "COMPUTED",

"secure": false,

"required": false

},

"value": "",

"overrideable": false

},

{

"propertyDefinition": {

"id": "38",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JBOSS_BOOTRC_TEMPLATE",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://$

{darwin.content.server.ip}/artifacts/services/jboss/boot.rc.tmpl",

"overrideable": true

},

{

"propertyDefinition": {

"id": "162",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JVM_ROUTE",

"type": "STRING",

"secure": false,

"required": true

},

"value": "${['self']['host']['node_array_index']}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "901",

"lockVersion": 0,

"name": null,

"description": null,

"key": "global_conf",

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 105

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "https://${darwin.server.ip}:8443/darwin/conf/darwin_global.conf",

"overrideable": true

},

{

"propertyDefinition": {

"id": "2265",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JBOSS_PORT_NUMBER",

"type": "STRING",

"secure": false,

"required": true

},

"value": "8080",

"overrideable": true

},

{

"propertyDefinition": {

"id": "31505",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JAVA_HOME",

"type": "STRING",

"secure": false,

"required": true

},

"value": "/opt/vmware-jre",

"overrideable": true

}

],

"scripts": []

},

{

"id": "3030",

"lockVersion": 1,

"name": null,

"description": null,

"nodeComponent": {

"id": "3000",

"lockVersion": 0,

"name": "Dukes_Bank_App",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/3000",

"id": "3000",

"name": "Dukes_Bank_App"

}

},

"properties": [

VMware vCloud Application Director API Programming

106 VMware, Inc.

{

"propertyDefinition": {

"id": "4",

"lockVersion": 0,

"name": "",

"description": null,

"key": "jboss_deploy_datasource_script",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://${darwin.content.server.ip}/artifacts/app-

components/dukesbank/deploy_datasource.sh",

"overrideable": true

},

{

"propertyDefinition": {

"id": "5",

"lockVersion": 0,

"name": "",

"description": null,

"key": "jboss_deploy_component_script",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://${darwin.content.server.ip}/artifacts/app-

components/dukesbank/deploy_component.sh",

"overrideable": true

},

{

"propertyDefinition": {

"id": "6",

"lockVersion": 0,

"name": "",

"description": null,

"key": "db_port",

"type": "STRING",

"secure": false,

"required": true

},

"value": "${['database']['MySql']['db_port']}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "7",

"lockVersion": 0,

"name": "",

"description": null,

"key": "db_host",

"type": "STRING",

"secure": false,

"required": true

},

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 107

"value": "${['database']['host']['ip']}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "12",

"lockVersion": 0,

"name": "",

"description": null,

"key": "JBOSS_DATASOURCE_TEMPLATE",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://${darwin.content.server.ip}/artifacts/app-

components/dukesbank/jboss-ds.xml.tmpl",

"overrideable": true

},

{

"propertyDefinition": {

"id": "13",

"lockVersion": 0,

"name": "",

"description": null,

"key": "db_password",

"type": "STRING",

"secure": true,

"required": true

},

"value": "${['database']['initialize_db_script']['db_password']}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "16",

"lockVersion": 0,

"name": "",

"description": null,

"key": "db_user",

"type": "STRING",

"secure": false,

"required": true

},

"value": "${['database']['initialize_db_script']['db_username']}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "17",

"lockVersion": 0,

"name": "",

"description": null,

"key": "EAR_FILE",

"type": "CONTENT",

"secure": false,

VMware vCloud Application Director API Programming

108 VMware, Inc.

"required": true

},

"value": "http://${darwin.content.server.ip}/artifacts/app-

components/dukesbank/dukesbank-2b.ear",

"overrideable": true

},

{

"propertyDefinition": {

"id": "21",

"lockVersion": 0,

"name": "",

"description": null,

"key": "JAR_FILE",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://${darwin.content.server.ip}/artifacts/app-

components/dukesbank/mysql.jdbc-5.1.6.jar",

"overrideable": true

},

{

"propertyDefinition": {

"id": "31498",

"lockVersion": 0,

"name": "",

"description": null,

"key": "APPD_SCRIPT",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "https://${darwin.server.ip}:8443/darwin/conf/appd_functions.sh",

"overrideable": true

},

{

"propertyDefinition": {

"id": "31506",

"lockVersion": 0,

"name": "",

"description": null,

"key": "JAVA_HOME",

"type": "STRING",

"secure": false,

"required": true

},

"value": "${['self']['JBossAppServer']['JAVA_HOME']}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "111115",

"lockVersion": 0,

"name": "",

"description": null,

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 109

"key": "dukes_db",

"type": "STRING",

"secure": false,

"required": true

},

"value": "${['database']['initialize_db_script']['sample_db']}",

"overrideable": false

}

],

"scripts": []

},

{

"id": "3031",

"lockVersion": 1,

"name": null,

"description": null,

"nodeComponent": {

"id": "1003",

"lockVersion": 0,

"name": "Apache_LB",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/1003",

"id": "1003",

"name": "Apache_LB"

},

"serviceRef": {

"uri": null,

"id": null,

"name": null

},

"preinstalled": false,

"applicationNodeComponents": []

},

"properties": [

{

"propertyDefinition": {

"id": "27",

"lockVersion": 0,

"name": null,

"description": null,

"key": "http_node_port",

"type": "ARRAY",

"secure": false,

"required": true

},

"value": "${#util.all(\"['appserver']['JBossAppServer']

['JBOSS_PORT_NUMBER']\")}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "28",

"lockVersion": 0,

"name": null,

VMware vCloud Application Director API Programming

110 VMware, Inc.

"description": null,

"key": "autogen_sticky_cookie",

"type": "STRING",

"secure": false,

"required": false

},

"value": "NO",

"overrideable": true

},

{

"propertyDefinition": {

"id": "29",

"lockVersion": 0,

"name": null,

"description": null,

"key": "http_proxy_port",

"type": "STRING",

"secure": false,

"required": true

},

"value": "8081",

"overrideable": true

},

{

"propertyDefinition": {

"id": "30",

"lockVersion": 0,

"name": null,

"description": null,

"key": "http_node_ips",

"type": "ARRAY",

"secure": false,

"required": true

},

"value": "${#util.all(\"['appserver']['host']['ip']\")}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "31",

"lockVersion": 0,

"name": null,

"description": null,

"key": "http_port",

"type": "STRING",

"secure": false,

"required": false

},

"value": "80",

"overrideable": true

},

{

"propertyDefinition": {

"id": "163",

"lockVersion": 0,

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 111

"name": null,

"description": null,

"key": "appsrv_routes",

"type": "ARRAY",

"secure": false,

"required": true

},

"value": "${#util.all(\"['appserver']['JBossAppServer']['JVM_ROUTE']\")}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "700",

"lockVersion": 0,

"name": null,

"description": null,

"key": "service_restart",

"type": "COMPUTED",

"secure": false,

"required": true

},

"value": "service httpd restart",

"overrideable": false

},

{

"propertyDefinition": {

"id": "701",

"lockVersion": 0,

"name": null,

"description": null,

"key": "service_start",

"type": "COMPUTED",

"secure": false,

"required": false

},

"value": "service httpd start",

"overrideable": false

},

{

"propertyDefinition": {

"id": "702",

"lockVersion": 0,

"name": null,

"description": null,

"key": "service_stop",

"type": "COMPUTED",

"secure": false,

"required": false

},

"value": "service httpd stop",

"overrideable": false

},

{

"propertyDefinition": {

"id": "703",

VMware vCloud Application Director API Programming

112 VMware, Inc.

"lockVersion": 0,

"name": null,

"description": null,

"key": "tomcat_context",

"type": "STRING",

"secure": false,

"required": false

},

"value": "",

"overrideable": true

},

{

"propertyDefinition": {

"id": "704",

"lockVersion": 0,

"name": null,

"description": null,

"key": "ajp_proxy_context",

"type": "STRING",

"secure": false,

"required": false

},

"value": "",

"overrideable": true

},

{

"propertyDefinition": {

"id": "705",

"lockVersion": 0,

"name": null,

"description": null,

"key": "config_httpd_conf",

"type": "COMPUTED",

"secure": false,

"required": false

},

"value": "/etc/httpd/conf/httpd.conf",

"overrideable": false

},

{

"propertyDefinition": {

"id": "706",

"lockVersion": 0,

"name": null,

"description": null,

"key": "config_conf_d",

"type": "COMPUTED",

"secure": false,

"required": false

},

"value": "/etc/httpd/conf.d",

"overrideable": false

},

{

"propertyDefinition": {

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 113

"id": "707",

"lockVersion": 0,

"name": null,

"description": null,

"key": "config_static_site",

"type": "COMPUTED",

"secure": false,

"required": false

},

"value": "/var/www/html",

"overrideable": false

},

{

"propertyDefinition": {

"id": "708",

"lockVersion": 0,

"name": null,

"description": null,

"key": "use_ajp",

"type": "STRING",

"secure": false,

"required": true

},

"value": "NO",

"overrideable": true

},

{

"propertyDefinition": {

"id": "902",

"lockVersion": 0,

"name": null,

"description": null,

"key": "global_conf",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "https://${darwin.server.ip}:8443/darwin/conf/darwin_global.conf",

"overrideable": true

},

{

"propertyDefinition": {

"id": "1111",

"lockVersion": 0,

"name": null,

"description": null,

"key": "httpd_dir",

"type": "STRING",

"secure": false,

"required": false

},

"value": "/etc/httpd",

"overrideable": false

},

{

VMware vCloud Application Director API Programming

114 VMware, Inc.

"propertyDefinition": {

"id": "43000",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JAVA_HOME",

"type": "STRING",

"secure": false,

"required": true

},

"value": "/opt/vmware-jre",

"overrideable": true

}

],

"scripts": []

}

],

"applicationVersionRef": {

"uri": "/darwin/api/2.0/application-version/501",

"id": "501",

"name": "Clustered Dukes Bank App v2.1.0"

},

"deploymentProfileNetworkMappings": [

{

"id": "485",

"lockVersion": 0,

"networkName": "MgmtNetwork",

"cloudNetworkExtref": {

"id": "network://vcac-default-network",

"name": "VCAC-DEFAULT-NETWORK"

},

"nodeNames": [

"load_balancer"

]

},

{

"id": "486",

"lockVersion": 0,

"networkName": "ServiceNetwork",

"cloudNetworkExtref": {

"id": "network://vcac-default-network",

"name": "VCAC-DEFAULT-NETWORK"

},

"nodeNames": [

"database",

"appserver",

"load_balancer"

]

}

],

"deploymentEnvironmentRef": {

"uri": "/darwin/api/2.0/deployment-environment/1",

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 115

"id": "1",

"name": "vCAC-6.0-DE"

}

}

Response{

"errors": false,

"messageList": [

{

"messageType": "INFO",

"message": "Deployment Profile saved successfully.",

"messageKey": "deployment.profile.save.msg",

"property": null

}

],

"result": {

"id": "454",

"lockVersion": 2,

"name": "Deployment Profile for CDB",

"description": null,

"lastUpdated": 1384408329994,

"lastUpdateUser": "admin",

"created": 1384407985790,

"createUser": "admin",

"profileNodes": [

{

"id": "1314",

"lockVersion": 2,

"node": {

"id": "2",

"lockVersion": 7,

"name": "database",

"description": "DB TIER NODE",

"cluster": false,

"clusterSize": 1,

"memoryMb": 512,

"vcpuCount": 1,

"hostname": "",

"logicalTemplateVersionRef": {

"uri": "/darwin/api/2.0/logical-template-version/324",

"id": "324",

"name": "CentOS63 32bit v1.0.0"

},

"osVersionRef": {

"uri": "/darwin/api/2.0/operating-system-version/115",

"id": "115",

"name": "CentOS32 v6.3.0"

},

"serviceNodeComponents": [],

"applicationNodeComponents": [],

"disks": [],

"nics": [

{

VMware vCloud Application Director API Programming

116 VMware, Inc.

"id": "1",

"lockVersion": 7,

"name": "NIC0",

"description": null,

"networkName": "ServiceNetwork"

}

]

},

"physicalTemplateRef": {

"uri": "/darwin/api/2.0/registered-physical-template/1",

"id": "1",

"name": "centos63x32"

},

"profileDisks": [],

"properties": [

{

"propertyDefinition": {

"id": "501",

"lockVersion": 0,

"name": "vCPU",

"description": null,

"key": "vCPU",

"type": "STRING",

"secure": false,

"required": true

},

"value": "1",

"overrideable": false

},

{

"propertyDefinition": {

"id": "502",

"lockVersion": 0,

"name": "Memory(MB)",

"description": null,

"key": "Memory(MB)",

"type": "STRING",

"secure": false,

"required": true

},

"value": "512",

"overrideable": false

},

{

"propertyDefinition": {

"id": "503",

"lockVersion": 0,

"name": "ClusterSize",

"description": null,

"key": "ClusterSize",

"type": "STRING",

"secure": false,

"required": true

},

"value": "1",

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 117

"overrideable": false

},

{

"propertyDefinition": {

"id": "570",

"lockVersion": 0,

"name": "Hostname",

"description": null,

"key": "Hostname",

"type": "STRING",

"secure": false,

"required": false

},

"value": "",

"overrideable": false

}

]

},

{

"id": "1315",

"lockVersion": 2,

"node": {

"id": "3",

"lockVersion": 7,

"name": "appserver",

"description": "APP SERVER TIER NODE",

"cluster": true,

"clusterSize": 1,

"memoryMb": 2048,

"vcpuCount": 1,

"hostname": "",

"logicalTemplateVersionRef": {

"uri": "/darwin/api/2.0/logical-template-version/324",

"id": "324",

"name": "CentOS63 32bit v1.0.0"

},

"osVersionRef": {

"uri": "/darwin/api/2.0/operating-system-version/115",

"id": "115",

"name": "CentOS32 v6.3.0"

},

"serviceNodeComponents": [],

"applicationNodeComponents": [],

"disks": [],

"nics": [

{

"id": "2",

"lockVersion": 7,

"name": "NIC0",

"description": null,

"networkName": "ServiceNetwork"

}

]

},

"physicalTemplateRef": {

VMware vCloud Application Director API Programming

118 VMware, Inc.

"uri": "/darwin/api/2.0/registered-physical-template/1",

"id": "1",

"name": "centos63x32"

},

"profileDisks": [],

"properties": [

{

"propertyDefinition": {

"id": "504",

"lockVersion": 0,

"name": "vCPU",

"description": null,

"key": "vCPU",

"type": "STRING",

"secure": false,

"required": true

},

"value": "2",

"overrideable": false

},

{

"propertyDefinition": {

"id": "505",

"lockVersion": 0,

"name": "Memory(MB)",

"description": null,

"key": "Memory(MB)",

"type": "STRING",

"secure": false,

"required": true

},

"value": "2048",

"overrideable": false

},

{

"propertyDefinition": {

"id": "506",

"lockVersion": 0,

"name": "ClusterSize",

"description": null,

"key": "ClusterSize",

"type": "STRING",

"secure": false,

"required": true

},

"value": "3",

"overrideable": false

},

{

"propertyDefinition": {

"id": "571",

"lockVersion": 0,

"name": "Hostname",

"description": null,

"key": "Hostname",

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 119

"type": "STRING",

"secure": false,

"required": false

},

"value": "",

"overrideable": false

}

]

},

{

"id": "1316",

"lockVersion": 2,

"node": {

"id": "60102",

"lockVersion": 4,

"name": "load_balancer",

"description": "WEB SERVER TIER NODE",

"cluster": false,

"clusterSize": 1,

"memoryMb": 512,

"vcpuCount": 1,

"hostname": "",

"logicalTemplateVersionRef": {

"uri": "/darwin/api/2.0/logical-template-version/324",

"id": "324",

"name": "CentOS63 32bit v1.0.0"

},

"osVersionRef": {

"uri": "/darwin/api/2.0/operating-system-version/115",

"id": "115",

"name": "CentOS32 v6.3.0"

},

"serviceNodeComponents": [],

"applicationNodeComponents": [],

"disks": [],

"nics": [

{

"id": "60114",

"lockVersion": 1,

"name": "NIC1",

"description": null,

"networkName": "MgmtNetwork"

},

{

"id": "60108",

"lockVersion": 3,

"name": "NIC0",

"description": null,

"networkName": "ServiceNetwork"

}

]

},

"physicalTemplateRef": {

"uri": "/darwin/api/2.0/registered-physical-template/1",

"id": "1",

VMware vCloud Application Director API Programming

120 VMware, Inc.

"name": "centos63x32"

},

"profileDisks": [],

"properties": [

{

"propertyDefinition": {

"id": "171446",

"lockVersion": 0,

"name": "Memory(MB)",

"description": null,

"key": "Memory(MB)",

"type": "STRING",

"secure": false,

"required": true

},

"value": "512",

"overrideable": false

},

{

"propertyDefinition": {

"id": "171447",

"lockVersion": 0,

"name": "vCPU",

"description": null,

"key": "vCPU",

"type": "STRING",

"secure": false,

"required": true

},

"value": "1",

"overrideable": false

},

{

"propertyDefinition": {

"id": "171448",

"lockVersion": 0,

"name": "ClusterSize",

"description": null,

"key": "ClusterSize",

"type": "STRING",

"secure": false,

"required": true

},

"value": "1",

"overrideable": false

},

{

"propertyDefinition": {

"id": "171449",

"lockVersion": 0,

"name": "Hostname",

"description": null,

"key": "Hostname",

"type": "STRING",

"secure": false,

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 121

"required": false

},

"value": "",

"overrideable": false

}

]

}

],

"profileNodeComponents": [

{

"id": "3027",

"lockVersion": 2,

"name": null,

"description": null,

"nodeComponent": {

"id": "1001",

"lockVersion": 0,

"name": "MySql",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/1001",

"id": "1001",

"name": "MySql"

},

"serviceRef": {

"uri": null,

"id": null,

"name": null

},

"preinstalled": false,

"applicationNodeComponents": []

},

"properties": [

{

"propertyDefinition": {

"id": "3",

"lockVersion": 0,

"name": null,

"description": null,

"key": "db_port",

"type": "STRING",

"secure": false,

"required": true

},

"value": "3306",

"overrideable": false

},

{

"propertyDefinition": {

"id": "288",

"lockVersion": 0,

"name": null,

"description": null,

"key": "max_allowed_packet",

"type": "STRING",

VMware vCloud Application Director API Programming

122 VMware, Inc.

"secure": false,

"required": true

},

"value": "1024M",

"overrideable": false

},

{

"propertyDefinition": {

"id": "291",

"lockVersion": 0,

"name": null,

"description": null,

"key": "Install_Path",

"type": "COMPUTED",

"secure": false,

"required": false

},

"value": "",

"overrideable": false

},

{

"propertyDefinition": {

"id": "292",

"lockVersion": 0,

"name": null,

"description": null,

"key": "db_root_password",

"type": "STRING",

"secure": true,

"required": true

},

"value":

"ENC{lBWAu1KTDtYbAeZbWuYqqlefanZeDrjGIwZbXYyC78rfubnHVYlYJlvLsqzaeeyp}CNE",

"overrideable": false

},

{

"propertyDefinition": {

"id": "298",

"lockVersion": 0,

"name": null,

"description": null,

"key": "db_root_username",

"type": "STRING",

"secure": false,

"required": true

},

"value": "root",

"overrideable": false

},

{

"propertyDefinition": {

"id": "900",

"lockVersion": 0,

"name": null,

"description": null,

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 123

"key": "global_conf",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "https://${darwin.server.ip}:

8443/darwin/conf/darwin_global.conf",

"overrideable": false

},

{

"propertyDefinition": {

"id": "43010",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JAVA_HOME",

"type": "STRING",

"secure": false,

"required": true

},

"value": "/opt/vmware-jre",

"overrideable": false

}

],

"scripts": []

},

{

"id": "3028",

"lockVersion": 2,

"name": null,

"description": null,

"nodeComponent": {

"id": "2000",

"lockVersion": 0,

"name": "initialize_db_script",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/2000",

"id": "2000",

"name": "initialize_db_script"

}

},

"properties": [

{

"propertyDefinition": {

"id": "26",

"lockVersion": 0,

"name": "",

"description": null,

"key": "initialize_db_script",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://${darwin.content.server.ip}/artifacts/app-

VMware vCloud Application Director API Programming

124 VMware, Inc.

components/dukesbank/create_bank_db.sql",

"overrideable": false

},

{

"propertyDefinition": {

"id": "40",

"lockVersion": 0,

"name": "",

"description": null,

"key": "db_username",

"type": "STRING",

"secure": false,

"required": true

},

"value": "dukes_admin",

"overrideable": false

},

{

"propertyDefinition": {

"id": "41",

"lockVersion": 0,

"name": "",

"description": null,

"key": "db_password",

"type": "STRING",

"secure": true,

"required": true

},

"value": "ENC{umXy9VOJOFPbaIuUgFE3JA/snipG4YRCqsmlWwhC58cV

+3IQEK5RYkLlXNJ2pDiS}CNE",

"overrideable": false

},

{

"propertyDefinition": {

"id": "290",

"lockVersion": 0,

"name": "",

"description": null,

"key": "init_db_password",

"type": "STRING",

"secure": true,

"required": true

},

"value": "${['database']['MySql']['db_root_password']}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "296",

"lockVersion": 0,

"name": "",

"description": null,

"key": "init_db_username",

"type": "STRING",

"secure": false,

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 125

"required": true

},

"value": "${['database']['MySql']['db_root_username']}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "299",

"lockVersion": 0,

"name": "",

"description": null,

"key": "sample_db",

"type": "STRING",

"secure": false,

"required": true

},

"value": "dukes_db",

"overrideable": false

}

],

"scripts": []

},

{

"id": "3029",

"lockVersion": 2,

"name": null,

"description": null,

"nodeComponent": {

"id": "1002",

"lockVersion": 0,

"name": "JBossAppServer",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/1002",

"id": "1002",

"name": "JBossAppServer"

},

"serviceRef": {

"uri": null,

"id": null,

"name": null

},

"preinstalled": false,

"applicationNodeComponents": []

},

"properties": [

{

"propertyDefinition": {

"id": "9",

"lockVersion": 0,

"name": null,

"description": null,

"key": "cheetah_install_script",

"type": "CONTENT",

"secure": false,

VMware vCloud Application Director API Programming

126 VMware, Inc.

"required": true

},

"value": "http://$

{darwin.content.server.ip}/artifacts/services/jboss/cheetah_install.sh",

"overrideable": false

},

{

"propertyDefinition": {

"id": "10",

"lockVersion": 0,

"name": null,

"description": null,

"key": "jboss_install_script",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://$

{darwin.content.server.ip}/artifacts/services/jboss/install.sh",

"overrideable": false

},

{

"propertyDefinition": {

"id": "11",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JBOSS_JMX_CONSOLE_USERS_TEMPLATE",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://$

{darwin.content.server.ip}/artifacts/services/jboss/jmx-console-users.properties.tmpl",

"overrideable": false

},

{

"propertyDefinition": {

"id": "14",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JBOSS_NAME_AND_VERSION",

"type": "STRING",

"secure": false,

"required": true

},

"value": "jboss-5.1.0.GA",

"overrideable": false

},

{

"propertyDefinition": {

"id": "18",

"lockVersion": 0,

"name": null,

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 127

"description": null,

"key": "JBOSS_JMX_USER",

"type": "STRING",

"secure": false,

"required": true

},

"value": "admin",

"overrideable": false

},

{

"propertyDefinition": {

"id": "19",

"lockVersion": 0,

"name": null,

"description": null,

"key": "cheetah_tgz_url",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://$

{darwin.content.server.ip}/artifacts/services/jboss/cheetah-2.4.4.tar.gz",

"overrideable": false

},

{

"propertyDefinition": {

"id": "20",

"lockVersion": 0,

"name": null,

"description": null,

"key": "jboss_configure_script",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://$

{darwin.content.server.ip}/artifacts/services/jboss/configure.sh",

"overrideable": false

},

{

"propertyDefinition": {

"id": "22",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JBOSS_JMX_PWD",

"type": "STRING",

"secure": true,

"required": true

},

"value": "ENC{dAVB2/F1LAf0iCi4563nizolub/vJhJ0Frpm1YoHyGSQBLIZ0Q3c6ZVM2Bm

+wOS1}CNE",

"overrideable": false

},

{

VMware vCloud Application Director API Programming

128 VMware, Inc.

"propertyDefinition": {

"id": "23",

"lockVersion": 0,

"name": null,

"description": null,

"key": "zip_url",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://$

{darwin.content.server.ip}/artifacts/services/jboss/jboss-5.1.0.GA.zip",

"overrideable": false

},

{

"propertyDefinition": {

"id": "24",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JBOSS_INSTANCE_NAME",

"type": "STRING",

"secure": false,

"required": true

},

"value": "default",

"overrideable": false

},

{

"propertyDefinition": {

"id": "25",

"lockVersion": 0,

"name": null,

"description": null,

"key": "Install_Path",

"type": "COMPUTED",

"secure": false,

"required": false

},

"value": "",

"overrideable": false

},

{

"propertyDefinition": {

"id": "38",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JBOSS_BOOTRC_TEMPLATE",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://$

{darwin.content.server.ip}/artifacts/services/jboss/boot.rc.tmpl",

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 129

"overrideable": false

},

{

"propertyDefinition": {

"id": "162",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JVM_ROUTE",

"type": "STRING",

"secure": false,

"required": true

},

"value": "${['self']['host']['node_array_index']}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "901",

"lockVersion": 0,

"name": null,

"description": null,

"key": "global_conf",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "https://${darwin.server.ip}:

8443/darwin/conf/darwin_global.conf",

"overrideable": false

},

{

"propertyDefinition": {

"id": "2265",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JBOSS_PORT_NUMBER",

"type": "STRING",

"secure": false,

"required": true

},

"value": "8080",

"overrideable": false

},

{

"propertyDefinition": {

"id": "31505",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JAVA_HOME",

"type": "STRING",

"secure": false,

"required": true

VMware vCloud Application Director API Programming

130 VMware, Inc.

},

"value": "/opt/vmware-jre",

"overrideable": false

}

],

"scripts": []

},

{

"id": "3030",

"lockVersion": 2,

"name": null,

"description": null,

"nodeComponent": {

"id": "3000",

"lockVersion": 0,

"name": "Dukes_Bank_App",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/3000",

"id": "3000",

"name": "Dukes_Bank_App"

}

},

"properties": [

{

"propertyDefinition": {

"id": "4",

"lockVersion": 0,

"name": "",

"description": null,

"key": "jboss_deploy_datasource_script",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://${darwin.content.server.ip}/artifacts/app-

components/dukesbank/deploy_datasource.sh",

"overrideable": false

},

{

"propertyDefinition": {

"id": "5",

"lockVersion": 0,

"name": "",

"description": null,

"key": "jboss_deploy_component_script",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://${darwin.content.server.ip}/artifacts/app-

components/dukesbank/deploy_component.sh",

"overrideable": false

},

{

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 131

"propertyDefinition": {

"id": "6",

"lockVersion": 0,

"name": "",

"description": null,

"key": "db_port",

"type": "STRING",

"secure": false,

"required": true

},

"value": "${['database']['MySql']['db_port']}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "7",

"lockVersion": 0,

"name": "",

"description": null,

"key": "db_host",

"type": "STRING",

"secure": false,

"required": true

},

"value": "${['database']['host']['ip']}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "12",

"lockVersion": 0,

"name": "",

"description": null,

"key": "JBOSS_DATASOURCE_TEMPLATE",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://${darwin.content.server.ip}/artifacts/app-

components/dukesbank/jboss-ds.xml.tmpl",

"overrideable": false

},

{

"propertyDefinition": {

"id": "13",

"lockVersion": 0,

"name": "",

"description": null,

"key": "db_password",

"type": "STRING",

"secure": true,

"required": true

},

"value": "${['database']['initialize_db_script']['db_password']}",

"overrideable": false

VMware vCloud Application Director API Programming

132 VMware, Inc.

},

{

"propertyDefinition": {

"id": "16",

"lockVersion": 0,

"name": "",

"description": null,

"key": "db_user",

"type": "STRING",

"secure": false,

"required": true

},

"value": "${['database']['initialize_db_script']['db_username']}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "17",

"lockVersion": 0,

"name": "",

"description": null,

"key": "EAR_FILE",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://${darwin.content.server.ip}/artifacts/app-

components/dukesbank/dukesbank-2b.ear",

"overrideable": false

},

{

"propertyDefinition": {

"id": "21",

"lockVersion": 0,

"name": "",

"description": null,

"key": "JAR_FILE",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "http://${darwin.content.server.ip}/artifacts/app-

components/dukesbank/mysql.jdbc-5.1.6.jar",

"overrideable": false

},

{

"propertyDefinition": {

"id": "31498",

"lockVersion": 0,

"name": "",

"description": null,

"key": "APPD_SCRIPT",

"type": "CONTENT",

"secure": false,

"required": true

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 133

},

"value": "https://${darwin.server.ip}:

8443/darwin/conf/appd_functions.sh",

"overrideable": false

},

{

"propertyDefinition": {

"id": "31506",

"lockVersion": 0,

"name": "",

"description": null,

"key": "JAVA_HOME",

"type": "STRING",

"secure": false,

"required": true

},

"value": "${['self']['JBossAppServer']['JAVA_HOME']}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "111115",

"lockVersion": 0,

"name": "",

"description": null,

"key": "dukes_db",

"type": "STRING",

"secure": false,

"required": true

},

"value": "${['database']['initialize_db_script']['sample_db']}",

"overrideable": false

}

],

"scripts": []

},

{

"id": "3031",

"lockVersion": 2,

"name": null,

"description": null,

"nodeComponent": {

"id": "1003",

"lockVersion": 0,

"name": "Apache_LB",

"description": null,

"nodeComponentDetailsRef": {

"uri": "/darwin/api/2.0/node-component-details/1003",

"id": "1003",

"name": "Apache_LB"

},

"serviceRef": {

"uri": null,

"id": null,

"name": null

VMware vCloud Application Director API Programming

134 VMware, Inc.

},

"preinstalled": false,

"applicationNodeComponents": []

},

"properties": [

{

"propertyDefinition": {

"id": "27",

"lockVersion": 0,

"name": null,

"description": null,

"key": "http_node_port",

"type": "ARRAY",

"secure": false,

"required": true

},

"value": "${#util.all(\"['appserver']['JBossAppServer']

['JBOSS_PORT_NUMBER']\")}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "28",

"lockVersion": 0,

"name": null,

"description": null,

"key": "autogen_sticky_cookie",

"type": "STRING",

"secure": false,

"required": false

},

"value": "NO",

"overrideable": false

},

{

"propertyDefinition": {

"id": "29",

"lockVersion": 0,

"name": null,

"description": null,

"key": "http_proxy_port",

"type": "STRING",

"secure": false,

"required": true

},

"value": "8081",

"overrideable": false

},

{

"propertyDefinition": {

"id": "30",

"lockVersion": 0,

"name": null,

"description": null,

"key": "http_node_ips",

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 135

"type": "ARRAY",

"secure": false,

"required": true

},

"value": "${#util.all(\"['appserver']['host']['ip']\")}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "31",

"lockVersion": 0,

"name": null,

"description": null,

"key": "http_port",

"type": "STRING",

"secure": false,

"required": false

},

"value": "80",

"overrideable": false

},

{

"propertyDefinition": {

"id": "163",

"lockVersion": 0,

"name": null,

"description": null,

"key": "appsrv_routes",

"type": "ARRAY",

"secure": false,

"required": true

},

"value": "${#util.all(\"['appserver']['JBossAppServer']

['JVM_ROUTE']\")}",

"overrideable": false

},

{

"propertyDefinition": {

"id": "700",

"lockVersion": 0,

"name": null,

"description": null,

"key": "service_restart",

"type": "COMPUTED",

"secure": false,

"required": true

},

"value": "service httpd restart",

"overrideable": false

},

{

"propertyDefinition": {

"id": "701",

"lockVersion": 0,

"name": null,

VMware vCloud Application Director API Programming

136 VMware, Inc.

"description": null,

"key": "service_start",

"type": "COMPUTED",

"secure": false,

"required": false

},

"value": "service httpd start",

"overrideable": false

},

{

"propertyDefinition": {

"id": "702",

"lockVersion": 0,

"name": null,

"description": null,

"key": "service_stop",

"type": "COMPUTED",

"secure": false,

"required": false

},

"value": "service httpd stop",

"overrideable": false

},

{

"propertyDefinition": {

"id": "703",

"lockVersion": 0,

"name": null,

"description": null,

"key": "tomcat_context",

"type": "STRING",

"secure": false,

"required": false

},

"value": "",

"overrideable": false

},

{

"propertyDefinition": {

"id": "704",

"lockVersion": 0,

"name": null,

"description": null,

"key": "ajp_proxy_context",

"type": "STRING",

"secure": false,

"required": false

},

"value": "",

"overrideable": false

},

{

"propertyDefinition": {

"id": "705",

"lockVersion": 0,

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 137

"name": null,

"description": null,

"key": "config_httpd_conf",

"type": "COMPUTED",

"secure": false,

"required": false

},

"value": "/etc/httpd/conf/httpd.conf",

"overrideable": false

},

{

"propertyDefinition": {

"id": "706",

"lockVersion": 0,

"name": null,

"description": null,

"key": "config_conf_d",

"type": "COMPUTED",

"secure": false,

"required": false

},

"value": "/etc/httpd/conf.d",

"overrideable": false

},

{

"propertyDefinition": {

"id": "707",

"lockVersion": 0,

"name": null,

"description": null,

"key": "config_static_site",

"type": "COMPUTED",

"secure": false,

"required": false

},

"value": "/var/www/html",

"overrideable": false

},

{

"propertyDefinition": {

"id": "708",

"lockVersion": 0,

"name": null,

"description": null,

"key": "use_ajp",

"type": "STRING",

"secure": false,

"required": true

},

"value": "NO",

"overrideable": false

},

{

"propertyDefinition": {

"id": "902",

VMware vCloud Application Director API Programming

138 VMware, Inc.

"lockVersion": 0,

"name": null,

"description": null,

"key": "global_conf",

"type": "CONTENT",

"secure": false,

"required": true

},

"value": "https://${darwin.server.ip}:

8443/darwin/conf/darwin_global.conf",

"overrideable": false

},

{

"propertyDefinition": {

"id": "1111",

"lockVersion": 0,

"name": null,

"description": null,

"key": "httpd_dir",

"type": "STRING",

"secure": false,

"required": false

},

"value": "/etc/httpd",

"overrideable": false

},

{

"propertyDefinition": {

"id": "43000",

"lockVersion": 0,

"name": null,

"description": null,

"key": "JAVA_HOME",

"type": "STRING",

"secure": false,

"required": true

},

"value": "/opt/vmware-jre",

"overrideable": false

}

],

"scripts": []

}

],

"applicationVersionRef": {

"uri": "/darwin/api/2.0/application-version/501",

"id": "501",

"name": "Clustered Dukes Bank App v2.1.0"

},

"deploymentProfileNetworkMappings": [

{

"id": "485",

"lockVersion": 1,

"networkName": "MgmtNetwork",

"cloudNetworkExtref": {

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 139

"id": "network://vcac-default-network",

"name": "VCAC-DEFAULT-NETWORK"

},

"nodeNames": [

"load_balancer"

]

},

{

"id": "486",

"lockVersion": 1,

"networkName": "ServiceNetwork",

"cloudNetworkExtref": {

"id": "network://vcac-default-network",

"name": "VCAC-DEFAULT-NETWORK"

},

"nodeNames": [

"database",

"appserver",

"load_balancer"

]

}

],

"deploymentEnvironmentRef": {

"uri": "/darwin/api/2.0/deployment-environment/1",

"id": "1",

"name": "vCAC-6.0-DE"

}

}

}

Delete Deployment ProfileRemoves the existing deployment profile.

The user account with the ROLE_DEPLOYER deployer role or SYSTEM_ADMIN system admin role canaccess this API.

HTTP MethodDELETE

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-profile/DeploymentProfileID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-profile/1001

Response{

"errors": false,

"messageList": [

{

VMware vCloud Application Director API Programming

140 VMware, Inc.

"messageType": "INFO",

"message": "Successfully deleted Deployment Profile.",

"messageKey": "delete.msg",

"property": null

}

]

}

Chapter 13 REST APIs for Deployment Profiles

VMware, Inc. 141

VMware vCloud Application Director API Programming

142 VMware, Inc.

REST APIs for Deployment 14You can view a list of application deployments and the deployment status of an application deployment, orretrieve node details of a deployment.

Get DeploymentsRetrieves a paginated list of application deployments.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment?page=Page&page-size=PageSize

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment?page=0&page-size=1

Response{

"errors": false,

"messageList": [],

"count": 5,

"results": [

{

"id": "6",

"lockVersion": 5,

"name": "appd-Clustered Dukes Bank App-2.1.0-admin-6-b452d90c-b72e-4737-8f45-3c7540cf932c",

"description": null,

"lastUpdated": 1378856459664,

"lastUpdateUser": "SYSTEM",

"created": 1378856410279,

"createUser": "admin",

"deploymentUri": "https://192.0.2.255/api/vApp/vapp-cabdfca3-108d-4571-b900-bce6d5e98071",

"stateType": "DEPLOYMENT_ACTIVE",

"statusMessage": "Deployment Success",

VMware, Inc. 143

"lastDeploymentProfileRef": {

"uri": "/darwin/api/2.0/deployment-profile/12",

"id": "12",

"name": "DP"

},

"applicationVersionRef": {

"uri": "/darwin/api/2.0/application-version/60070",

"id": "60070",

"name": "Clustered Dukes Bank App v2.1.0"

},

"deploymentTaskCount": 1

}

]

}

}

Get Deployment DetailsRetrieves an application deployment status based on the deployment ID.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment/DeploymentID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment/5

Response{

"errors": false,

"messageList": [],

"result": {

"id": "6",

"lockVersion": 5,

"name": "appd-Clustered Dukes Bank App-2.1.0-admin-6-b452d90c-b72e-4737-8f45-3c7540cf932c",

"description": null,

"lastUpdated": 1378856459664,

"lastUpdateUser": "SYSTEM",

"created": 1378856410279,

"createUser": "admin",

"deploymentUri": " https://192.0.2.255/api/vApp/vapp-cabdfca3-108d-4571-b900-bce6d5e98071",

"stateType": "DEPLOYMENT_ACTIVE",

"statusMessage": "Deployment Success",

"lastDeploymentProfileRef": {

"uri": "/darwin/api/2.0/deployment-profile/12",

"id": "12",

"name": "DP"

VMware vCloud Application Director API Programming

144 VMware, Inc.

},

"applicationVersionRef": {

"uri": "/darwin/api/2.0/application-version/60070",

"id": "60070",

"name": "Clustered Dukes Bank App v2.1.0"

},

"deploymentTaskCount": 1

}

}

Chapter 14 REST APIs for Deployment

VMware, Inc. 145

VMware vCloud Application Director API Programming

146 VMware, Inc.

REST APIs for Scheduling aDeployment 15

You can specify the deployment profile ID and application properties to begin a deployment process.Provide a deployment ID to view a list of the available properties that you can configure for a deployment.

Get Scheduled Deployment TaskRetrieves the scheduled deployment task.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-task/DeploymentID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-task/10

Response{

"errors": false,

"messageList": [],

"result": {

"id": "10",

"lockVersion": 63,

"name": null,

"description": null,

"lastUpdated": 1378856459660,

"lastUpdateUser": "SYSTEM",

"created": 1378856410491,

"createUser": "admin",

"scheduled": 1378856408373,

"startTime": 1378856417820,

"endTime": 1378856459660,

"runId": "6",

"updateType": null,

VMware, Inc. 147

"stateType": "TASK_SUCCESS",

"taskType": "PROVISIONING_TASK",

"messages": [

"Deployment completed successfully."

],

"runStateType": "COMPLETED",

"deploymentRef": {

"uri": "/darwin/api/2.0/deployment/6",

"id": "6",

"name": "appd-Clustered Dukes Bank App-2.1.0-admin-6-b452d90c-b72e-4737-8f45-3c7540cf932c"

},

"deploymentNodes": [

{

"id": "16",

"lockVersion": 0,

"deploymentNodeInstances": [

{

"id": "16",

"lockVersion": 0,

"name": "load_balancer",

"description": null,

"lastUpdated": null,

"lastUpdateUser": null,

"created": null,

"createUser": null,

"runStateType": "VMSTARTED",

"instanceIndex": -1,

"hostname": "load-b-NINZZ3FG",

"nodeInstanceUri": " https://192.0.2.255/api/vApp/vm-8da6b54e-db75-484b-ae61-

aa0cc7b4b735",

"queueName": "appd-agent-0289911e-f67b-4ab8-9e53-f02095ff48d3",

"deprovisioned": false,

"deploymentNodeTasks": [

{

"id": "82",

"lockVersion": 10,

"name": "agent_bootstrap",

"description": null,

"lastUpdated": 1378856440642,

"lastUpdateUser": "SYSTEM",

"created": 1378856418500,

"createUser": "SYSTEM",

"componentIdentifier": "agent_bootstrap",

"nodeIdentifier": "load_balancer",

"runStateType": "COMPLETED",

"runPhaseType": "BOOTSTRAP",

"startTime": 1378856433235,

"endTime": 1378856440642,

"elapsedTime": 7407,

"inputProperties": [],

"outputProperties": [],

"logMessage": "processing input properties\nexecuting the script: […]\n",

"logDescription": "stdout and stderr log available on VM at […]"

},

[…]

VMware vCloud Application Director API Programming

148 VMware, Inc.

],

"networkConnections": [

{

"id": "18",

"lockVersion": 0,

"nicName": "NIC0",

"networkName": "ServiceNetwork",

"ipAddress": "127.0.0.1",

"ipAddressType": "ASSIGNED",

"cloudNetworkName": "NetworkRight",

"cloudNetworkUri": "

https://192.0.2.255/api/network/94978447-182e-4153-893f-9005cdc133c5 ",

"macAddress": ""

},

[…]

],

"disks": []

}

]

},

[…]

]

}

}

Get Deployment TaskRetrieves a deployment task that you can specify for a deployment when a deployment profile ID isprovided.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment/DeploymentID/deployment-task

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment/6/deployment-task

Response{

"errors": false,

"messageList": [],

"result": {

"id": "10",

"lockVersion": 63,

"name": null,

"description": null,

"lastUpdated": 1378856459660,

Chapter 15 REST APIs for Scheduling a Deployment

VMware, Inc. 149

"lastUpdateUser": "SYSTEM",

"created": 1378856410491,

"createUser": "admin",

"scheduled": 1378856408373,

"startTime": 1378856417820,

"endTime": 1378856459660,

"runId": "6",

"updateType": null,

"stateType": "TASK_SUCCESS",

"taskType": "PROVISIONING_TASK",

"messages": [

"Deployment completed successfully."

],

"runStateType": "COMPLETED",

"deploymentRef": {

"uri": "/darwin/api/2.0/deployment/6",

"id": "6",

"name": "appd-Clustered Dukes Bank App-2.1.0-admin-6-b452d90c-b72e-4737-8f45-3c7540cf932c"

},

"deploymentNodes": [

{

"id": "16",

"lockVersion": 0,

"deploymentNodeInstances": [

{

"id": "16",

"lockVersion": 0,

"name": "load_balancer",

"description": null,

"lastUpdated": null,

"lastUpdateUser": null,

"created": null,

"createUser": null,

"runStateType": "VMSTARTED",

"instanceIndex": -1,

"hostname": "load-b-NINZZ3FG",

"nodeInstanceUri": " https://192.0.2.255/api/vApp/vm-8da6b54e-db75-484b-ae61-

aa0cc7b4b735",

"queueName": "appd-agent-0289911e-f67b-4ab8-9e53-f02095ff48d3",

"deprovisioned": false,

"deploymentNodeTasks": [

{

"id": "82",

"lockVersion": 10,

"name": "agent_bootstrap",

"description": null,

"lastUpdated": 1378856440642,

"lastUpdateUser": "SYSTEM",

"created": 1378856418500,

"createUser": "SYSTEM",

"componentIdentifier": "agent_bootstrap",

"nodeIdentifier": "load_balancer",

"runStateType": "COMPLETED",

"runPhaseType": "BOOTSTRAP",

"startTime": 1378856433235,

VMware vCloud Application Director API Programming

150 VMware, Inc.

"endTime": 1378856440642,

"elapsedTime": 7407,

"inputProperties": [],

"outputProperties": [],

"logMessage": "processing input properties\nexecuting the script: […]\n",

"logDescription": "stdout and stderr log available on VM at […]"

},

[…]

],

"networkConnections": [

{

"id": "18",

"lockVersion": 0,

"nicName": "NIC0",

"networkName": "ServiceNetwork",

"ipAddress": "127.0.0.1",

"ipAddressType": "ASSIGNED",

"cloudNetworkName": "NetworkRight",

"cloudNetworkUri": "

https://192.0.2.255/api/network/94978447-182e-4153-893f-9005cdc133c5 ",

"macAddress": ""

},

[…]

],

"disks": []

}

]

},

[…]

]

}

}

Get Failed Deployment TasksRetrieves the last failed deployment tasks for a deployment when a deployment task ID is provided.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment/DeploymentID/failed-

deployment-task

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment/5/failed-deployment-task

Chapter 15 REST APIs for Scheduling a Deployment

VMware, Inc. 151

Response{

"errors": false,

"messageList": [],

"result": {

"id": "9",

"lockVersion": 43,

"name": null,

"description": null,

"lastUpdated": 1378856464867,

"lastUpdateUser": "SYSTEM",

"created": 1378855370104,

"createUser": "admin",

"scheduled": 1378855369244,

"startTime": 1378855376879,

"endTime": 1378856464867,

"runId": "5",

"updateType": null,

"stateType": "TASK_FAILED",

"taskType": "PROVISIONING_TASK",

"messages": [

"Run failed due to failure of task (load_balancer, agent_bootstrap). Agent logs are on the

node load_balancer in logs directory under /opt/vmware-appdirector/agent."

],

"runStateType": "FAILED",

"deploymentRef": {

"uri": "/darwin/api/2.0/deployment/5",

"id": "5",

"name": "appd-Clustered Dukes Bank App-2.1.0-admin-5-bc7d2134-813d-491d-908b-3ab97aa9ab39"

},

[…]

Schedule a DeploymentStarts a deployment when a deployment profile ID and required application properties are provided.Returns the deployment task ID.

The user account with the ROLE_DEPLOYER deployer role can access this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-

profile/DeploymentProfileID/action/deploy

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment-profile/2/action/deploy

VMware vCloud Application Director API Programming

152 VMware, Inc.

Request{

"node": [

{

"name": "Database",

"nodeComponent": [

{

"name": "SQL_Server_2008",

"property": [

{

"key": "INSTANCENAME",

"value": "db100"

}

]

}

]

}

]

}

Response{

"errors": false,

"messageList": [

{

"messageType": "INFO",

"message": "Deployment scheduled successfully.",

"messageKey": "deployment.scheduled.msg",

"property": null

}

],

"result": {

"id": "16",

"lockVersion": 1,

"name": null,

"description": null,

"lastUpdated": 1379024432475,

"lastUpdateUser": "admin",

"created": 1379024432472,

"createUser": "admin",

"scheduled": 1379024432336,

"startTime": null,

"endTime": null,

"runId": null,

"updateType": null,

"stateType": "TASK_SCHEDULED",

"taskType": "PROVISIONING_TASK",

"messages": [],

"runStateType": "NOT_STARTED",

"deploymentRef": {

"uri": "/darwin/api/2.0/deployment/10",

"id": "10",

Chapter 15 REST APIs for Scheduling a Deployment

VMware, Inc. 153

"name": "appd-Clustered DotShoppingCart-1.0.0-admin-10-8f551d93-1cb1-4b47-854a-

f65595177f41"

},

"deploymentNodes": []

}

}

VMware vCloud Application Director API Programming

154 VMware, Inc.

REST APIs for PublishingDeployment Profiles 16

You can publish and unpublish deployment profiles of an application to the vCloud Automation Centerservice catalog.

Publish Deployment ProfilesPublishes a deployment profile of an application to the vCloud Automation Center service catalog.

The user account with the ROLE_DEPLOYER deployer role can access this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/vcac-catalog-publish

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/vcac-catalog-publish

Request{

"name":"DUKE'S BANK DP vCAC - IT",

"description":"to ITests-vCAC-cam-appdvcac DE on cam-appdvcac CP.",

"itemId":"325",

"itemType":"DEPLOYMENT_PROFILE"

}

Response{

"errors":false,

"messageList":[

{

"messageType":"INFO",

"message":"Successfully published deployment profile 'ac' to vCAC.",

"messageKey":"csp.catalogitem.deployment_profile.publish.success.msg",

"property":null

VMware, Inc. 155

}

],

"result":{

"id":"appd-dp-325",

"name":"DUKE'S BANK DP vCAC - IT",

"description":"to ITests-vCAC-cam-appdvcac DE on cam-appdvcac CP.\n[Published: Wed Sep 11

12:48:46 PDT 2013]",

"status":"PUBLISHED",

"type":"DEPLOYMENT_PROFILE",

"catalogItemTypeId":"test.appd.csp.DEPLOYMENT_PROFILE",

"subtenantId":"2ee360e1-762e-4df9-8775-c26e3cf281d4"

}

}

Get Published Deployment Profile DetailsVerifies that the status of the deployment profile indicates Published in the vCloud Automation Centerservice catalog based on the deployment profile ID. If the deployment profile is not published, the statusindicates Not Published.

The user account with the ROLE_DEPLOYER deployer role can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/vcac-item-status/DeploymentProfileID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/vcac-item-status/325

Response{

"errors":false,

"messageList":[

],

"result":{

"id":"appd-dp-325",

"name":"ac",

"description":"ac-desc",

"status":"RETIRED",

"type":"DEPLOYMENT_PROFILE",

"catalogItemTypeId":null,

"subtenantId":null

}

}

VMware vCloud Application Director API Programming

156 VMware, Inc.

Unpublish Deployment ProfilesRemoves a published deployment profile of an application from the vCloud Automation Center servicecatalog.

The user account with the ROLE_DEPLOYER deployer role can access this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/vcac-catalog-unpublish

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/vcac-catalog-unpublish

Request{

"name":"DUKE'S BANK DP vCAC - IT",

"description":"to ITests-vCAC-cam-appdvcac DE on cam-appdvcac CP.",

"itemId":"325",

"itemType":"DEPLOYMENT_PROFILE"

}

Response{

"errors":false,

"messageList":[

{

"messageType":"INFO",

"message":"Successfully unpublished catalog item from vCAC.",

"messageKey":"csp.catalogitem.unpublish.success.msg",

"property":null

}

]

}

Chapter 16 REST APIs for Publishing Deployment Profiles

VMware, Inc. 157

VMware vCloud Application Director API Programming

158 VMware, Inc.

REST APIs for Update Profile 17You can view update profiles and update profile types of a deployed application. You can also use the APIsto create and delete update profiles, override update profile property values, schedule scale-in and scale-outupdate process, view the last failed update process, and rollback an update process.

Get Update ProfilesRetrieves a paginated list of update profiles for a deployment.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/update-profile?deployment-

id=DeploymentID&page=Page&page-size=PageSize

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/update-profile?deployment-

id=19&page=0&page-size=10

Response{

"errors": false,

"messageList": [],

"count": 2,

"results": [

{

"updateProfileRefs": [

{

"updateProfileRef": {

"id": "19",

"name": "increase8",

"uri": "/darwin/api/2.0/update-profile/19"

},

"updateType": "SCALE_OUT"

VMware, Inc. 159

},

{

"updateProfileRef": {

"id": "21",

"name": "scalein1",

"uri": "/darwin/api/2.0/update-profile/21"

},

"updateType": "SCALE_IN"

}

]

}

]

}

Get Update Profile by Update TypeRetrieves a paginated list of update profiles for a deployment and update type.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/update-profile?deployment-

id=DeploymentID&update-type=UpdateType&page=Page&page-size=PageSize

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/update-profile?deployment-id=19&update-

type=SCALE_OUT&page=0&page-size=10

Response{

"errors": false,

"messageList": [],

"count":1,

"results": [

{

"updateProfileRefs": [

{

"updateProfileRef": {

"id": "19",

"name": "increase8",

"uri": "/darwin/api/2.0/update-profile/19"

},

"update-type": "SCALE_OUT"

}

]

}

]

}

VMware vCloud Application Director API Programming

160 VMware, Inc.

Get Update Profile IDRetrieves an update profile for a deployment based on the provided update profile identification.

All of the vCloud Application Director predefined user accounts and associated roles can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/update-profile/UpdateProfileID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/update-profile/2

Response{

"errors": false,

"messageList": [],

"result": {

"id": "19",

"lockVersion": 1,

"name": "increase8",

"description": "increase8 Description",

"created": "2013-08-01T17:22:34+05:30",

"lastUpdated": "2013-08-01T17:22:34+05:30",

"lastUpdateUser": "admin",

"createUser": "admin",

"deploymentRef": {

"id": "8",

"name": "appd-Linux Smoke 01-1.0.0-admin-8-3ab14c68-5ac1-4357-b403-c04603c12b14",

"uri": "/darwin/api/2.0/deployment/8"

},

"updateType": "SCALE_OUT",

"configUpdateProperties":null,

"scaleoutPropertiesInfo": {

"clusterNode": [

{

"name": "Clustered_Producer",

"currentClusterSize": 3,

"nodeInstanceNames": [

"SpringTravel_0_",

"SpringTravel_1_",

"SpringTravel_2_"

]

}

]

}

}

}

Chapter 17 REST APIs for Update Profile

VMware, Inc. 161

Create an Update ProfileCreates an update profile based on the name provided in the request section and schedules its execution. Ifan update profile name is not provided, the designated name appears in the response section with theassociated identification. If the update profile name already exists, an error message appears.

The user account with the ROLE_DEPLOYER deployer role can access this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/update-profile

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/update-profile

Request{

"deploymentId": 2,

"updateType": "SCALE_OUT",

"name": "scaleOutTest",

"description" :

"scaleOutTest Desc",

"scaleoutProperties": {

"clusterNode": [

{

"name": "SpringTravel",

"scaleOutBy": 1

}

]

}

}

Response{

"errors": false,

"message-list": [

{

"message-type": "INFO",

"message": "Deployment update scheduled successfully.",

"message-key": "deployment.update.scheduled.msg"

}

]

"result": {

"id": "1",

"lockVersion": 0,

"name": "scaleOutTest",

"description" :"scaleOutTest Desc",

VMware vCloud Application Director API Programming

162 VMware, Inc.

"deploymentTaskRef" : {

"uri": "/darwin/api/2.0/deployment-task/76",

"id": "76",

"name": "appd-Spring Travel-1.0.0-admin-14-759a3d26-0ad5-4e58-a3d2-6f34214e3637"

}

}

}

Override an Update ProfileOverrides property values in an update profile based on the provided update profile identification andschedules its execution. The request body contains the changes to apply to the existing update profile withthe given ID.

The user account with the ROLE_DEPLOYER deployer role can access this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/update-profile/UpdateProfileID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/update-profile/2

Request{

"lockVersion": 1,

"updateType": "SCALE_OUT",

"scaleoutProperties": {

"clusterNode": [

{

"name": "SpringTravel",

"scaleOutBy": 1

}

]

}

}

Response{

"errors": false,

"message-list": [

{

"message-type": "INFO",

"message": "Deployment update scheduled successfully.",

"message-key": "deployment.update.scheduled.msg"

}

]

"result": {

Chapter 17 REST APIs for Update Profile

VMware, Inc. 163

"id": "1",

"lockVersion": 0,

"name": "scaleOutTest",

"description" :"scaleOutTest Desc",

"deploymentTaskRef": {

"uri": "/darwin/api/2.0/deployment-task/76",

"id": "76",

"name": "appd-Spring Travel-1.0.0-admin-14-759a3d26-0ad5-4e58-a3d2-6f34214e3637"

}

}

}

Update and Schedule a Scale In DeploymentSchedules an update process to scale in a deployed application based on the modified cluster size of a nodein the update profile.

The user account with the ROLE_DEPLOYER deployer role can access this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/update-profile/UpdateProfileID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/update-profile/15

Request{

"lockVersion": 1,

"updateType": "SCALE_IN",

"name": "ExternalScaleInTest1",

"description": "ExternalScaleInTest1",

"scaleinProperties": {

"clusterNode": [

{

"name": SpringTravel",

"nodeInstanceNames": [

"SpringTravel_4_",

"SpringTravel_2_"

],

"scaleInBy": 2

}

]

}

}

VMware vCloud Application Director API Programming

164 VMware, Inc.

Response{

"errors": false,

"message-list": [

{

"message-type": "INFO",

"message": "Deployment update scheduled successfully.",

"message-key": "deployment.update.scheduled.msg"

}

]

"result": {

"id": "15",

"lockVersion": 1,

"name": "ExternalScaleInTest1",

"description": "ExternalScaleInTest1 description",

"deploymentTaskRef":

{

"uri": "/darwin/api/2.0/deployment-task/76",

"id": "76",

"name": "appd-Spring Travel-1.0.0-admin-14-759a3d26-0ad5-4e58-a3d2-6f34214e3637"

}

}

}

Delete an Update ProfileDeletes an update profile based on the provided identification.

The user account with the ROLE_DEPLOYER deployer role can access this API.

HTTP MethodDELETE

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/update-profile/UpdateProfileID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/update-profile/2

Response{

"errors": false,

"message-list": [

{

"message-type": "INFO",

"message": "Successfully deleted UpdateProfile.",

Chapter 17 REST APIs for Update Profile

VMware, Inc. 165

"message-key": "delete.msg"

}

]

}

Get Last Failed Update ProcessRetrieves the last failed update process.

The user account with the ROLE_DEPLOYER deployer role can access this API.

HTTP MethodGET

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment/DeploymentID/failed-

deployment-task

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment/1/failed-deployment-task

ResponseIf a last failed deployment task is not available, the following response appears.

{

"errors": false,

"messageList": [

{

"messageType": "INFO",

"message": "No latest failed update deployment found.",

"messageKey":

"valid.failed.updateProfile.deployment.not.found",

}

],

"result": null

}

Rollback a Last Update ProcessPerforms a rollback on a failed or last successful update process based on the provided deploymentidentification.

The user account with the ROLE_DEPLOYER deployer role can access this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/update-profile/

You must type the URI syntax because the copy and paste operation removes formatting from the text.

VMware vCloud Application Director API Programming

166 VMware, Inc.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/update-profile

Request{

"deployment-id": 2,

"operation": "ROLLBACK"

}

Response{

"errors": false,

"message-list": [

{

"message-type": "INFO",

"message": "Deployment rollback scheduled successfully.",

"message-key": "deployment.rollback.scheduled.msg"

}

],

"result": {

"deployment-task-ref": {

"@type": "Reference",

"id": "8",

"uri": "/darwin/api/2.0/deployment-task/8"

}

}

}

Chapter 17 REST APIs for Update Profile

VMware, Inc. 167

VMware vCloud Application Director API Programming

168 VMware, Inc.

REST APIs for ManagingDeployments 18

You can tear down the associated virtual machines from the cloud environment. Delete the record of adeployment from vCloud Application Director.

Tear Down DeploymentRemoves provisioning for the vCloud Director vApp and associated virtual machines, vCloud AutomationCenter virtual machine and the associated virtual machine in vCenter Server , or Amazon EC2 instances anddeletes them from the cloud environment. Provides task ID after the teardown process is complete.

The user account with the ROLE_DEPLOYER deployer role can access this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment/DeploymentID/teardown

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment/6/teardown

RequestThe request body does not contain input for the teardown process.

Response{

"errors": false,

"messageList": [

{

"messageType": "INFO",

"message": "Deployment teardown scheduled successfully.",

"messageKey": "deployment.teardown.scheduled.msg",

"property": null

}

],

"result": {

VMware, Inc. 169

"id": "11",

"lockVersion": 1,

"name": null,

"description": null,

"lastUpdated": 1378935530429,

"lastUpdateUser": "admin",

"created": 1378935530425,

"createUser": "admin",

"scheduled": 1378935530036,

"startTime": null,

"endTime": null,

"runId": null,

"updateType": null,

"stateType": "TASK_SCHEDULED",

"taskType": "TEARDOWN_TASK",

"messages": [],

"runStateType": null,

"deploymentRef": {

"uri": "/darwin/api/2.0/deployment/6",

"id": "6",

"name": "appd-Clustered Dukes Bank App-2.1.0-admin-6-b452d90c-b72e-4737-8f45-3c7540cf932c"

},

"deploymentNodes": []

}

}

Delete DeploymentDeletes the details of a particular deployment from vCloud Application Director.

The user account with the ROLE_DEPLOYER deployer role can access this API.

HTTP MethodDELETE

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment/DeploymentID

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/2.0/deployment/5

Response{

"errors": false,

"messageList": [

{

"messageType": "INFO",

"message": "Successfully deleted Deployment.",

"messageKey": "delete.msg",

VMware vCloud Application Director API Programming

170 VMware, Inc.

"property": null

}

]

}

Chapter 18 REST APIs for Managing Deployments

VMware, Inc. 171

VMware vCloud Application Director API Programming

172 VMware, Inc.

REST APIs to Export and ImportApplication Packages 19

Export an application, service, or task package to import to a different vCloud Application Directorappliance.

You can also export a package using the vCloud Application Director CLI. See the UsingvCloud Application Director guide.

Packages that you export using CLI are encoded in the plain text package file and cannot be imported usingREST APIs. To import these packages using REST APIs, use an external tool to convert the plain textpackage file to a Base64 encoded package.

To import packages using REST APIs that were previously exported with the CLI, use an external tool toconvert the plain text package file to a Base64 encoded package.

Export an Application, Service, or Task VersionExports a list of APPLICATION_VERSION, SERVICE_VERSION, or SCRIPT_TASK_VERSION information to import toanother vCloud Application Director appliance. The output is Base64 encoded.

The user account with the ROLE_APP_ARCHITECT application architect role andROLE_CATALOG_ADMIN catalog administrator role can access this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/1.0/action/export

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/1.0/action/export

VMware, Inc. 173

RequestTable 19‑1. Description for Request Message

Request Message Description

stripSecuredProperties Specifies whether to remove the secure properties.

exportRequestParameter Specifies the object to export.

exportRequestParameter.type Specifies the types of available export parameters. The valid exportparameters are, APPLICATION_VERSION, SERVICE_VERSION, andSCRIPT_TASK_VERSION.

{

"stripSecuredProperties":true,

"exportRequestParameter":[

{

"name":"dukesbank",

"major":1,

"minor":0,

"micro":0,

"qualifier":"",

"type":"APPLICATION_VERSION"

}

]

}

ResponseTable 19‑2. Description for Response Messages

Response Message Description

result Shows the Base64 encoded object xml.

{

"errors":false,

"messageList":[

],

"result":"UEQ5NGJXd2dkbVZ5YzJsdm...."

}

Import an Application, Service, or Task VersionImports a package that includes APPLICATION_VERSION, SERVICE_VERSION, or SCRIPT_TASK_VERSION, previouslyexported from a different vCloud Application Director appliance. The input must be Base64 encoded.

The user account with the ROLE_APP_ARCHITECT application architect role andROLE_CATALOG_ADMIN catalog administrator role can access this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/1.0/action/import

VMware vCloud Application Director API Programming

174 VMware, Inc.

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/1.0/action/import

RequestTable 19‑3. Description for Request Message

Request Message Description

exportPackage Indicates the Base64 encoded object xml.

conflictResolutionAction Indicates the options for importing the object. The valid import options are,CHECK, SKIP, OVERWRITE, and IMPORTASNEW.NOTE If you use the OVERWRITE option, all of the related services and logicaltemplates are ovewritten. This option also affects other applications that usethose services and logical templates.

importAsNewSuffix Indicates the suffix to add to the object name. Adding a suffix to the objectwhen importing avoids conflict in the repository.

{

"exportPackage":"UEQ5NGJXd2dkbVZ5YzJsdm....",

"conflictResolutionAction":"IMPORTASNEW",

"importAsNewSuffix":"John-test"

}

Response{

"errors":false,

"messageList":[

{

"messageType":"INFO",

"message":"Application saved successfully.",

"messageKey":null,

"property":null

},

{

"messageType":"INFO",

"message":"CentOS56 64bit_John-test:1.0.0",

"messageKey":"VM_TEMPLATE_VERSION_CREATED",

"property":null

},

{

"messageType":"INFO",

"message":"CentOS64_John-test:5.6.0",

"messageKey":"OS_VERSION_CREATED",

"property":null

},

{

"messageType":"INFO",

"message":"Logical VM template saved successfully.",

"messageKey":null,

"property":null

},

{

Chapter 19 REST APIs to Export and Import Application Packages

VMware, Inc. 175

"messageType":"INFO",

"message":"OS Templates_John-test-SERVER_TYPE",

"messageKey":"META_TAG_CREATED",

"property":null

},

{

"messageType":"INFO",

"message":"Tag saved successfully",

"messageKey":null,

"property":null

},

{

"messageType":"INFO",

"message":"operatingSystem.save.msg",

"messageKey":null,

"property":null

},

{

"messageType":"INFO",

"message":"John_John-test:1.0.0",

"messageKey":"APPLICATION_VERSION_CREATED",

"property":null

},

{

"messageType":"INFO",

"message":"Import succeeded.",

"messageKey":"IMPORT_SUCCESS",

"property":null

}

]

}

VMware vCloud Application Director API Programming

176 VMware, Inc.

REST API for NotificationRegistration 20

A notification is a message that is sent from the vCloud Application Director server when an applicationdeployment, update, or teardown process is scheduled, started, and finished. The message contains detailsabout the deployment type, what triggered the deployment, the deployment start time, the deployment endtime, and the deployment status.

With a notification, you can monitor the vCloud Application Director deployment task events andcustomize a task when an event begins. For example, you can send a message to notify a deployer that theapplication deployment task is complete.

You can also use a notification to create a monitoring system to monitor and report the deployment status.

Notification RegistrationReceives notifications from the vCloud Application Director server. The notification registration includesthe following processes.

n Sends a Base64 encoded public key to the server. This process causes the server to allocate the use of apublic key to create a signed certification. The server also allocates a queue on the RabbitMQ server.The response output contains two Base64 encoded X.509 certificates and RabbitMQ connectioninformation.

n Uses the client certificate as the client certificate for RabbitMQ communication.

n Uses the root certificate as the authorized root for RabbitMQ communication.

The user account with the SYSTEM_INTEGRATOR system integrator role can access this API.

HTTP MethodPOST

URI Syntaxhttps://ApplicationDirectorServerIP:8443/darwin/api/1.0/notifications/register

You must type the URI syntax because the copy and paste operation removes formatting from the text.

Example URI syntax:

https://ApplicationDirectorServerIP:8443/darwin/api/1.0/notifications/register

VMware, Inc. 177

RequestTable 20‑1. Description for Request Message

Request Message Description

clientPublicKey Specifies the Base64 encoded public key to register queue.

{"clientPublicKey" :"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv8Mv3MiXRNxImFntlmd1Qki0fREcf1As

UV95fwUt8NH8Ke

+hi2TqbLU8hhHD6tP0fTEhSs7yBha03148S6WrskAhzqD3SW7HaBpW01Dpg5oB/eIfVU2nmFY7s6D3DJ9s20YcjCcyP

+ojXGGRYffsqNDjO03o4/YXWq6n8ad5hfLmveApRs4TGil8jwn7EuH7brtSb5fMyPHpmeYQp

+clqPLmKOC0S0EO/fhoSHmVafhS23cv521b8SkeU8WVHXI8n0FwPZUJGG+PKxFAcf/8wZOV7XHKIhiiV++/CB79jC/+J1Cd

+yRt4Er25QnCF+PnLk13/0bd95vdPOYNZNhGuwIDAQAB"}

ResponseTable 20‑2. Description for Response Messages

Response Message Description

amqpUsername Shows the user login for RabbitMq.

amqpPassword Shows the password for RabbitMq.

amqpQueuename Shows the queue name. After disconnecting from the RabbitMq server, thisqueue is deleted and a queue is created for a new call.

amqpHostname Shows the RabbitMq server IP or host name.

clientCert Shows the certificate that is created based on the public key sent with theREST API call.

rootCert Shows the certificate that is created based on the RabbitMq server key.

{

"errors":false,

"messageList":[

],

"amqpUsername":"appd_notifier",

"amqpPassword":"darwin",

"amqpQueuename":"appd.notification-b9507143-0fe9-42f5-b16d-a798afa01827",

"amqpHostname":"192.0.2.255",

"amqpPort":5671,

"clientCert":"TUlJRGhUQ0NBbTJnQXdJQkFnSUdBVG15cEp6ZU1BMEdDU3FHU0liM0RRRUJCUVVBTUZJeElEQWVCZ05W

QkFNTUYwRndjR3hwWTJGMGFXOXVJRVJwY21WamR

HOXlJRU5CTVIwd0d3WURWUVFMREJSQmNIQnNhV05oZEdsdmJpQkVhWEpsWTNSdmNqRVBNQTBHQTFVRUNnd0dWazEzWVhKbE1C

NFhEVEV5TURreE1UQXdNRFExTmxvWERUTXlNRGt

3TmpBd01EUTFObG93Y1RFL01EMEdBMVVFQXd3MllYQndaQzV1YjNScFptbGpZWFJwYjI0dFlqazFNRGN4TkRNdE1HWmxPUzAw

TW1ZMUxXSXhObVF0WVRjNU9HRm1ZVEF4T0RJM01

SMHdHd1lEVlFRTERCUkJjSEJzYVdOaGRHbHZiaUJFYVhKbFkzUnZjakVQTUEwR0ExVUVDZ3dHVmsxM1lYSmxNSUlCSWpBTkJn

a3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0t

DQVFFQXY4TXYzTWlYUk54SW1GbnRsbWQxUWtpMGZSRWNmMUFzVVY5NWZ3VXQ4Tkg4S2UraGkyVHFiTFU4aGhIRDZ0UDBmVEVo

U3M3eUJoYTAzMTQ4UzZXcnNrQWh6cUQzU1c3SGF

CcFcwMURwZzVvQi9lSWZWVTJubUZZN3M2RDNESjlzMjBZY2pDY3lQK29qWEdHUllmZnNxTkRqTzAzbzQvWVhXcTZuOGFkNWhm

TG12ZUFwUnM0VEdpbDhqd243RXVIN2JydFNiNWZ

NeVBIcG1lWVFwK2NscVBMbUtPQzBTMEVPL2Zob1NIbVZhZmhTMjNjdjUyMWI4U2tlVThXVkhYSThuMEZ3UFpVSkdHK1BLeEZB

Y2YvOHdaT1Y3WEhLSWhpaVYrKy9DQjc5akMvK0o

xQ2QreVJ0NEVyMjVRbkNGK1BuTGsxMy8wYmQ5NXZkUE9ZTlpOaEd1d0lEQVFBQm8wSXdRREFkQmdOVkhRNEVGZ1FVelVPT0ZL

VMware vCloud Application Director API Programming

178 VMware, Inc.

Z2h4WkE2NWJ2aUtCcnJOdmpmdG0wd0h3WURWUjB

qQkJnd0ZvQVVXSE9ubEl0TWQ2bEc2REIrcUR2SzRkclk0a0V3RFFZSktvWklodmNOQVFFRkJRQURnZ0VCQUJrMlJiZFJiNWU1

SUFVTlNBc0M4UWZ3aVVkNW9yN3BuQ0k1c1piSlk

4REpBRXlYVTB2WlpjNWFDQTRpUG1icGY3U2svd09SblhYT3I4Q0dxN1ZTRUM1Ky8yZ2d1R09lSlNmMFJmV2dEcTNPTytYRURR

WXZzeUlYR1FhQVBsL2ZBYW42aEFyWDJZYS9jeWl

kZUZNYW5vZHJ2SHRYOS9tdktXTEpLTEdLZDFGUVdORFdEQWhpbElwL3F5eDJXOU8vS3kvekFLdTA3djMvTDNySEU4dkE0VlBs

QmI3ZVIwSHBPUXJIR05SVk5xWUVvRlNSSWM5YVQ

yY3hiRVdYaU1PbTE0SmZJaXgvVGZoek84Kyt4WXJhTEN5NGhjRU9WSTN5VXVRU0lFRnA0Zm5uMWFQZHBFWXlJR1NHdWxOTXlD

ek9IdEtHdnhUdW1hSS9YelV0dGRJWXdWQT0=",

"rootCert":"TUlJRFZqQ0NBajZnQXdJQkFnSUdBVFRFNWc5M01BMEdDU3FHU0liM0RRRUJCUVVBTUZJeElEQWVCZ05WQk

FNTUYwRndjR3hwWTJGMGFXOXVJRVJwY21WamRHO

XlJRU5CTVIwd0d3WURWUVFMREJSQmNIQnNhV05oZEdsdmJpQkVhWEpsWTNSdmNqRVBNQTBHQTFVRUNnd0dWazEzWVhKbE1CNF

hEVEV5TURFd09USXpOVFV6T0ZvWERUTXlNREV3T

kRJek5UVXpPRm93VWpFZ01CNEdBMVVFQXd3WFFYQndiR2xqWVhScGIyNGdSR2x5WldOMGIzSWdRMEV4SFRBYkJnTlZCQXNNRk

VGd2NHeHBZMkYwYVc5dUlFUnBjbVZqZEc5eU1RO

HdEUVlEVlFRS0RBWldUWGRoY21Vd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUJEd0F3Z2dFS0FvSUJBUUNqYk00MXVFWG

Vta3ArMEcvbmVPQjdMd2F3dTJDUEZYdjBVSzdnO

XJyREJjVEI1K2ZZQVdDdzJ6VTdIUHBJZGpjSXJoaFRtN3c3OUJhRklnaFlMblhhdWs2SU5WRTRCZ3hEOUw1VXN3UEYvMzlSa2

h3Q1lQakkvdlNJMzc1RU54bm55QmRXOGhITUxaT

GZQWmlkbHhGZXRLSUlCNWN3ODdTMUUrQk5aeWpHWVhJMWhweW10K0hmamZld0FEdE1mTzRMNFZiMVlpTzIwT1E4NkN6dVlmQl

FSR2lYVVhWeEdYQlFxV0lXRlZwYTFaY29rcmZOd

UZlSGlSMDdjQkplUnQyZDYzTUhKTmFrTEo2Q3NzZGt2ZmxhWllKN1pVbjFWS05wYXA0SXVlK2tTakFEaFRvYVpPN202dGVJRj

YzVUo3U0lqUXFIT2VyLzRHb0laR2grc2Q2cEFnT

UJBQUdqTWpBd01CMEdBMVVkRGdRV0JCUlljNmVVaTB4M3FVYm9NSDZvTzhyaDJ0amlRVEFQQmdOVkhSTUJBZjhFQlRBREFRSC

9NQTBHQ1NxR1NJYjNEUUVCQlFVQUE0SUJBUUJ3W

GxMTi92a0VnbDEwa3I0VzMwSlJ6Zk5NYm9WVDNiQUNDZE4vb2o0cWFBcGlKamlpcmVWK0xYb25QQmZFSWFLSVQrVVY3eFRHUT

duVkk5aXJ4VzdNbEZ2cHk3anlDWm1xN2xNRVI4T

TEwOUpmV3lDM3Mrb3VxVmFVMy93VGRQZmNWUTAzTDdkdWd3Q0g4QnYvSmtDZmx6a081WFRtTHFDMlpEalZFVWZESDZwMmp4MC

t0dVNMbXphOTRLMll6U053M1FaMlZtYXJER2VSa

1dxYmp5NGNkVXNuMjlyQi9IeEVRMUlFakRnY2hSVENreDArSjhNYXoyQUdlNXRYMTk5bHhRd1NTYXhGU2NIUmhEYkwyVXRadE

h4aXFEZi9LUlY1ZnJRMmxGRE5JUUhwQ09hbVNzb

VFoMElUc25yaGVsbVBIbjcwUzFUVHhsTmhsNEw2SzA3Tg=="

}

Chapter 20 REST API for Notification Registration

VMware, Inc. 179

VMware vCloud Application Director API Programming

180 VMware, Inc.

Index

AAPI

add logical template mapping 45create deployment environment 67create deployment profile 79create logical template version details 45create update profile 159create cloud provider 27delete certificate details 13delete deployment 169delete deployment environment 67delete deployment profile 79delete logical template version 45delete update profile 159delete cloud provider 27export an application package 173find cloud template 37find logical template version 45find preinstalled services 45get application by ID 17get application version 17get applications 17get certificate details 13get certificates 13get cloud network 67get cloud storage 67get deployment details 143get deployment environment property

values 67get deployment node information 143get deployment task ID 147get deployments 143get deployments across groups 143get failed deployment task 147get failed update process 159get group details 9get groups 9get logical template version mapping 45get mapped cloud templates 45get node component details 23get published deployment profile details 155get registered cloud templates 37get rollback update process 159get service version details 59

get tags 65get update profile type 159get cloud provider types 27get deployment environment 27get application blueprints 23get cloud providers 27get cloud template category 37get deployment environments 67get deployment profile ID 79get logical template 45get operating system 63get scheduled deployment task 147get service versions 59get update profiles 159import certificate 13import an application package 173notification registration 177override update profile 159publish deployment profile 155register cloud template 37replace cloud template 37replace logical template mapping 45schedule a deployment 147schedule scale in 159tear down deployment 169test cloud provider connection 27unpublish deployment profile 155update deployment profile 79

automateapplication deployment 7update deployment 7

Llicensing 7

RREST APIs 7

VMware, Inc. 181

VMware vCloud Application Director API Programming

182 VMware, Inc.