Develop > API calls > Package APIs > Create package with properties

Create package with properties

Create a new package for the given application design with properties. The package is only created if the Codar license is present and the design is associated to the Release Pipeline. Only the required and modifiable properties of the components in the application can be parameterized in the package.

URI Method Parameters Returns
http://[host]:[port]/csa/api/codar/app-package/createWithProperties POST JSON body

200 - successful
400 - bad request
401 - not authorized
500 - internal server error

Example

The following URL was sent:

https://localhost:8444/csa/api/codar/app-package/createWithProperties

The following JSON was sent:

{
    "designId":"02e8c0cc-1dd9-43c7-941e-1252b6619cee",
"continuousPromote":false

  "packageName":"Package1",
  "packageDescription":"description",
  "members": [
      {
        "icon": "pluginResources/topology/icons/SERVER.svg",
        "@self": "/csa/api/package/component/VcenterServerType__VERSION__04.20.0000__GROUPID__com.hp.csa.type0001",
        "description": "vCenter Server",
        "@type": "urn:x-hp:2012:software:cloud:data_model:package",
        "name": "vCenter Server",
        "provider": "VMWARE_VCENTER",
        "displayName": "vCenter Server",
        "properties" : [
          {
           "name" : "vmTemplateReference",
           "value" : "UbuntuTemp"
          },
           {
            "name" : "vmNamePrefix",
            "value" : "Test"
            }
            ]
            },
              "displayName": "vCenter Server"
    ]
}

The following JSON was returned:

{
packageId": "bc384c91-6345-4fe1-886f-e3c973280d09"
}