[
  {
    "name": "inspect-code",
    "request": {
      "method": "POST",
      "path": "/execkernel/graph/inspect",
      "body": {
        "flow": "learning-path"
      },
      "authenticated": true
    },
    "response": {
      "http": 200,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "dd4a90c4899efd7944233685a70b4eaa"
      },
      "body": {
        "nodes": [
          {
            "id": 10,
            "isTerminal": false
          },
          {
            "id": 20,
            "isTerminal": true
          },
          {
            "id": 30,
            "isTerminal": true
          }
        ],
        "edges": [
          {
            "id": 101,
            "fromNode": 10,
            "toNode": 20
          },
          {
            "id": 102,
            "fromNode": 10,
            "toNode": 30
          }
        ],
        "labels": [
          {
            "edgeId": 101,
            "lang": "en",
            "text": "Read the guide",
            "description": null,
            "extras": null
          },
          {
            "edgeId": 101,
            "lang": "es",
            "text": "Leer la guía",
            "description": null,
            "extras": null
          },
          {
            "edgeId": 102,
            "lang": "en",
            "text": "Practise in the browser",
            "description": null,
            "extras": null
          },
          {
            "edgeId": 102,
            "lang": "es",
            "text": "Practicar en el navegador",
            "description": null,
            "extras": null
          }
        ],
        "trace_id": "dd4a90c4899efd7944233685a70b4eaa"
      }
    }
  },
  {
    "name": "start-en",
    "request": {
      "method": "POST",
      "path": "/execkernel/session/start",
      "body": {
        "flow": "learning-path",
        "lang": "en",
        "context": {
          "practiceEnabled": true
        }
      },
      "authenticated": true
    },
    "response": {
      "http": 200,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "e60a3ae93e5563c6d85191c4403aaab9"
      },
      "body": {
        "session_id": "596045e185e00524a6579e139d1e2ae6",
        "state": {
          "graph_code": "learning-path",
          "flow_id": 7006,
          "current_node": 10,
          "context": {
            "practiceEnabled": true
          },
          "history": {
            "edges": [],
            "nodes": [
              10
            ],
            "overflow_policy": "preserve"
          },
          "created_at": 1796410364,
          "updated_at": 1796410364,
          "last_transition_at": 1796410364,
          "graph_version": null,
          "dsl_version": null
        },
        "payload": {
          "type": "node",
          "node_id": 10,
          "title": "How would you like to learn?",
          "subtitle": null,
          "description": "Choose a guide to read or an exercise to try.",
          "extras": {
            "screen": "learning-choice"
          },
          "edges": [
            {
              "id": 101,
              "from": 10,
              "to": 20,
              "labels": [
                {
                  "text": "Read the guide",
                  "description": null,
                  "extras": null
                }
              ],
              "enabled": true,
              "disabled_reason": null,
              "availability": "available"
            },
            {
              "id": 102,
              "from": 10,
              "to": 30,
              "labels": [
                {
                  "text": "Practise in the browser",
                  "description": null,
                  "extras": null
                }
              ],
              "enabled": true,
              "disabled_reason": null,
              "availability": "available"
            }
          ]
        },
        "trace_id": "e60a3ae93e5563c6d85191c4403aaab9"
      }
    }
  },
  {
    "name": "next-en",
    "request": {
      "method": "POST",
      "path": "/execkernel/session/next",
      "body": {
        "session_id": "596045e185e00524a6579e139d1e2ae6",
        "edge_id": 101
      },
      "authenticated": true
    },
    "response": {
      "http": 200,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "82e31525d77550732d7588a463f79ea5"
      },
      "body": {
        "session_id": "596045e185e00524a6579e139d1e2ae6",
        "state": {
          "graph_code": "learning-path",
          "flow_id": 7006,
          "current_node": 20,
          "context": {
            "practiceEnabled": true
          },
          "history": {
            "edges": [
              101
            ],
            "nodes": [
              10,
              20
            ],
            "overflow_policy": "preserve"
          },
          "created_at": 1796410364,
          "updated_at": 1796410364,
          "last_transition_at": 1796410364,
          "graph_version": null,
          "dsl_version": null
        },
        "payload": {
          "type": "terminal",
          "node_id": 20,
          "title": "Guide selected",
          "subtitle": null,
          "description": null,
          "extras": {
            "mode": "guide"
          },
          "outputs": [
            {
              "type": "content",
              "url": null,
              "label": null,
              "open_behavior": null,
              "lang": "en",
              "content": "Read the guide at your own pace."
            },
            {
              "type": "url",
              "url": "https://example.org/learning/guide",
              "label": "Open the guide",
              "open_behavior": null,
              "lang": "en",
              "content": null
            }
          ]
        },
        "trace_id": "82e31525d77550732d7588a463f79ea5"
      }
    }
  },
  {
    "name": "resume-en",
    "request": {
      "method": "POST",
      "path": "/execkernel/session/resume",
      "body": {
        "session_id": "596045e185e00524a6579e139d1e2ae6"
      },
      "authenticated": true
    },
    "response": {
      "http": 200,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "e27b9b446dafeb38b00d3c6934181d28"
      },
      "body": {
        "session_id": "596045e185e00524a6579e139d1e2ae6",
        "state": {
          "graph_code": "learning-path",
          "flow_id": 7006,
          "current_node": 20,
          "context": {
            "practiceEnabled": true
          },
          "history": {
            "edges": [
              101
            ],
            "nodes": [
              10,
              20
            ],
            "overflow_policy": "preserve"
          },
          "created_at": 1796410364,
          "updated_at": 1796410364,
          "last_transition_at": 1796410364,
          "graph_version": null,
          "dsl_version": null
        },
        "payload": {
          "type": "terminal",
          "node_id": 20,
          "title": "Guide selected",
          "subtitle": null,
          "description": null,
          "extras": {
            "mode": "guide"
          },
          "outputs": [
            {
              "type": "content",
              "url": null,
              "label": null,
              "open_behavior": null,
              "lang": "en",
              "content": "Read the guide at your own pace."
            },
            {
              "type": "url",
              "url": "https://example.org/learning/guide",
              "label": "Open the guide",
              "open_behavior": null,
              "lang": "en",
              "content": null
            }
          ]
        },
        "trace_id": "e27b9b446dafeb38b00d3c6934181d28"
      }
    }
  },
  {
    "name": "status-en",
    "request": {
      "method": "GET",
      "path": "/execkernel/sessions/596045e185e00524a6579e139d1e2ae6/status",
      "body": null,
      "authenticated": true
    },
    "response": {
      "http": 200,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "3e18477b1a626c67ceaeab2669a0919d"
      },
      "body": {
        "session_id": "596045e185e00524a6579e139d1e2ae6",
        "current_node": 20,
        "node_status": "terminal",
        "trace_id": "3e18477b1a626c67ceaeab2669a0919d"
      }
    }
  },
  {
    "name": "delete-en",
    "request": {
      "method": "DELETE",
      "path": "/execkernel/session/596045e185e00524a6579e139d1e2ae6",
      "body": null,
      "authenticated": true
    },
    "response": {
      "http": 200,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "28b4bd3864608bd4258d26fcc696f311"
      },
      "body": {
        "deleted": true,
        "session_id": "596045e185e00524a6579e139d1e2ae6",
        "trace_id": "28b4bd3864608bd4258d26fcc696f311"
      }
    }
  },
  {
    "name": "after-delete-en",
    "request": {
      "method": "POST",
      "path": "/execkernel/session/resume",
      "body": {
        "session_id": "596045e185e00524a6579e139d1e2ae6"
      },
      "authenticated": true
    },
    "response": {
      "http": 400,
      "headers": {
        "Content-Type": "application/json",
        "X-Trace-Id": "6575f34a9458478081076a3cdf9966b2"
      },
      "body": {
        "error": {
          "code": "EK-INPUT-400",
          "message": "Session not found.",
          "details": {
            "http": 400,
            "trace_id": "6575f34a9458478081076a3cdf9966b2"
          }
        }
      }
    }
  }
]
