OS1 Services
...
Container
Integrate with Containers

How to: Change the Container state

3min


Before you can containerize a child Container, must set the parent and child containers to the appropriate lifecycle state. For more information about Lifecycle States, see the 'Lifecycle of a Container' in Container.

The parent Container must be in the opened state, and the child container must be in the closed state.

By default, the state of a new Container is created. To set a Container to opened, you must specify an event code of E-025 and a reason code of R-0001 in the request body.

To set the parent container to opened, call the Apply Event on Container endpoint and pass a request body similar to the following:

JSON


The response body will look similar to the following:

JSON


App ID is required and should be set to the Client ID of your App. For information about registering an App and retrieving the Client ID, see the "Register an App" section of Getting started with building Apps.

A leaf container must be in the closed state to be containerized. States are sequential. A new Container is in the created state, you must set the Container to opened and then to closed.

To set the child box Container to opened, call the Apply Event on Container endpoint and pass a request body similar to the following:

JSON


To set the child box Container to closed, call the Apply Event on Container endpoint and pass a request body that specifies an event code of E-026:

JSON