Skip to content

Commit

Permalink
Add json api definition for transforms
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
  • Loading branch information
rockwotj committed Sep 12, 2023
1 parent bfde4a1 commit 318b25d
Showing 1 changed file with 163 additions and 0 deletions.
163 changes: 163 additions & 0 deletions src/v/redpanda/admin/api-doc/transform.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
{
"apiVersion": "0.0.1",
"swaggerVersion": "1.2",
"basePath": "/v1",
"resourcePath": "/transform",
"apis": [
{
"path": "/v1/transform/deploy",
"operations": [
{
"method": "POST",
"summary": "Deploy a transform based on the provided metadata and wasm binary in the request payload. The payload should be the transform metadata in JSON format immediately followed by the WebAssembly binary without any delimiters.",
"nickname": "deploy_transform",
"consumes": [
"application/json+wasm"
],
"type": "void",
"produces": [
"application/json"
]
}
]
},
{
"path": "/v1/transform/delete",
"operations": [
{
"method": "POST",
"summary": "Delete a transform based on the provided name in the request payload.",
"type": "void",
"nickname": "delete_transform",
"consumes": [
"application/json"
],
"produces": [
"application/json"
]
}
]
},
{
"path": "/v1/transform/list",
"operations": [
{
"method": "GET",
"type": "array",
"items": {
"type": "transform_metadata"
},
"summary": "List all transforms, the status report contains a cluster wide aggregated view of the live transform execution state.",
"nickname": "list_transforms",
"produces": [
"application/json"
]
}
]
}
],
"models": {
"deploy_transform_request": {
"id": "deploy_transform_request",
"properties": {
"name": {
"type": "string"
},
"input_topic": {
"type": "string"
},
"output_topics": {
"type": "array",
"items": {
"type": "string"
}
},
"environment": {
"type": "array",
"items": {
"type": "environment_variable"
},
"description": "The environment variable configuration for a transform"
}
}
},
"delete_transform_request": {
"id": "delete_transform_request",
"properties": {
"name": {
"type": "string"
}
}
},
"transform_metadata": {
"id": "transform_metadata",
"properties": {
"name": {
"type": "string"
},
"input_topic": {
"type": "string"
},
"output_topics": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"type": "array",
"items": {
"type": "partition_transform_status"
}
},
"environment": {
"type": "array",
"items": {
"type": "environment_variable"
},
"description": "The environment variable configuration for a transform"
}
}
},
"partition_transform_status": {
"id": "partition_transform_status",
"description": "The status of a single partition's transform",
"properties": {
"node_id": {
"type": "int",
"description": "id of a node"
},
"partition": {
"type": "int",
"description": "partition in the input topic"
},
"core": {
"type": "int",
"description": "id of a core on a given node"
},
"status": {
"type": "string",
"enum": [
"running",
"inactive",
"errored",
"unknown"
],
"description": "the status of a transform"
}
}
},
"environment_variable": {
"id": "environment_variable",
"description": "Single key value pair for an environment",
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
}
}

0 comments on commit 318b25d

Please sign in to comment.