Develop > API calls > Application design APIs > Import a new application design

Import a new application design

Import a new application design if it does not exist. If the design exists, no error is displayed and the original design is returned.

URI Method Parameters Returns
http://[host]:[port]/csa/api/codar/app-design/importNew POST JSON

201 - successful
400 - bad request
401 - authorization failed
500 - internal server error

Example

The following URL was sent:

https://localhost:8444/csa/api/codar/app-design/importNew

The following JSON was sent:

{
  "@type" : "urn:x-hp:2013:software:cloud:topology_model:topology",
  "groupId" : "com.hp.csa",
  "artifactId" : "3eb835ae-750f-41c9-8861-de70a285ca43",
  "version" : "1.0.1",
  "displayName" : "Test_Design-2",
  "description" : "my design 02",
      ... (The remaining output is the same as Import an application design example.)
}

The following JSON was returned:

{
  "@self" : "/csa/api/topology-model/topology/e57673db-0ee7-4061-8f9e-ffdcabc07b4c",
  "@type" : "urn:x-hp:2013:software:cloud:topology_model:topology",
  "groupId" : "com.hp.csa",
  "artifactId" : "3eb835ae-750f-41c9-8861-de70a285ca40",
  "version" : "1.0.1",
  "displayName" : "Test_Design-1",
  "description" : "my design",
     ... (The remaining output is the same as Import an application design example)
}

Note: If you have a Scaling Group component in the design, you must change the ID and remove "@self" attribute as shown in the following example:

"id" : "0c66986b-a62f-4a99-ba1a-1c05e39b4295", ! Modify the ID
"name" : "SG",
"component" : {
  "@self" : "/csa/api/topology-model/component-type/283f9da2-44c7-4208-bcdd-67f9fdddc02e", ! Remove this line
  "groupId" : "com.hp.csa.type.scalingGroup",
  "artifactId" : "ScalingGroupType_0c66986b-a62f-4a99-ba1a-1c05e39b4295", ! Modify the ID
  "version" : "1"
},