Develop > API calls > Container APIs > Create a container

Create a container

Creates a container.

URI Method Parameters Returns
http://[host]:[port]/csa/api/container/ POST body - JSON representation of an artifact container

200 - successful
400 - bad values in Container ID parameter
401 - not authorized
404 - the container does not exist

Example

The following is sample input for creating an artifact container:

{ "name": "Sample Container", "description": "Sample Container Description", "icon": "/csa/api/blobstore/Arrow_02_48.png?tag=library", "tags": [ { "@self": "/csa/api/tag/8a81848d4d6cd612014d6fdee47f0036" } ], "container_type": "topology_artifact_container" }

 

The following JSON was returned:

{
  "@self": "/csa/api/container/8a81848d4d6cd612014d7044313d00c1",
  "@type": "urn:x-hp:2012:software:cloud:data_model:metamodel",
  "global_id": "8a81848d4d6cd612014d7044313d00c1",
  "name": "Sample Container",
  "description": "Sample Container Description",
  "icon": "/csa/api/blobstore/Arrow_02_48.png?tag=library",
  "ext": {
   "csa_name_key": "fb1e1294-6e5b-4323-a0cc-7414234c10a1",
   "csa_critical_system_object": false,
   "csa_artifact_container_type": "TOPOLOGY_DESIGN_BASED"
},
"container_type": "TOPOLOGY_ARTIFACT_CONTAINER",
"tags": [
     {
    "@self": "/csa/api/tag/8a81848d4d6cd612014d6fdee47f0036",
   "@type": "urn:x-hp:2012:software:cloud:data_model:tag",
   "name": null,
   "description": null,
   "icon": null,
   "color": null,
   "scopes": null
  }
]
}

}