OS1 Services
...
Container
Integrate with Containers
How to: Create a Container type
4min
for information about prerequisites, see integrate with containers docid\ v8jhivhg c9txkmpqsbxu containers have two modes leaf and non leaf leaf containers cannot contain other containers non leaf containers can contain other containers to add a container type, call the create container type endpoint in the response body, the required member elements are parameter description remarks name a unique name that represents the container type container type names consist of upper and lower case alpha characters the minimum length is 3 characters and the maximum length is 64 characters you use the isleaf member to specify that the container can contain other containers the isleaf member is not required when creating a container type if it is omitted, the default value of false is used during the creation, and the containers created using the type cannot contain other containers the container api is asynchronous and event driven when creating a container type, we recommend that you specify a callback url on which you can receive a notification of the success of the creation of the container type and notifications of the success of operations performed on containers based on the type to create a leaf container, you must include the isleaf member and set it to true for illustration purposes, this how to uses the example of a pallet and a box 📘 once created, container types cannot be deleted keep this in mind when you are creating container types for the purpose of testing to create a non leaf container, call the create container type and pass a request body similar to the following { "name" "pallet", "isleaf" false, "callback" { "url" "https //www examplecallback com", "meta" { "string" "string" } } } the response body will be similar to the following and returns the container type id as id in the data object { "data" { "id" "pallet" }, "request" { "uri" "/core/api/v2/containers/container types", "method" "post", "querystring" "{}", "body" { "name" "pallet", "isleaf" false, "callback" { "url" "https //www examplecallback com", "meta" { "string" "string" } } } } } to create a leaf container, call the create container type endpoint and pass a request body similar to the following { "name" "pallet1", "isleaf" true } the response body will be similar to the following and returns the container type id as id in the data object { "data" { "id" "pallet1" }, "request" { "uri" "/core/api/v2/containers/container types", "method" "post", "querystring" "{}", "body" { "name" "pallet`", "isleaf" true } } }