Deploy transform Run in API Explorer

PUT /v1/transforms

Initiate deployment of a new Wasm transform. This endpoint uses multipart/form-data encoding. Following deployment, a brief period is required before the Wasm transform becomes operational. Monitor the partition statuses to check whether the transform is active. This usually takes around 3s, but no longer than 10s.

multipart/form-data

Body Required

Transform metadata as well as the WASM binary

  • metadata object

    Metadata required to deploy a new Wasm transform in a Redpanda cluster.

    Hide metadata attributes Show metadata attributes object
    • environment_variables array[object]

      The environment variables you want to apply to your transform's environment

      Hide environment_variables attributes Show environment_variables attributes object
      • key string Required

        The key of your environment variable.

      • value string Required

        The value of your environment variable.

    • input_topic_name string Required

      The input topic to apply the transform to.

    • name string Required

      Name of the transform.

    • output_topic_names array[string] Required

      Output topic to write the transform results to.

  • wasm_binary string(binary)

    Binary file containing the compiled WASM transform. The maximum size for this file is 10MiB.

Responses

  • 201 application/json

    Created

    Hide response attributes Show response attributes object
    • environment_variables array[object]

      The environment variables you want to apply to your transform's environment

      Hide environment_variables attributes Show environment_variables attributes object
      • key string Required

        The key of your environment variable.

      • value string Required

        The value of your environment variable.

    • input_topic_name string

      Input topic to apply the transform to.

    • name string

      Name of transform.

    • output_topic_names array[string]

      Output topics to write the transform results to.

    • statuses array[object]
      Hide statuses attributes Show statuses attributes object
      • broker_id integer(int32)
      • lag integer(int32)
      • partition_id integer(int32)
      • status string

        Values are PARTITION_STATUS_RUNNING, PARTITION_STATUS_INACTIVE, PARTITION_STATUS_ERRORED, or PARTITION_STATUS_UNKNOWN.

PUT /v1/transforms
curl \
 --request PUT 'https://{dataplane_api_subdomain}.cloud.redpanda.com/v1/transforms' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: multipart/form-data"
Request example
{"name":"redact-orders","input_topic_name":"orders","output_topic_names":["orders-redacted"],"environment_variables":[{"key":"LOGGER_LEVEL","value":"DEBUG"}]}
Response examples (201)
{
  "environment_variables": [
    {
      "key": "LOG_LEVEL",
      "value": "DEBUG"
    }
  ],
  "input_topic_name": "string",
  "name": "string",
  "output_topic_names": [
    "string"
  ],
  "statuses": [
    {
      "broker_id": 42,
      "lag": 42,
      "partition_id": 42,
      "status": "PARTITION_STATUS_RUNNING"
    }
  ]
}