Catalog/workflow-reachable-set

Workflow

Reachable node set API

Computes all nodes reachable from one or more start nodes in a directed graph (transitive closure) with BFS distances and the unreachable remainder. Answers 'Which nodes can I reach from here?', 'What is downstream/affected by this node?'.

Price$0.02per request
MethodPOST
Route/v1/workflow/reachable-set
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
reachableclosuregraphbfsdownstreamimpacttraversalworkflow
API URLhttps://x402.hexl.dev/v1/workflow/reachable-set
Integration docs
Example request
{
  "nodes": [
    "a",
    "b",
    "c",
    "d"
  ],
  "edges": [
    [
      "a",
      "b"
    ],
    [
      "b",
      "c"
    ]
  ],
  "from": "a"
}
Example response
{
  "reachable": [
    "a",
    "b",
    "c"
  ],
  "reachableCount": 3,
  "unreachable": [
    "d"
  ],
  "distances": {
    "a": 0,
    "b": 1,
    "c": 2
  },
  "interpretation": "3 node(s) reachable from {a}; 1 unreachable."
}
Input schema
{
  "type": "object",
  "required": [
    "nodes",
    "edges",
    "from"
  ],
  "properties": {
    "nodes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "examples": [
        [
          "a",
          "b",
          "c",
          "d"
        ]
      ]
    },
    "edges": {
      "type": "array",
      "examples": [
        [
          [
            "a",
            "b"
          ],
          [
            "b",
            "c"
          ]
        ]
      ]
    },
    "from": {
      "examples": [
        "a"
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}