> For the complete documentation index, see [llms.txt](https://docs.lenses.io/latest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lenses.io/latest/devx/6.0/resources/api-reference/lenses-api-spec/applications/kafka-connectors.md).

# Kafka Connectors

{% openapi src="/files/pSQv30vqXY5e6hKueE26" path="/api/v1/environments/{name}/proxy/api/v1/resource/kafka/connect/{connect-cluster-name}/connector/{connector-name}" method="get" %}
[swagger.json](https://3471212993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJpmk4J5g3Kj2RRRpYUrl%2Fuploads%2FaEDFjsed263TQBZDAUpe%2Fswagger.json?alt=media\&token=49beb224-be66-47ad-9aec-e44c9355c84a)
{% endopenapi %}

## GET /api/v1/environments/{name}/proxy/api/kafka-connect/connectors

>

```json
{"openapi":"3.0.3","info":{"title":"Lenses HQ API","version":"v0.1.0"},"tags":[],"servers":[{"url":"{server}/api","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"HttpDataResponse_HttpConnectorListItem":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/HttpConnectorListItem"}}}},"HttpConnectorListItem":{"required":["name","lrn","cluster"],"type":"object","properties":{"name":{"type":"string"},"lrn":{"type":"string"},"cluster":{"type":"string"},"state":{"$ref":"#/components/schemas/ConnectStatus"},"tasks":{"type":"array","items":{"$ref":"#/components/schemas/HttpSimpleTaskItem"}},"className":{"type":"string"},"type":{"type":"string"},"author":{"type":"string"},"icon":{"type":"string"}}},"ConnectStatus":{"type":"string","enum":["RUNNING","UNASSIGNED","PAUSED","FAILED","RESTARTING","STOPPED"]},"HttpSimpleTaskItem":{"required":["id","state"],"type":"object","properties":{"id":{"type":"integer"},"state":{"$ref":"#/components/schemas/ConnectStatus"}}},"BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"}}},"Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{name}/proxy/api/kafka-connect/connectors":{"get":{"tags":["Kafka Connect"],"operationId":"List Connectors","parameters":[{"name":"cluster","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"className","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpDataResponse_HttpConnectorListItem"}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}}}
```

## POST /api/v1/environments/{name}/proxy/api/kafka-connect/connectors

>

```json
{"openapi":"3.0.3","info":{"title":"Lenses HQ API","version":"v0.1.0"},"tags":[],"servers":[{"url":"{server}/api","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"HttpNewConnector":{"required":["name","cluster","configuration"],"type":"object","properties":{"name":{"type":"string","minLength":1},"cluster":{"type":"string","minLength":1},"configuration":{"$ref":"#/components/schemas/Map_Refined_String"}}},"Map_Refined_String":{"type":"object","additionalProperties":{"type":"string"}},"BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"}}},"Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{name}/proxy/api/kafka-connect/connectors":{"post":{"tags":["Kafka Connect"],"operationId":"Create Connector","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpNewConnector"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}}}
```

## PUT /api/v1/environments/{name}/proxy/api/kafka-connect/clusters/{cluster}/connectors/{connector}/{action}

>

```json
{"openapi":"3.0.3","info":{"title":"Lenses HQ API","version":"v0.1.0"},"tags":[],"servers":[{"url":"{server}/api","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"ConnectorStateSet":{"type":"string","enum":["start","stop","restart","pause","resume"]},"BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"}}},"Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{name}/proxy/api/kafka-connect/clusters/{cluster}/connectors/{connector}/{action}":{"put":{"tags":["Kafka Connect"],"operationId":"Connector State","parameters":[{"name":"cluster","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connector","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"action","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ConnectorStateSet"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}}}
```

## PUT /api/v1/environments/{name}/proxy/api/kafka-connect/clusters/{cluster}/connectors/{connector}/tasks/{p1}/restart

>

```json
{"openapi":"3.0.3","info":{"title":"Lenses HQ API","version":"v0.1.0"},"servers":[{"url":"{server}/api","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"}}},"Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{name}/proxy/api/kafka-connect/clusters/{cluster}/connectors/{connector}/tasks/{p1}/restart":{"put":{"operationId":"Connector Task Restart","parameters":[{"name":"cluster","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connector","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"p1","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}}}
```

## DELETE /api/v1/environments/{name}/proxy/api/kafka-connect/clusters/{cluster}/connectors/{connector}

>

```json
{"openapi":"3.0.3","info":{"title":"Lenses HQ API","version":"v0.1.0"},"tags":[],"servers":[{"url":"{server}/api","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"}}},"Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{name}/proxy/api/kafka-connect/clusters/{cluster}/connectors/{connector}":{"delete":{"tags":["Kafka Connect"],"operationId":"Delete Connector","parameters":[{"name":"cluster","in":"path","required":true,"schema":{"type":"string","minLength":1}},{"name":"connector","in":"path","required":true,"schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}}}
```

## POST /api/v1/environments/{name}/proxy/api/kafka-connect/validate

>

```json
{"openapi":"3.0.3","info":{"title":"Lenses HQ API","version":"v0.1.0"},"tags":[],"servers":[{"url":"{server}/api","variables":{"server":{"default":"https://api.example.com"}}}],"security":[{"bearerAuth":[]},{"cookieAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The bearer token can be obtained by creating a ServiceAccount.\n"},"cookieAuth":{"type":"apiKey","in":"cookie","name":"session_id","description":"On successful SAML/SSO login, the API will set a cookie with a session id.\n"}},"schemas":{"HttpValidateConnector":{"required":["name","cluster","configuration"],"type":"object","properties":{"name":{"type":"string"},"cluster":{"type":"string"},"configuration":{"$ref":"#/components/schemas/Map_String_String"}}},"Map_String_String":{"type":"object","additionalProperties":{"type":"string"}},"HttpConnectorValidationResponse":{"required":["class"],"type":"object","properties":{"class":{"type":"string"},"configuration":{"type":"array","items":{"$ref":"#/components/schemas/HttpConnectorValidationField"}}}},"HttpConnectorValidationField":{"required":["name","required","order","documentation","visible"],"type":"object","properties":{"name":{"type":"string"},"required":{"type":"boolean"},"order":{"type":"integer"},"documentation":{"type":"string"},"errors":{"type":"array","items":{"type":"string"}},"visible":{"type":"boolean"},"value":{"type":"string"},"defaultValue":{"type":"string"}}},"BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"}}},"Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}},"InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{name}/proxy/api/kafka-connect/validate":{"post":{"tags":["Kafka Connect"],"operationId":"Validate Connector","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpValidateConnector"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HttpConnectorValidationResponse"}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalError"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lenses.io/latest/devx/6.0/resources/api-reference/lenses-api-spec/applications/kafka-connectors.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
