Overview
/
Developer Tools
/
API Reference
/
ML
/
Open a sponsored KCL migration connection. It cannot execute ordinary prompts.

Open a sponsored KCL migration connection. It cannot execute ordinary prompts

Billing: No usage charge

WebSocket URL example

wss://api.zoo.dev/ws/ml/kcl-migration

WebSocket request

  • //
    {
    • type:

      "cancel",
    • operation_id:

      stringUUID
      //
    }
  • //
    {
    • type:

      "headers",
    • :

      {{ ... }
      • [key]:

        string
      }
    }
  • //
    {
    • type:

      "ping"
    }
  • //
    {
    • type:

      "start",
    • :

      {{ ... }
      //
      • allow_preview:

        boolean,
        //
      • entrypoint:

        string,
        //
      • request_id:

        stringUUID,
        //
      • :

        {{ ... },
        //
        • :

          [[ ... ]
          • numberuint8
          ]
        }
      • :

        {{ ... },
        //
        • project_id:

          string,
          //
        • snapshot_id:

          string,
          //
        • :

          {{ ... }
          //
          • project_id:

            string,
            //
          • revision:

            string,
            //
          • writer_fence:

            string
            //
          }
        }
      • target:

        "3.0-preview"+1▾
        • //Unstable KCL 3 preview.
          "3.0-preview"
        • //Stable KCL 3. Availability also depends on the deployed worker and client.
          "3.0"
        //
      }
    }
  • //
    {
    • type:

      "status",
    • operation_id:

      stringUUID
      //
    }

WebSocket response

  • //
    {
    • type:

      "error",
    • detail:

      string
    }
  • //
    {
    • type:

      "operation",
    • :

      {{ ... }
      //
      • deadline:

        stringISO-8601,
        //
      • id:

        stringUUID,
        //
      • :

        {{ ... },
        //
        • project_id:

          string,
          //
        • snapshot_id:

          string,
          //
        • :

          {{ ... }
          //
          • project_id:

            string,
            //
          • revision:

            string,
            //
          • writer_fence:

            string
            //
          }
        }
      • :

        {{ ... },
        //
        • conversion_not_started:

          boolean,
          //
        • detail:

          string,
          //
        • :

          {{ ... },
          //
          • :

            [[ ... ]
            • numberuint8
            ]
          }
        • status:

          "running"+6▾
          • //Preparation, conversion, or validation is still running.
            "running"
          • //A validated candidate is ready for review. No project has been applied.
            "succeeded"
          • //The attempt failed.
            "failed"
          • //The original execution deadline expired.
            "timed_out"
          • //The attempt was cancelled, including loss of its execution connection.
            "cancelled"
          • //The source, target, or project is not supported.
            "unsupported"
          • //Execution, geometry, or behavioral equivalence could not be established.
            "validation_failed"
          ,
          //
        • :

          {{ ... }
          //
          • behavior_preserved:

            boolean,
            //
          • geometry_preserved:

            boolean,
            //
          • rules_revision:

            string,
            //
          • runtime_version:

            string,
            //
          • source_executed:

            boolean,
            //
          • source_version:

            string,
            //
          • summary:

            string,
            //
          • target_executed:

            boolean,
            //
          • target:

            "3.0-preview"+1▾
            • //Unstable KCL 3 preview.
              "3.0-preview"
            • //Stable KCL 3. Availability also depends on the deployed worker and client.
              "3.0"
            //
          }
        }
      • status:

        "running"+6▾
        • //Preparation, conversion, or validation is still running.
          "running"
        • //A validated candidate is ready for review. No project has been applied.
          "succeeded"
        • //The attempt failed.
          "failed"
        • //The original execution deadline expired.
          "timed_out"
        • //The attempt was cancelled, including loss of its execution connection.
          "cancelled"
        • //The source, target, or project is not supported.
          "unsupported"
        • //Execution, geometry, or behavioral equivalence could not be established.
          "validation_failed"
        ,
        //
      • target:

        "3.0-preview"+1▾
        • //Unstable KCL 3 preview.
          "3.0-preview"
        • //Stable KCL 3. Availability also depends on the deployed worker and client.
          "3.0"
        //
      }
    }
  • //
    {
    • type:

      "pong"
    }