OS1 Services
...
Container
Integrate with Containers

How to: Create a Container

3min


To create a Container, you call the Create Container endpoint and pass a Container Type as a path parameter in the endpoint call. Create Container does not have any required parameters in the request body, meaning that you can create a Container and update its Attributes later by calling the Update Container endpoint.

For the purpose of this how-to and containerization example, we show how to create a pallet that a is non-leaf container, which can contain other containers, and a leaf container that can be containerized.

To create the non-leaf pallet Container, call the Create Container endpoint and pass a Container Type as a path parameter. For this example, we used the Container ID shown in the How to: Create a Container Type topic, container:9b83fc9f-decd-4a8d-a6d1-2b496df0a1a5.

Your request body should be similar to the following:

JSON


The response will look similar to the following and returns the Container ID as id in the data object:

JSON


Leaf containers can be containerized or noncontainerizable. To create Containerizable containers, you must specify the isContainerizable attribute in the response body and set it to true.

To create the leaf box Container, call the Create Container endpoint and pass a Container Type as a path parameter. For this example, we used the Container ID shown in the How to: Create a Container Type topic, container:582d435d-5af1-4442-a095-e9b729ff4020.

Your request body should look similar to the following:

JSON


The response will look similar to the following and returns the Container ID as id in the data object:

JSON