OS1 Services
...
How to use Entities?
How to: Update Entity Type State
1 min
for information about prerequisites, see docid\ f5dbrxwuq321l b2mes3v to update the state of an entity type, call the docid\ m2ma8kmhk8vfq7trxpisg endpoint the following example shows a request body for configuring the state machine for entity type { "states" \[ { "name" "onboarding", "defaultsubstate" "onboarding", "substates" \[{ "name" "onboarding", "transitions" \[{ "eventcode" "e 001", "destination" "active\ active" }], "ttl" { "time" "40s", "destination" "onboarding\ onboarding" } }] },{ "name" "active", "defaultsubstate" "active", "substates" \[{ "name" "active", "transitions" \[{ "eventcode" "e 002", "destination" "inactive\ inactive" }], "ttl" { "time" "40s", "destination" "active\ active" } }] },{ "name" "inactive", "defaultsubstate" "inactive", "substates" \[{ "name" "inactive", "transitions" \[{ "eventcode" "e 004", "destination" "inactive\ inactive" }], "ttl" { "time" "40s", "destination" "inactive\ inactive" } }] } ], "terminalttl" "300s", "callback" "https //examplecallback com" }