For the complete documentation index, see llms.txt. This page is also available as Markdown.

K2K Apps

Kafka 2 Kafka application management

get

Retrieves a single K2KApp by name.

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Path parameters
namestringRequired
Query parameters
expand_metricsbooleanOptional

Includes metrics in the response, if available.

Responses
200

Happy response.

application/json

Defines a K2KApp (Kafka-to-Kafka application).

apiVersionstring · min: 1Required
kindstring · min: 1Required
get/api/v0/apps/k2k/{name}
put

Creates a new K2KApp or updates an existing one.

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Path parameters
namestringRequired
Body

Contains common fields shared by HQ manifests.

apiVersionstring · min: 1Required
kindstring · min: 1Required
Responses
201

Happy response.

application/json

Contains common fields shared by HQ manifests.

apiVersionstring · min: 1Required
kindstring · min: 1Required
put/api/v0/apps/k2k/{name}
delete

Deletes a single K2KApp by name.

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Path parameters
namestringRequired
Query parameters
forcebooleanOptional

Deletes the K2KApp instantly and skips waiting for deletion of any corresponding K8s resources.

Responses
200

Happy response.

application/json

Contains common fields shared by HQ manifests.

apiVersionstring · min: 1Required
kindstring · min: 1Required
delete/api/v0/apps/k2k/{name}
patch

Updates an existing K2KApp.

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Path parameters
namestringRequired
Body

Contains common fields shared by HQ manifests.

apiVersionstring · min: 1Required
kindstring · min: 1Required
Responses
200

Happy response.

application/json

Contains common fields shared by HQ manifests.

apiVersionstring · min: 1Required
kindstring · min: 1Required
patch/api/v0/apps/k2k/{name}
get

Lists all K2KApps.

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Query parameters
expand_metrics_summarybooleanOptional

Includes metrics summaries in the response, if available.

Responses
200

Happy response.

application/json

Contains K2KApps (Kafka-to-Kafka applications).

get/api/v0/apps/k2k
post

Creates a new K2KApp.

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Body

Contains common fields shared by HQ manifests.

apiVersionstring · min: 1Required
kindstring · min: 1Required
Responses
201

Happy response.

application/json

Contains common fields shared by HQ manifests.

apiVersionstring · min: 1Required
kindstring · min: 1Required
post/api/v0/apps/k2k

Get Consumer Group Offsets

get

Retrieves the current committed offsets for all topics and partitions associated with a K2K application's consumer group. The application does not need to be running for this operation. Note: This reads from the K2K internal control topic, not from Kafka's standard __consumer_offsets topic, as K2K uses a custom offset storage mechanism.

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Path parameters
namestringRequired

The unique name for the K2K application.

Example: my-replicator-app
Query parameters
limitinteger · min: 1 · max: 250Optional

Maximum number of topics to return per page.

Default: 50Example: 50
cursorstringOptional

Pagination cursor from previous response's next_cursor.

Example: eyJ0b3BpYyI6InVzZXItYWN0aXZpdHkifQ==
querystringOptional

A search keyword to filter topics by name (case-insensitive partial match). Topics whose names contain the search string will be included in results. Filtering is applied before pagination, so total_count and pagination reflect the filtered result set.

Example: events
Responses
200

Consumer group offsets retrieved successfully.

application/json

Consumer group offset information for a K2K application.

application_namestringRequired

The name of the K2K application.

Example: my-replicator-app
consumer_groupstringRequired

The Kafka consumer group ID used by this application.

Example: k2k-my-replicator-app
total_countintegerRequired

Total number of topics across all pages.

Example: 1247
has_morebooleanRequired

Whether more results exist beyond this page.

Example: true
next_cursorstring · nullableOptional

Cursor for retrieving the next page of results. Null if this is the last page.

Example: eyJ0b3BpYyI6InVzZXItYWN0aXZpdHkifQ==
get/api/v0/apps/k2k/{name}/position/offsets

Update Consumer Group Offsets for multiple partitions

put

Update the committed offsets for multiple topic partitions for a given K2K application. Precondition: The K2K application must be stopped before calling this endpoint. If the application is running, a 409 Conflict error is returned. This is an atomic, all-or-nothing operation using Kafka Transactions. This endpoint replaces the deprecated endpoint (PUT /v0/apps/k2k/{name}/offsets/{topicName}).

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Path parameters
namestringRequired

The unique name for the K2K application.

Example: my-app-prod
Body

Request to set consumer group offsets. At least one offset must be provided via either 'positions' (preferred) or 'offsets' (deprecated).

Responses
200

Offsets successfully updated.

application/json
application_namestringRequiredExample: my-app-prod
put/api/v0/apps/k2k/{name}/position/offsets

Set Consumer Group Offsets by Timestamp

put

Sets the committed offsets for specific topic partitions of a K2K application by resolving a single timestamp to offsets. Precondition: The K2K application must be stopped before calling this endpoint. If the application is running, a 409 Conflict error is returned. Two-Phase Operation: 1. HQ resolves the timestamp to offsets via the Agent (single gRPC call) 2. HQ publishes the resolved offsets to the K2K control topic. Design: A single timestamp applies to all specified partitions. This aligns the HTTP API with the gRPC contract, avoiding hidden complexity. For different timestamps, clients make separate API calls. Edge Cases (per Kafka offsetsForTimes semantics): Timestamp before earliest message returns the earliest offset; timestamp after latest message skips partition (no offset available); partition with no messages is skipped.

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Path parameters
namestringRequired

