...
Code Block | ||||
---|---|---|---|---|
| ||||
# This already exists in production /connector-plugins: get: # Existing behavior, will not repeat it here summary: Lists available Connector plugins # Newly Proposed Endpoints /plugins: get: summary: Returns plugin descriptions of all types responses: '200': description: A list of plugins content: application/json: schema: # Consistent with existing "/connector-plugins" endpoint type: array items: type: object properties: class: type: string description: Plugin class name (e.g. "io.confluent.connect.hdfs.HdfsSinkConnector") type: type: string description: The type of the plugin ("source"|"sink" for connectors, and converter, header-converter, transformation, config-provider, connect-rest-extension for other types) version: type: string description: Version of the connector /plugins/{plugin-type}: get: summary: Returns plugin descriptions of the given type parameters: -in: path name: plugin-type schema: type: string required: true description: plugin-type can be one of connector, converter, header-converter, transformation, config-provider, connect-rest-extension responses: '200': description: A list of plugins content: application/json: schema: # Consistent with existing "/connector-plugins" endpoint type: array items: type: object properties: class: type: string description: Plugin class name (e.g. "io.confluent.connect.hdfs.HdfsSinkConnector") type: type: string description: The type of the plugin ("source"|"sink" for connectors, and converter, header-converter, transformation, config-provider, connect-rest-extension for other types) version: type: string description: Version of the connector '400': description: Invalid request, such as unknown plugin type, as constructed with existing ConnectRestException content: application/json: schema: # Consistent with https://docs.confluent.io/platform/current/connect/references/restapi.html#status-and-errors type: object properties: error_code: type: integer description: HTTP Error code (e.g. 400). message: type: string description: Human readable message to suggest action to caller. |
For example, clients can query SMTs with:
Code Block |
---|
GET /plugins/transformation
200 OK
[
{
"class": "org.apache.kafka.connect.transforms.MaskField"
"type": "transformation"
"version": "1.0"
},
{
"class": "org.apache.kafka.connect.transforms.HoistField"
"type": "transformation"
"version": "2.0"
}
] |
Proposed Changes
The new endpoints are described in the API Spec above.
...
Future plugins will be expected to be reported in the generic `/plugins` endpoint. It would also be expected that the plugin-type be reported via their own `/plugins/{plugin-type}` endpoints.
Deprecation of existing endpoint GET /connector-plugins
It is further proposed that the existing endpoint `GET /connector-plugins` is deprecated. While there is no hurry to remove it from the codebase, it will be redundant to this new, more generally useful endpoint. Marking deprecation with the introduction of the new feature will give clients as much time as possible to migrate, giving the maintainers more flexibility to remove the old endpoint when they deem necessary.
Rejected Alternatives
Limiting scope of KIP to just SMTs
...