Update state machine configuration of container type

This API is for updating the current state-machine configuration (states, sub-states, and state transition rules) of a container type specified by the containerTypeId.

  • Events - Represents array of Events. An event contains event name, event data,if any.
    • Event Name - Represents name of the event for state transition.
    • Event data - data expected with the event and validation, if any, for the event data.
  • States List of main states with its substates and transitions.

Important: The state machine cannot be partially updated. Moreover, for each non-terminal sub-state, at least one state transition rule is expected.
| PARAMETER | DESCRIPTION | TYPE | VALIDATION |
| ---- | ---- | ----- | ---- |
| events | Represents an array of Events. An event contains event name, event data, if any. |
| ㅤ↳event
| Represents name of the event for state transition. | string | Example: createdToOpened |
| ㅤ↳eventType | Specifies event is transitional or not.
TRANSITIONAL- Transitonal event is an event that upon invocation it will change the state of the container.
NON_TRANSITIONAL- Transitonal event is an event that upon invocation it will not change the state of the container. | string | default: TRANSITIONAL
Enum: [ TRANSITIONAL, NON_TRANSITIONAL ] |
| ㅤ↳eventData | Data expected with the event and validation, if any, for the event data. |
| ㅤㅤ↳name | Name of validation keys of an event. | string | minLength: 1 maxLength: 32 |
| ㅤㅤ↳type | Event data type | string | Enum: [string, number, boolean, object, array] |
| ㅤㅤ↳validation | Validation rules for a string or number value. |
| ㅤㅤㅤ↳range | Field to specify the range that the attribute value must lie. In case of "string" data type, range will be the length of string value. |
| ㅤㅤㅤㅤ↳min | The min value, inclusive. | number |
| ㅤㅤㅤㅤ↳max | The max value, inclusive. | number |
| ㅤㅤㅤ↳regex | Regex that the data should match. | string | minLength: 1 maxLength: 512 |
| ㅤㅤㅤ↳valueOneOf | Enum of accepted values. | | minItems: 1 maxItems: 16 |
| ㅤㅤㅤ↳required | Specifies whether the value is required or optional. | boolean | Default: false |
| ㅤㅤㅤ↳blocking | Specifies whether we need to block the event transition in case the attribute validation is failed or not. | boolean | Default: true |
| states
| List of main states with its sub-states and transitions. |
| created | State created. |
| ㅤ↳name
| Name of the state. | string |
| ㅤ↳defaultSubstate | Represents default substate for this state. | string |
| ㅤ↳substates
| | | minItems: 1 |
| ㅤㅤ↳name | Name of the sub-state. | string | minLength: 3 maxLength: 32 |
| ㅤㅤ↳transitions
| Represents an array of transition rules for this substate. Transition Rule for this state. Contains events and the destination state. |
| ㅤㅤㅤ↳event | Represents name of the event for state transition. | string | minLength: 3 maxLength: 32 |
| ㅤㅤㅤ↳destination
| Name of the main state and its sub-state. | string | Example: created
minLength: 3 maxLength: 32 |
| ㅤㅤ↳ttl | Time to live associated with each state of a container. |
| ㅤㅤㅤ↳time | Time to live is associated with the state of a container. | string | pattern: Time string in days, hours, minutes, and seconds.
minLength: 2
Example - 30m, 1d 12h, 1d 12h 30m 45s etc.|
| ㅤㅤㅤ↳destination
| Represents destination state to which this instance should be transitioned to after ttl expiry. | string |
| ㅤㅤ↳callback | Represents callback URL, which can be called to get any info about state transition of a container or its terminal ttl expiry. | string | A valid URL. |
| opened | It signifies readiness of container to begin containerization process.
| ㅤ↳name
| Name of the state. | string |
| ㅤ↳defaultSubstate | Represents default substate for this state. | string |
| ㅤ↳substates
| | | minItems: 1 |
| ㅤㅤ↳name | Name of the sub-state. | string | minLength: 3 maxLength: 32 |
| ㅤㅤ↳transitions
| Represents an array of transition rules for this substate. Transition Rule for this state. Contains events and the destination state. |
| ㅤㅤㅤ↳event | Represents name of the event for state transition. | string | minLength: 3 maxLength: 32 |
| ㅤㅤㅤ↳destination
| Name of the main state and its sub-state. | string | Example: created
minLength: 3 maxLength: 32 |
| ㅤㅤ↳ttl | Time to live associated with each state of a container. |
| ㅤㅤㅤ↳time | Time to live is associated with the state of a container. | string | pattern: Time string in days, hours, minutes, and seconds.
minLength: 2
Example - 30m, 1d 12h, 1d 12h 30m 45s etc.|
| ㅤㅤㅤ↳destination
| Represents destination state to which this instance should be transitioned to after ttl expiry. | string |
| ㅤㅤ↳callback | Represents callback URL, which can be called to get any info about state transition of a container or its terminal ttl expiry. | string | A valid URL. |
| closed | It signifies the termination of containerization process. |
| ㅤ↳name
| Name of the state. | string |
| ㅤ↳defaultSubstate | Represents default substate for this state. | string |
| ㅤ↳substates
| | | minItems: 1 |
| ㅤㅤ↳name | Name of the sub-state. | string | minLength: 3 maxLength: 32 |
| ㅤㅤ↳transitions
| Represents an array of transition rules for this substate. Transition Rule for this state. Contains events and the destination state. |
| ㅤㅤㅤ↳event | Represents name of the event for state transition. | string | minLength: 3 maxLength: 32 |
| ㅤㅤㅤ↳destination
| Name of the main state and its sub-state. | string | Example: created
minLength: 3 maxLength: 32 |
| ㅤㅤ↳ttl | Time to live associated with each state of a container. |
| ㅤㅤㅤ↳time | Time to live is associated with the state of a container. | string | pattern: Time string in days, hours, minutes, and seconds.
minLength: 2
Example - 30m, 1d 12h, 1d 12h 30m 45s etc.|
| ㅤㅤㅤ↳destination
| Represents destination state to which this instance should be transitioned to after ttl expiry. | string |
| ㅤㅤ↳callback | Represents callback URL, which can be called to get any info about state transition of a container or its terminal ttl expiry. | string | A valid URL. |
| completed | End of the lifecycle of a container. |
| ㅤ↳name
| Name of the state. | string |
| ㅤ↳defaultSubstate | Represents default substate for this state. | string |
| ㅤ↳substates
| | | minItems: 1 |
| ㅤㅤ↳name | Name of the sub-state. | string | minLength: 3 maxLength: 32 |
| ㅤㅤ↳transitions
| Represents an array of transition rules for this substate. Transition Rule for this state. Contains events and the destination state. |
| ㅤㅤㅤ↳event | Represents name of the event for state transition. | string | minLength: 3 maxLength: 32 |
| ㅤㅤㅤ↳destination
| Name of the main state and its sub-state. | string | Example: created
minLength: 3 maxLength: 32 |
| ㅤㅤ↳ttl | Time to live associated with each state of a container. |
| ㅤㅤㅤ↳time | Time to live is associated with the state of a container. | string | pattern: Time string in days, hours, minutes, and seconds.
minLength: 2
Example - 30m, 1d 12h, 1d 12h 30m 45s etc.|
| ㅤㅤㅤ↳destination
| Represents destination state to which this instance should be transitioned to after ttl expiry. | string |
| ㅤㅤ↳callback | Represents callback URL, which can be called to get any info about state transition of a container or its terminal ttl expiry. | string | A valid URL. |
| terminalStates | Terminal state. | sting |
| terminalTTL | Specifies the time to live for a data entry in the database. Specified for a tenant. | string | Default: 30d Example: 10d5h3m0s
minLength: 2 maxLength: 12 |
| callback | Represents callback URL, which can be called to get any info about state transition of a container or its terminal ttl expiry. | string | A valid URL. |
This is required.



HTTP Status Code Summary
| Code | Description |
| ---- | ---------- |
| 200 - OK | Everything worked as expected. |
| 400 - Bad Request | The request was unacceptable, often due to missing a required parameter. |
| 401 - Unauthorized | No valid API key provided. |
| 404 - Not Found | The requested resource doesn't exist. |
| 503 - Server Error | Something went wrong.. (These are rare.) |

Callback
Language
URL
Click Try It! to start a request and see the response here!