The unique name for the K2K application.

Example: my-replicator-app
Body

Request to set consumer group offsets by timestamp. At least one topic with partitions must be provided. A single timestamp applies to all specified partitions.

timestampstring · date-timeRequired

The target timestamp (RFC3339 format). All specified partitions will be set to the first message at or after this timestamp.

Example: 2025-01-14T10:00:00Z
Responses
200

Offsets successfully updated.

application/json

Response after setting offsets by timestamp.

application_namestringRequired

The name of the K2K application.

Example: my-replicator-app
timestampstring · date-timeRequired

The timestamp that was used for resolution.

Example: 2025-01-14T10:00:00Z
put/api/v0/apps/k2k/{name}/position/timestamp
get

Provides Server-Sent Events (SSE) for K2KApp updates. TODO.

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Responses
default

Error object.

application/json

Implements the RFC7807 "Problem Details", see https://www.rfc-editor.org/rfc/rfc7807.

typestring · enumOptional

Enumerates possible error types.

Possible values:
titlestringRequired

Describes the problem in a human readable fashion.

statusintegerRequired

Is a copy of the http status code.

sso_urlstringOptional

Contains in case of an "unauthorised" type of error, the url of the SSO provider, if any.

request_idstringOptional

Is set to the id of this request. Can be used to correlate backend logs.

get/api/v1/apps/k2k/live/sse
default

Error object.

get

Renders a K2K app template for migration with the given consumer group and connections.

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Query parameters
consumer_group_lrnstringRequired

The consumer group LRN to include in the template.

source_connection_lrnstringRequired

The source KafkaConnection LRN.

target_connection_lrnstringRequired

The target KafkaConnection LRN.

deployment_namespace_lrnstringRequired

The deployment Kubernetes namespace LRN.

Responses
200

Successfully rendered the migration template.

application/json

Contains common fields shared by HQ manifests.

apiVersionstring · min: 1Required
kindstring · min: 1Required
get/api/v1/k2k/migration-template
get

Lists all K2K migrations.

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Responses
200

Successfully retrieved the list of migrations.

application/json

Contains a list of K2K migrations.

get/api/v1/k2k/migrations
post

Creates a new K2K migration.

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Body

Request body for creating a new K2K migration.

namestring · hq-resource-name · min: 1 · max: 63Required

The unique name for the migration.

display_namestring · max: 150Optional

Sets the display name of the new K2KMigration. If not provided, the value of "name" will be used.

k2k_appstring · hq-resource-name · min: 1Required

The K2K app migrating the data the consumer group processes.

consumer_group_idstring · min: 1Required

The ID of the consumer group whose offsets should be migrated.

Responses
201

Successfully created the migration.

application/json

Represents a K2K consumer group offset migration.

namestringRequired

The unique name of the migration.

display_namestringRequired
lrnstringRequired

Contains the resource identifier for use in access control policies.

idstringRequired
created_atstring · date-timeRequired

The timestamp when the migration was created.

k2k_appstringRequired

The name of the K2K app this migration is associated with.

consumer_group_idstringRequired

The ID of the consumer group being migrated.

statusstring · enumRequired

Enumerates K2K migration status types.

Possible values:
status_messagestringRequired

A human-readable message about the current status.

post/api/v1/k2k/migrations
get

Gets a K2K migration by name.

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Path parameters
namestringRequired

The unique name of the migration.

Responses
200

Successfully retrieved the migration.

application/json

Represents a K2K consumer group offset migration.

namestringRequired

The unique name of the migration.

display_namestringRequired
lrnstringRequired

Contains the resource identifier for use in access control policies.

idstringRequired
created_atstring · date-timeRequired

The timestamp when the migration was created.

k2k_appstringRequired

The name of the K2K app this migration is associated with.

consumer_group_idstringRequired

The ID of the consumer group being migrated.

statusstring · enumRequired

Enumerates K2K migration status types.

Possible values:
status_messagestringRequired

A human-readable message about the current status.

get/api/v1/k2k/migrations/{name}
delete

Deletes a K2K migration by name.

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Path parameters
namestringRequired

The unique name of the migration.

Responses
204

Successfully deleted the migration.

No content

delete/api/v1/k2k/migrations/{name}

No content

patch

Updates the state of a K2K migration.

Authorizations
AuthorizationstringRequired

The bearer token can be obtained by creating a ServiceAccount.

Path parameters
namestringRequired

The unique name of the migration.

Body

Request body for updating the state of a K2K migration.

statusstring · enumRequired

User-triggerable migration actions.

Possible values:
Responses
200

Successfully updated the migration.

application/json

Represents a K2K consumer group offset migration.

namestringRequired

The unique name of the migration.

display_namestringRequired
lrnstringRequired

Contains the resource identifier for use in access control policies.

idstringRequired
created_atstring · date-timeRequired

The timestamp when the migration was created.

k2k_appstringRequired

The name of the K2K app this migration is associated with.

consumer_group_idstringRequired

The ID of the consumer group being migrated.

statusstring · enumRequired

Enumerates K2K migration status types.

Possible values:
status_messagestringRequired

A human-readable message about the current status.

patch/api/v1/k2k/migrations/{name}

Last updated

Was this helpful?