You can view cloud provider and associated deployment environment information. You can also use the APIs to create and delete cloud providers.

Get Cloud Providers

Retrieves a paginated list of the cloud providers from the cloud environment.

All of the Application Services roles can access this API.

HTTP Method

GET

URI Syntax

https://ApplicationServicesServerIP: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://ApplicationServicesServerIP: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",
        "id": "1",
        "name": "vCloud 5.1.2"
      },
      "host": "vcloud.test.com",
      "proxyUrl": "",
      "credential": {
        "id": "2",
        "lockVersion": 2,
        "userName": "appserv-qe",
        "passKey": "19QlBRwamVEmN0yLxN6AqUErxMDQtyqQTuOlGect42bqVZeqMcw5jW9Y707onwG/",
        "encrypted": true,
        "type": "PASSWORD"
      },
      "properties": [
        {
          "propertyDefinition": {
            "id": "1023",
            "lockVersion": 0,
            "name": "Organization",
            "description": "vCloud 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 Types

Retrieves a list of the cloud provider type and associated deployment environment information from the cloud environment to create cloud providers.

All of the Application Services roles can access this API.

HTTP Method

GET

URI Syntax

https://ApplicationServicesServerIP: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://ApplicationServicesServerIP:8443/darwin/api/2.0/cloud-provider-type

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 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 ID

Retrieves a cloud provider type and associated deployment environment information from the cloud environment to create cloud providers based on the provided ID.

All of the Application Services roles can access this API.

HTTP Method

GET

URI Syntax

https://ApplicationServicesServerIP: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://ApplicationServicesServerIP: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 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 Details

Retrieves all of the cloud provider information from the cloud environment.

All of the Application Services roles can access this API.

HTTP Method

GET

URI Syntax

https://ApplicationServicesServerIP: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://ApplicationServicesServerIP: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 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 Provider

Creates a cloud provider in the cloud environment.

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

Log in to Application Services as an application cloud administrator.

HTTP Method

POST

URI Syntax

https://ApplicationServicesServerIP: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://ApplicationServicesServerIP: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": "appservices-qe",
        "passKey": "password",
        "encrypted": false,
        "type": "PASSWORD"
    },
    "properties": [
        {
            "propertyDefinition": {
                "id": "1023",
                "lockVersion": 0,
                "name": "Organization",
                "description": "vCloud Organization",
                "key": "organization",
                "type": "STRING",
                "secure": false,
                "required": false
            },
            "value": "QE",
            "overrideable": false
        }
    ],
    "groupMembership": {
        "id": "",
        "lockVersion": 0,
        "ownerGroupRef": {
            "uri": null,
            "id": "4",
            "name": "Development"
        },
        "global": false
    }
}

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 Organization",
          "key": "organization",
          "type": "STRING",
          "secure": false,
          "required": false
        },
        "value": "QE",
        "overrideable": false
      }
    ],
    "deploymentEnvironmentListRef": {
      "uri": "/darwin/api/2.0/cloud-provider/5/deployment-environment"
    }
  }
}

Test Cloud Provider Connection

Verifies that the cloud provider is connected to vCloud Automation Center Application Services.

Log in to Application Services as an application cloud administrator.

HTTP Method

POST

URI Syntax

https://ApplicationServicesServerIP: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://ApplicationServicesServerIP: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": 
"tony@coke.vmware.com", "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",
            "property": null
        }
    ]
}

Delete Cloud Provider

Uses identification to delete the cloud provider from vCloud Automation Center Application Services.

Log in to Application Services as an application cloud administrator.

HTTP Method

DELETE

URI Syntax

https://ApplicationServicesServerIP: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://ApplicationServicesServerIP: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 Environment

Uses identification to retrieve the associated deployment environments of the cloud provider from the cloud environment.

All of the Application Services roles can access this API.

HTTP Method

GET

URI Syntax

https://ApplicationServicesServerIP: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.

Example URI syntax:

https://ApplicationServicesServerIP: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
        }
      ]
    }
  ]
}