Debezium Kafka Connect REST API
Debezium runs as Kafka Connect source connectors. This API manages Debezium CDC connectors, their configurations, tasks, and offsets via the standard Kafka Connect REST interface.
Debezium runs as Kafka Connect source connectors. This API manages Debezium CDC connectors, their configurations, tasks, and offsets via the standard Kafka Connect REST interface.
openapi: 3.1.0
info:
title: Debezium Kafka Connect REST API
description: >-
Debezium runs as connectors within Kafka Connect. This API provides
endpoints for managing Debezium CDC connectors, their configurations,
tasks, and offsets via the Kafka Connect REST interface.
version: 2.6.0
contact:
name: Debezium
url: https://debezium.io/
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://localhost:8083
description: Default Kafka Connect worker running Debezium
paths:
/:
get:
summary: Get Connect cluster info
operationId: getClusterInfo
tags:
- Cluster
responses:
'200':
description: Kafka Connect worker info
content:
application/json:
schema:
type: object
properties:
version:
type: string
commit:
type: string
kafka_cluster_id:
type: string
/connectors:
get:
summary: List active connectors
operationId: listConnectors
tags:
- Connectors
parameters:
- name: expand
in: query
schema:
type: string
enum: [status, info]
responses:
'200':
description: List of connector names
content:
application/json:
schema:
type: array
items:
type: string
post:
summary: Create a Debezium connector
operationId: createConnector
tags:
- Connectors
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateConnectorRequest'
responses:
'201':
description: Connector created
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectorInfo'
'409':
description: Connector with this name already exists
/connectors/{connector}:
get:
summary: Get connector info
operationId: getConnector
tags:
- Connectors
parameters:
- name: connector
in: path
required: true
schema:
type: string
responses:
'200':
description: Connector details
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectorInfo'
'404':
description: Connector not found
delete:
summary: Delete connector
operationId: deleteConnector
tags:
- Connectors
parameters:
- name: connector
in: path
required: true
schema:
type: string
responses:
'204':
description: Connector deleted
/connectors/{connector}/config:
get:
summary: Get connector configuration
operationId: getConnectorConfig
tags:
- Connectors
parameters:
- name: connector
in: path
required: true
schema:
type: string
responses:
'200':
description: Connector config key-value pairs
content:
application/json:
schema:
type: object
additionalProperties:
type: string
put:
summary: Update connector configuration
operationId: updateConnectorConfig
tags:
- Connectors
parameters:
- name: connector
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties:
type: string
responses:
'200':
description: Configuration updated
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectorInfo'
/connectors/{connector}/status:
get:
summary: Get connector status
operationId: getConnectorStatus
tags:
- Connectors
parameters:
- name: connector
in: path
required: true
schema:
type: string
responses:
'200':
description: Connector and task status
content:
application/json:
schema:
$ref: '#/components/schemas/ConnectorStatus'
/connectors/{connector}/restart:
post:
summary: Restart connector
operationId: restartConnector
tags:
- Connectors
parameters:
- name: connector
in: path
required: true
schema:
type: string
- name: includeTasks
in: query
schema:
type: boolean
default: false
- name: onlyFailed
in: query
schema:
type: boolean
default: false
responses:
'200':
description: Connector restarted
'204':
description: Connector restarted
/connectors/{connector}/pause:
put:
summary: Pause connector
operationId: pauseConnector
tags:
- Connectors
parameters:
- name: connector
in: path
required: true
schema:
type: string
responses:
'202':
description: Pause request accepted
/connectors/{connector}/resume:
put:
summary: Resume connector
operationId: resumeConnector
tags:
- Connectors
parameters:
- name: connector
in: path
required: true
schema:
type: string
responses:
'202':
description: Resume request accepted
/connectors/{connector}/tasks:
get:
summary: List connector tasks
operationId: listTasks
tags:
- Tasks
parameters:
- name: connector
in: path
required: true
schema:
type: string
responses:
'200':
description: List of tasks
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/TaskInfo'
/connectors/{connector}/tasks/{task}/status:
get:
summary: Get task status
operationId: getTaskStatus
tags:
- Tasks
parameters:
- name: connector
in: path
required: true
schema:
type: string
- name: task
in: path
required: true
schema:
type: integer
responses:
'200':
description: Task status
content:
application/json:
schema:
$ref: '#/components/schemas/TaskStatus'
/connectors/{connector}/tasks/{task}/restart:
post:
summary: Restart task
operationId: restartTask
tags:
- Tasks
parameters:
- name: connector
in: path
required: true
schema:
type: string
- name: task
in: path
required: true
schema:
type: integer
responses:
'204':
description: Task restarted
/connectors/{connector}/offsets:
get:
summary: Get connector offsets
operationId: getConnectorOffsets
tags:
- Offsets
parameters:
- name: connector
in: path
required: true
schema:
type: string
responses:
'200':
description: Connector offsets
content:
application/json:
schema:
type: object
properties:
offsets:
type: array
items:
type: object
patch:
summary: Alter connector offsets
operationId: alterOffsets
tags:
- Offsets
parameters:
- name: connector
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
offsets:
type: array
items:
type: object
responses:
'200':
description: Offsets altered
delete:
summary: Reset connector offsets
operationId: resetOffsets
tags:
- Offsets
parameters:
- name: connector
in: path
required: true
schema:
type: string
responses:
'200':
description: Offsets reset
/connector-plugins:
get:
summary: List installed connector plugins
operationId: listPlugins
tags:
- Plugins
responses:
'200':
description: List of plugins
content:
application/json:
schema:
type: array
items:
type: object
properties:
class:
type: string
type:
type: string
version:
type: string
/connector-plugins/{plugin}/config/validate:
put:
summary: Validate connector configuration
operationId: validateConfig
tags:
- Plugins
parameters:
- name: plugin
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties:
type: string
responses:
'200':
description: Validation result
content:
application/json:
schema:
type: object
properties:
name:
type: string
error_count:
type: integer
groups:
type: array
items:
type: string
configs:
type: array
items:
type: object
components:
schemas:
CreateConnectorRequest:
type: object
required:
- name
- config
properties:
name:
type: string
description: Unique connector name
config:
type: object
description: Connector configuration properties
additionalProperties:
type: string
properties:
connector.class:
type: string
description: >-
Debezium connector class, e.g.
io.debezium.connector.mysql.MySqlConnector,
io.debezium.connector.postgresql.PostgresConnector,
io.debezium.connector.mongodb.MongoDbConnector,
io.debezium.connector.sqlserver.SqlServerConnector,
io.debezium.connector.oracle.OracleConnector
database.hostname:
type: string
database.port:
type: string
database.user:
type: string
database.password:
type: string
database.dbname:
type: string
topic.prefix:
type: string
description: Prefix for Kafka topic names
schema.history.internal.kafka.bootstrap.servers:
type: string
schema.history.internal.kafka.topic:
type: string
table.include.list:
type: string
description: Comma-separated list of tables to capture
snapshot.mode:
type: string
description: Snapshot mode (initial, schema_only, never, etc.)
ConnectorInfo:
type: object
properties:
name:
type: string
config:
type: object
additionalProperties:
type: string
tasks:
type: array
items:
type: object
properties:
connector:
type: string
task:
type: integer
type:
type: string
enum: [source, sink]
ConnectorStatus:
type: object
properties:
name:
type: string
connector:
type: object
properties:
state:
type: string
enum: [UNASSIGNED, RUNNING, PAUSED, FAILED, STOPPED]
worker_id:
type: string
tasks:
type: array
items:
$ref: '#/components/schemas/TaskStatus'
type:
type: string
TaskInfo:
type: object
properties:
id:
type: object
properties:
connector:
type: string
task:
type: integer
config:
type: object
additionalProperties:
type: string
TaskStatus:
type: object
properties:
id:
type: integer
state:
type: string
enum: [UNASSIGNED, RUNNING, PAUSED, FAILED]
worker_id:
type: string
trace:
type: string