Catalog/workflow-fsm-next-states

Workflow

FSM next states API

Lists every event accepted from a given FSM state and the resulting target state, and flags whether the state is terminal/final. Answers 'What can happen next from this state?', 'Is this a dead-end state?'.

Price$0.01per request
MethodPOST
Route/v1/workflow/fsm-next-states
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
fsmstate-machinenext-statestransitionseventsoptionsautomataworkflow
API URLhttps://x402.hexl.dev/v1/workflow/fsm-next-states
Integration docs
Example request
{
  "states": [
    "idle",
    "running",
    "done"
  ],
  "initial": "idle",
  "transitions": [
    {
      "from": "idle",
      "on": "start",
      "to": "running"
    },
    {
      "from": "running",
      "on": "finish",
      "to": "done"
    }
  ],
  "finals": [
    "done"
  ],
  "state": "running"
}
Example response
{
  "state": "running",
  "options": [
    {
      "event": "finish",
      "to": "done"
    }
  ],
  "isTerminal": false,
  "isFinal": false,
  "interpretation": "From 'running': finish->done."
}
Input schema
{
  "type": "object",
  "required": [
    "states",
    "initial",
    "transitions",
    "state"
  ],
  "properties": {
    "states": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "examples": [
        [
          "idle",
          "running",
          "done"
        ]
      ]
    },
    "initial": {
      "type": "string",
      "examples": [
        "idle"
      ]
    },
    "transitions": {
      "type": "array",
      "examples": [
        [
          {
            "from": "idle",
            "on": "start",
            "to": "running"
          },
          {
            "from": "running",
            "on": "finish",
            "to": "done"
          }
        ]
      ]
    },
    "state": {
      "type": "string",
      "examples": [
        "running"
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}