# Connections > Kafka

APIs for managing connections that use the `Kafka` template.

DEPRECATED: This endpoint is deprecated and will be removed in a future version. Use provisioning APIs instead.

## List available connections

> Returns the list of available connections

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_KafkaConnections","description":"APIs for managing connections that use the `Kafka` template.\n\n DEPRECATED: This endpoint is deprecated and will be removed in a future version. Use provisioning APIs instead.\n"}],"servers":[{"url":"{server}","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":{"agent_ConnectionSummaryResponseWithLrn":{"required":["name","lrn","templateName","templateVersion","deletable"],"type":"object","properties":{"name":{"type":"string"},"lrn":{"type":"string"},"templateName":{"type":"string"},"templateVersion":{"type":"integer"},"tags":{"type":"array","items":{"type":"string"}},"deletable":{"type":"boolean"}}},"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v1/connection/connection-templates/Kafka/connections":{"get":{"tags":["agent_KafkaConnections"],"summary":"List available connections","description":"Returns the list of available connections","operationId":"listKafkaConnectionsAgent","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/agent_ConnectionSummaryResponseWithLrn"}}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## Add a new connection

> Adds a new connection

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_KafkaConnections","description":"APIs for managing connections that use the `Kafka` template.\n\n DEPRECATED: This endpoint is deprecated and will be removed in a future version. Use provisioning APIs instead.\n"}],"servers":[{"url":"{server}","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":{"agent_KafkaConnectionAddRequest":{"required":["name","configurationObject"],"type":"object","properties":{"name":{"type":"string","description":"Name of the connection"},"tags":{"type":"array","items":{"type":"string"}},"configurationObject":{"$ref":"#/components/schemas/agent_KafkaConnectionConfiguration"}}},"agent_KafkaConnectionConfiguration":{"required":["kafkaBootstrapServers"],"type":"object","properties":{"kafkaBootstrapServers":{"type":"array","items":{"type":"string"},"description":"Comma separated list of protocol://host:port to use for initial connection to Kafka."},"protocol":{"type":"string","description":"Kafka security protocol","enum":["PLAINTEXT","SSL","SASL_PLAINTEXT","SASL_SSL"]},"sslKeystore":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}},"description":"SSL keystore file"},"sslKeystorePassword":{"type":"string","description":"Password to the keystore","format":"password"},"sslKeyPassword":{"type":"string","description":"Key password for the keystore","format":"password"},"sslTruststore":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}},"description":"SSL truststore file"},"sslTruststorePassword":{"type":"string","description":"Password to the truststore","format":"password"},"saslMechanism":{"type":"string","description":"Mechanism to use when authenticated using SASL"},"saslJaasConfig":{"type":"string","description":"JAAS Login module configuration for SASL","format":"password"},"keytab":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}},"description":"Kerberos keytab file"},"additionalProperties":{"type":"object","additionalProperties":{"type":"string"}},"metricsType":{"type":"string","description":"Metrics type","enum":["JMX","JOLOKIAG","JOLOKIAP","AWS"]},"metricsPort":{"type":"integer","description":"Default port number for metrics connection (JMX and JOLOKIA)"},"metricsSsl":{"type":"boolean","description":"Flag to enable SSL for metrics connections"},"metricsUsername":{"type":"string","description":"The username for metrics connections"},"metricsPassword":{"type":"string","description":"The password for metrics connections","format":"password"},"metricsHttpSuffix":{"type":"string","description":"HTTP URL suffix for Jolokia or AWS metrics"},"metricsHttpTimeout":{"type":"integer","description":"HTTP Request timeout (ms) for Jolokia or AWS metrics"},"metricsCustomUrlMappings":{"type":"object","description":"Mapping from node URL to metrics URL, allows overriding metrics target on a per-node basis","additionalProperties":{"type":"string"}},"metricsCustomPortMappings":{"type":"object","description":"DEPRECATED","additionalProperties":{"type":"string"}},"metricsRateLimitingMaxRetries":{"type":"integer","description":"HTTP retries when 429 is returned for Jolokia or AWS metrics"},"metricsRateLimitingBackoff":{"type":"integer","description":"The backoff interval (ms) when 429 is returned for Jolokia or AWS metrics"}}},"agent_AddConnectionResponse":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the connection"}}},"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v1/connection/connection-templates/Kafka/connections":{"post":{"tags":["agent_KafkaConnections"],"summary":"Add a new connection","description":"Adds a new connection","operationId":"createKafkaConnection","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_KafkaConnectionAddRequest"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_AddConnectionResponse"}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## Add a new connection V2

> Adds a new connection V2

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_KafkaConnections","description":"APIs for managing connections that use the `Kafka` template.\n\n DEPRECATED: This endpoint is deprecated and will be removed in a future version. Use provisioning APIs instead.\n"}],"servers":[{"url":"{server}","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":{"agent_KafkaConnectionAddRequestV2":{"required":["name","configuration"],"type":"object","properties":{"name":{"type":"string","description":"Name of the connection"},"tags":{"type":"array","items":{"type":"string"}},"configuration":{"$ref":"#/components/schemas/agent_KafkaConnectionConfigurationV2"}}},"agent_KafkaConnectionConfigurationV2":{"required":["kafkaBootstrapServers"],"type":"object","properties":{"kafkaBootstrapServers":{"required":["value"],"type":"object","properties":{"value":{"type":"array","items":{"type":"string"}}},"description":"Comma separated list of protocol://host:port to use for initial connection to Kafka."},"protocol":{"required":["value"],"type":"object","properties":{"value":{"type":"string","enum":["PLAINTEXT","SSL","SASL_PLAINTEXT","SASL_SSL"]}},"description":"Kafka security protocol"},"sslKeystore":{"required":["value"],"type":"object","properties":{"value":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}}}},"description":"SSL keystore file"},"sslKeystorePassword":{"required":["value"],"type":"object","properties":{"value":{"type":"string","format":"password"}},"description":"Password to the keystore"},"sslKeyPassword":{"required":["value"],"type":"object","properties":{"value":{"type":"string","format":"password"}},"description":"Key password for the keystore"},"sslTruststore":{"required":["value"],"type":"object","properties":{"value":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}}}},"description":"SSL truststore file"},"sslTruststorePassword":{"required":["value"],"type":"object","properties":{"value":{"type":"string","format":"password"}},"description":"Password to the truststore"},"saslMechanism":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}},"description":"Mechanism to use when authenticated using SASL"},"saslJaasConfig":{"required":["value"],"type":"object","properties":{"value":{"type":"string","format":"password"}},"description":"JAAS Login module configuration for SASL"},"keytab":{"required":["value"],"type":"object","properties":{"value":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}}}},"description":"Kerberos keytab file"},"additionalProperties":{"required":["value"],"type":"object","properties":{"value":{"type":"object","additionalProperties":{"type":"string"}}}},"metricsType":{"required":["value"],"type":"object","properties":{"value":{"type":"string","enum":["JMX","JOLOKIAG","JOLOKIAP","AWS"]}},"description":"Metrics type"},"metricsPort":{"required":["value"],"type":"object","properties":{"value":{"type":"integer"}},"description":"Default port number for metrics connection (JMX and JOLOKIA)"},"metricsSsl":{"required":["value"],"type":"object","properties":{"value":{"type":"boolean"}},"description":"Flag to enable SSL for metrics connections"},"metricsUsername":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}},"description":"The username for metrics connections"},"metricsPassword":{"required":["value"],"type":"object","properties":{"value":{"type":"string","format":"password"}},"description":"The password for metrics connections"},"metricsHttpSuffix":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}},"description":"HTTP URL suffix for Jolokia or AWS metrics"},"metricsHttpTimeout":{"required":["value"],"type":"object","properties":{"value":{"type":"integer"}},"description":"HTTP Request timeout (ms) for Jolokia or AWS metrics"},"metricsCustomUrlMappings":{"required":["value"],"type":"object","properties":{"value":{"type":"object","additionalProperties":{"type":"string"}}},"description":"Mapping from node URL to metrics URL, allows overriding metrics target on a per-node basis"},"metricsCustomPortMappings":{"required":["value"],"type":"object","properties":{"value":{"type":"object","additionalProperties":{"type":"string"}}},"description":"DEPRECATED"},"metricsRateLimitingMaxRetries":{"required":["value"],"type":"object","properties":{"value":{"type":"integer"}},"description":"HTTP retries when 429 is returned for Jolokia or AWS metrics"},"metricsRateLimitingBackoff":{"required":["value"],"type":"object","properties":{"value":{"type":"integer"}},"description":"The backoff interval (ms) when 429 is returned for Jolokia or AWS metrics"}}},"agent_AddConnectionResponse":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the connection"}}},"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v2/connection/connection-templates/Kafka/connections":{"post":{"tags":["agent_KafkaConnections"],"summary":"Add a new connection V2","description":"Adds a new connection V2","operationId":"createKafkaConnectionV2","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_KafkaConnectionAddRequestV2"}}},"required":true},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_AddConnectionResponse"}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## Validate a connection

> Validates the connection

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_KafkaConnections","description":"APIs for managing connections that use the `Kafka` template.\n\n DEPRECATED: This endpoint is deprecated and will be removed in a future version. Use provisioning APIs instead.\n"}],"servers":[{"url":"{server}","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":{"agent_KafkaConnectionTestRequest":{"required":["name","configurationObject"],"type":"object","properties":{"name":{"type":"string","description":"Name of the connection"},"configurationObject":{"$ref":"#/components/schemas/agent_KafkaConnectionConfiguration"},"update":{"type":"boolean","description":"*true* if testing an update to an existing connection, *false* if testing a new connection"}}},"agent_KafkaConnectionConfiguration":{"required":["kafkaBootstrapServers"],"type":"object","properties":{"kafkaBootstrapServers":{"type":"array","items":{"type":"string"},"description":"Comma separated list of protocol://host:port to use for initial connection to Kafka."},"protocol":{"type":"string","description":"Kafka security protocol","enum":["PLAINTEXT","SSL","SASL_PLAINTEXT","SASL_SSL"]},"sslKeystore":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}},"description":"SSL keystore file"},"sslKeystorePassword":{"type":"string","description":"Password to the keystore","format":"password"},"sslKeyPassword":{"type":"string","description":"Key password for the keystore","format":"password"},"sslTruststore":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}},"description":"SSL truststore file"},"sslTruststorePassword":{"type":"string","description":"Password to the truststore","format":"password"},"saslMechanism":{"type":"string","description":"Mechanism to use when authenticated using SASL"},"saslJaasConfig":{"type":"string","description":"JAAS Login module configuration for SASL","format":"password"},"keytab":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}},"description":"Kerberos keytab file"},"additionalProperties":{"type":"object","additionalProperties":{"type":"string"}},"metricsType":{"type":"string","description":"Metrics type","enum":["JMX","JOLOKIAG","JOLOKIAP","AWS"]},"metricsPort":{"type":"integer","description":"Default port number for metrics connection (JMX and JOLOKIA)"},"metricsSsl":{"type":"boolean","description":"Flag to enable SSL for metrics connections"},"metricsUsername":{"type":"string","description":"The username for metrics connections"},"metricsPassword":{"type":"string","description":"The password for metrics connections","format":"password"},"metricsHttpSuffix":{"type":"string","description":"HTTP URL suffix for Jolokia or AWS metrics"},"metricsHttpTimeout":{"type":"integer","description":"HTTP Request timeout (ms) for Jolokia or AWS metrics"},"metricsCustomUrlMappings":{"type":"object","description":"Mapping from node URL to metrics URL, allows overriding metrics target on a per-node basis","additionalProperties":{"type":"string"}},"metricsCustomPortMappings":{"type":"object","description":"DEPRECATED","additionalProperties":{"type":"string"}},"metricsRateLimitingMaxRetries":{"type":"integer","description":"HTTP retries when 429 is returned for Jolokia or AWS metrics"},"metricsRateLimitingBackoff":{"type":"integer","description":"The backoff interval (ms) when 429 is returned for Jolokia or AWS metrics"}}},"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v1/connection/connection-templates/Kafka/connections/test":{"post":{"tags":["agent_KafkaConnections"],"summary":"Validate a connection","description":"Validates the connection","operationId":"testKafkaConnection","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_KafkaConnectionTestRequest"}}},"required":true},"responses":{"200":{"description":""},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## Validate a connection V2

> Validates the connection V2

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_KafkaConnections","description":"APIs for managing connections that use the `Kafka` template.\n\n DEPRECATED: This endpoint is deprecated and will be removed in a future version. Use provisioning APIs instead.\n"}],"servers":[{"url":"{server}","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":{"agent_KafkaConnectionTestRequestV2":{"required":["name","configuration"],"type":"object","properties":{"name":{"type":"string","description":"Name of the connection"},"configuration":{"$ref":"#/components/schemas/agent_KafkaConnectionConfigurationV2"},"update":{"type":"boolean","description":"*true* if testing an update to an existing connection, *false* if testing a new connection"}}},"agent_KafkaConnectionConfigurationV2":{"required":["kafkaBootstrapServers"],"type":"object","properties":{"kafkaBootstrapServers":{"required":["value"],"type":"object","properties":{"value":{"type":"array","items":{"type":"string"}}},"description":"Comma separated list of protocol://host:port to use for initial connection to Kafka."},"protocol":{"required":["value"],"type":"object","properties":{"value":{"type":"string","enum":["PLAINTEXT","SSL","SASL_PLAINTEXT","SASL_SSL"]}},"description":"Kafka security protocol"},"sslKeystore":{"required":["value"],"type":"object","properties":{"value":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}}}},"description":"SSL keystore file"},"sslKeystorePassword":{"required":["value"],"type":"object","properties":{"value":{"type":"string","format":"password"}},"description":"Password to the keystore"},"sslKeyPassword":{"required":["value"],"type":"object","properties":{"value":{"type":"string","format":"password"}},"description":"Key password for the keystore"},"sslTruststore":{"required":["value"],"type":"object","properties":{"value":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}}}},"description":"SSL truststore file"},"sslTruststorePassword":{"required":["value"],"type":"object","properties":{"value":{"type":"string","format":"password"}},"description":"Password to the truststore"},"saslMechanism":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}},"description":"Mechanism to use when authenticated using SASL"},"saslJaasConfig":{"required":["value"],"type":"object","properties":{"value":{"type":"string","format":"password"}},"description":"JAAS Login module configuration for SASL"},"keytab":{"required":["value"],"type":"object","properties":{"value":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}}}},"description":"Kerberos keytab file"},"additionalProperties":{"required":["value"],"type":"object","properties":{"value":{"type":"object","additionalProperties":{"type":"string"}}}},"metricsType":{"required":["value"],"type":"object","properties":{"value":{"type":"string","enum":["JMX","JOLOKIAG","JOLOKIAP","AWS"]}},"description":"Metrics type"},"metricsPort":{"required":["value"],"type":"object","properties":{"value":{"type":"integer"}},"description":"Default port number for metrics connection (JMX and JOLOKIA)"},"metricsSsl":{"required":["value"],"type":"object","properties":{"value":{"type":"boolean"}},"description":"Flag to enable SSL for metrics connections"},"metricsUsername":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}},"description":"The username for metrics connections"},"metricsPassword":{"required":["value"],"type":"object","properties":{"value":{"type":"string","format":"password"}},"description":"The password for metrics connections"},"metricsHttpSuffix":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}},"description":"HTTP URL suffix for Jolokia or AWS metrics"},"metricsHttpTimeout":{"required":["value"],"type":"object","properties":{"value":{"type":"integer"}},"description":"HTTP Request timeout (ms) for Jolokia or AWS metrics"},"metricsCustomUrlMappings":{"required":["value"],"type":"object","properties":{"value":{"type":"object","additionalProperties":{"type":"string"}}},"description":"Mapping from node URL to metrics URL, allows overriding metrics target on a per-node basis"},"metricsCustomPortMappings":{"required":["value"],"type":"object","properties":{"value":{"type":"object","additionalProperties":{"type":"string"}}},"description":"DEPRECATED"},"metricsRateLimitingMaxRetries":{"required":["value"],"type":"object","properties":{"value":{"type":"integer"}},"description":"HTTP retries when 429 is returned for Jolokia or AWS metrics"},"metricsRateLimitingBackoff":{"required":["value"],"type":"object","properties":{"value":{"type":"integer"}},"description":"The backoff interval (ms) when 429 is returned for Jolokia or AWS metrics"}}},"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v2/connection/connection-templates/Kafka/connections/test":{"post":{"tags":["agent_KafkaConnections"],"summary":"Validate a connection V2","description":"Validates the connection V2","operationId":"testKafkaConnectionV2","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_KafkaConnectionTestRequestV2"}}},"required":true},"responses":{"200":{"description":""},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## Get connection details

> Returns the connection details

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_KafkaConnections","description":"APIs for managing connections that use the `Kafka` template.\n\n DEPRECATED: This endpoint is deprecated and will be removed in a future version. Use provisioning APIs instead.\n"}],"servers":[{"url":"{server}","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":{"agent_KafkaConnectionResponse":{"required":["name","lrn","templateVersion","templateName","builtIn","createdBy","createdAt","modifiedBy","modifiedAt","configurationObject","deletable"],"type":"object","properties":{"name":{"type":"string","description":"Name of the connection"},"lrn":{"type":"string"},"templateVersion":{"type":"integer"},"templateName":{"type":"string","description":"The [template](#operation/listConnectionTemplates) of the connection"},"builtIn":{"type":"boolean"},"createdBy":{"type":"string"},"createdAt":{"type":"integer","format":"int64"},"modifiedBy":{"type":"string"},"modifiedAt":{"type":"integer","format":"int64"},"configurationObject":{"$ref":"#/components/schemas/agent_KafkaConnectionConfiguration"},"tags":{"type":"array","items":{"type":"string"}},"deletable":{"type":"boolean"}}},"agent_KafkaConnectionConfiguration":{"required":["kafkaBootstrapServers"],"type":"object","properties":{"kafkaBootstrapServers":{"type":"array","items":{"type":"string"},"description":"Comma separated list of protocol://host:port to use for initial connection to Kafka."},"protocol":{"type":"string","description":"Kafka security protocol","enum":["PLAINTEXT","SSL","SASL_PLAINTEXT","SASL_SSL"]},"sslKeystore":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}},"description":"SSL keystore file"},"sslKeystorePassword":{"type":"string","description":"Password to the keystore","format":"password"},"sslKeyPassword":{"type":"string","description":"Key password for the keystore","format":"password"},"sslTruststore":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}},"description":"SSL truststore file"},"sslTruststorePassword":{"type":"string","description":"Password to the truststore","format":"password"},"saslMechanism":{"type":"string","description":"Mechanism to use when authenticated using SASL"},"saslJaasConfig":{"type":"string","description":"JAAS Login module configuration for SASL","format":"password"},"keytab":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}},"description":"Kerberos keytab file"},"additionalProperties":{"type":"object","additionalProperties":{"type":"string"}},"metricsType":{"type":"string","description":"Metrics type","enum":["JMX","JOLOKIAG","JOLOKIAP","AWS"]},"metricsPort":{"type":"integer","description":"Default port number for metrics connection (JMX and JOLOKIA)"},"metricsSsl":{"type":"boolean","description":"Flag to enable SSL for metrics connections"},"metricsUsername":{"type":"string","description":"The username for metrics connections"},"metricsPassword":{"type":"string","description":"The password for metrics connections","format":"password"},"metricsHttpSuffix":{"type":"string","description":"HTTP URL suffix for Jolokia or AWS metrics"},"metricsHttpTimeout":{"type":"integer","description":"HTTP Request timeout (ms) for Jolokia or AWS metrics"},"metricsCustomUrlMappings":{"type":"object","description":"Mapping from node URL to metrics URL, allows overriding metrics target on a per-node basis","additionalProperties":{"type":"string"}},"metricsCustomPortMappings":{"type":"object","description":"DEPRECATED","additionalProperties":{"type":"string"}},"metricsRateLimitingMaxRetries":{"type":"integer","description":"HTTP retries when 429 is returned for Jolokia or AWS metrics"},"metricsRateLimitingBackoff":{"type":"integer","description":"The backoff interval (ms) when 429 is returned for Jolokia or AWS metrics"}}},"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v1/connection/connection-templates/Kafka/connections/{name}":{"get":{"tags":["agent_KafkaConnections"],"summary":"Get connection details","description":"Returns the connection details","operationId":"getKafkaConnectionAgent","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","description":"The name of the connection","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_KafkaConnectionResponse"}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## Update connection details

> Updates the connection details

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_KafkaConnections","description":"APIs for managing connections that use the `Kafka` template.\n\n DEPRECATED: This endpoint is deprecated and will be removed in a future version. Use provisioning APIs instead.\n"}],"servers":[{"url":"{server}","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":{"agent_KafkaConnectionUpsertRequest":{"required":["configurationObject"],"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}},"configurationObject":{"$ref":"#/components/schemas/agent_KafkaConnectionConfiguration"}}},"agent_KafkaConnectionConfiguration":{"required":["kafkaBootstrapServers"],"type":"object","properties":{"kafkaBootstrapServers":{"type":"array","items":{"type":"string"},"description":"Comma separated list of protocol://host:port to use for initial connection to Kafka."},"protocol":{"type":"string","description":"Kafka security protocol","enum":["PLAINTEXT","SSL","SASL_PLAINTEXT","SASL_SSL"]},"sslKeystore":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}},"description":"SSL keystore file"},"sslKeystorePassword":{"type":"string","description":"Password to the keystore","format":"password"},"sslKeyPassword":{"type":"string","description":"Key password for the keystore","format":"password"},"sslTruststore":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}},"description":"SSL truststore file"},"sslTruststorePassword":{"type":"string","description":"Password to the truststore","format":"password"},"saslMechanism":{"type":"string","description":"Mechanism to use when authenticated using SASL"},"saslJaasConfig":{"type":"string","description":"JAAS Login module configuration for SASL","format":"password"},"keytab":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}},"description":"Kerberos keytab file"},"additionalProperties":{"type":"object","additionalProperties":{"type":"string"}},"metricsType":{"type":"string","description":"Metrics type","enum":["JMX","JOLOKIAG","JOLOKIAP","AWS"]},"metricsPort":{"type":"integer","description":"Default port number for metrics connection (JMX and JOLOKIA)"},"metricsSsl":{"type":"boolean","description":"Flag to enable SSL for metrics connections"},"metricsUsername":{"type":"string","description":"The username for metrics connections"},"metricsPassword":{"type":"string","description":"The password for metrics connections","format":"password"},"metricsHttpSuffix":{"type":"string","description":"HTTP URL suffix for Jolokia or AWS metrics"},"metricsHttpTimeout":{"type":"integer","description":"HTTP Request timeout (ms) for Jolokia or AWS metrics"},"metricsCustomUrlMappings":{"type":"object","description":"Mapping from node URL to metrics URL, allows overriding metrics target on a per-node basis","additionalProperties":{"type":"string"}},"metricsCustomPortMappings":{"type":"object","description":"DEPRECATED","additionalProperties":{"type":"string"}},"metricsRateLimitingMaxRetries":{"type":"integer","description":"HTTP retries when 429 is returned for Jolokia or AWS metrics"},"metricsRateLimitingBackoff":{"type":"integer","description":"The backoff interval (ms) when 429 is returned for Jolokia or AWS metrics"}}},"agent_AddConnectionResponse":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the connection"}}},"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Conflict":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v1/connection/connection-templates/Kafka/connections/{name}":{"put":{"tags":["agent_KafkaConnections"],"summary":"Update connection details","description":"Updates the connection details","operationId":"updateKafkaConnectionAgent1","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","description":"The name of the connection","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_KafkaConnectionUpsertRequest"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_AddConnectionResponse"}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"409":{"description":"The supplied identifier is already being used by another resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Conflict"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## Delete a connection

> Deletes the connection

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_KafkaConnections","description":"APIs for managing connections that use the `Kafka` template.\n\n DEPRECATED: This endpoint is deprecated and will be removed in a future version. Use provisioning APIs instead.\n"}],"servers":[{"url":"{server}","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":{"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Conflict":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v1/connection/connection-templates/Kafka/connections/{name}":{"delete":{"tags":["agent_KafkaConnections"],"summary":"Delete a connection","description":"Deletes the connection","operationId":"deleteKafkaConnectionAgent","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","description":"The name of the connection","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":""},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"409":{"description":"The supplied identifier is already being used by another resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Conflict"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```

## Update connection details V2

> Updates the connection details V2

```json
{"openapi":"3.0.0","info":{"title":"Lenses API","version":"6.1"},"tags":[{"name":"agent_KafkaConnections","description":"APIs for managing connections that use the `Kafka` template.\n\n DEPRECATED: This endpoint is deprecated and will be removed in a future version. Use provisioning APIs instead.\n"}],"servers":[{"url":"{server}","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":{"agent_KafkaConnectionUpsertRequestV2":{"required":["configuration"],"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}},"configuration":{"$ref":"#/components/schemas/agent_KafkaConnectionConfigurationV2"}}},"agent_KafkaConnectionConfigurationV2":{"required":["kafkaBootstrapServers"],"type":"object","properties":{"kafkaBootstrapServers":{"required":["value"],"type":"object","properties":{"value":{"type":"array","items":{"type":"string"}}},"description":"Comma separated list of protocol://host:port to use for initial connection to Kafka."},"protocol":{"required":["value"],"type":"object","properties":{"value":{"type":"string","enum":["PLAINTEXT","SSL","SASL_PLAINTEXT","SASL_SSL"]}},"description":"Kafka security protocol"},"sslKeystore":{"required":["value"],"type":"object","properties":{"value":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}}}},"description":"SSL keystore file"},"sslKeystorePassword":{"required":["value"],"type":"object","properties":{"value":{"type":"string","format":"password"}},"description":"Password to the keystore"},"sslKeyPassword":{"required":["value"],"type":"object","properties":{"value":{"type":"string","format":"password"}},"description":"Key password for the keystore"},"sslTruststore":{"required":["value"],"type":"object","properties":{"value":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}}}},"description":"SSL truststore file"},"sslTruststorePassword":{"required":["value"],"type":"object","properties":{"value":{"type":"string","format":"password"}},"description":"Password to the truststore"},"saslMechanism":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}},"description":"Mechanism to use when authenticated using SASL"},"saslJaasConfig":{"required":["value"],"type":"object","properties":{"value":{"type":"string","format":"password"}},"description":"JAAS Login module configuration for SASL"},"keytab":{"required":["value"],"type":"object","properties":{"value":{"required":["fileId"],"type":"object","properties":{"fileId":{"type":"string","format":"uuid"}}}},"description":"Kerberos keytab file"},"additionalProperties":{"required":["value"],"type":"object","properties":{"value":{"type":"object","additionalProperties":{"type":"string"}}}},"metricsType":{"required":["value"],"type":"object","properties":{"value":{"type":"string","enum":["JMX","JOLOKIAG","JOLOKIAP","AWS"]}},"description":"Metrics type"},"metricsPort":{"required":["value"],"type":"object","properties":{"value":{"type":"integer"}},"description":"Default port number for metrics connection (JMX and JOLOKIA)"},"metricsSsl":{"required":["value"],"type":"object","properties":{"value":{"type":"boolean"}},"description":"Flag to enable SSL for metrics connections"},"metricsUsername":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}},"description":"The username for metrics connections"},"metricsPassword":{"required":["value"],"type":"object","properties":{"value":{"type":"string","format":"password"}},"description":"The password for metrics connections"},"metricsHttpSuffix":{"required":["value"],"type":"object","properties":{"value":{"type":"string"}},"description":"HTTP URL suffix for Jolokia or AWS metrics"},"metricsHttpTimeout":{"required":["value"],"type":"object","properties":{"value":{"type":"integer"}},"description":"HTTP Request timeout (ms) for Jolokia or AWS metrics"},"metricsCustomUrlMappings":{"required":["value"],"type":"object","properties":{"value":{"type":"object","additionalProperties":{"type":"string"}}},"description":"Mapping from node URL to metrics URL, allows overriding metrics target on a per-node basis"},"metricsCustomPortMappings":{"required":["value"],"type":"object","properties":{"value":{"type":"object","additionalProperties":{"type":"string"}}},"description":"DEPRECATED"},"metricsRateLimitingMaxRetries":{"required":["value"],"type":"object","properties":{"value":{"type":"integer"}},"description":"HTTP retries when 429 is returned for Jolokia or AWS metrics"},"metricsRateLimitingBackoff":{"required":["value"],"type":"object","properties":{"value":{"type":"integer"}},"description":"The backoff interval (ms) when 429 is returned for Jolokia or AWS metrics"}}},"agent_AddConnectionResponse":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the connection"}}},"agent_BadRequest":{"required":["error"],"type":"object","properties":{"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"error":{"type":"string"},"errorType":{"type":"string"}}},"agent_FieldError":{"required":["field","error"],"type":"object","properties":{"field":{"type":"string"},"error":{"type":"string"},"lineNumber":{"type":"integer"},"columnNumber":{"type":"integer"}}},"agent_Unauthorized":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_LicenseError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Forbidden":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_NotFound":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_Conflict":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}},"agent_InternalError":{"required":["error"],"type":"object","properties":{"error":{"type":"string"},"fields":{"type":"array","items":{"$ref":"#/components/schemas/agent_FieldError"}},"errorType":{"type":"string"}}}}},"paths":{"/api/v1/environments/{environment}/proxy/api/v2/connection/connection-templates/Kafka/connections/{name}":{"put":{"tags":["agent_KafkaConnections"],"summary":"Update connection details V2","description":"Updates the connection details V2","operationId":"updateKafkaConnection V2","parameters":[{"name":"environment","in":"path","required":true,"schema":{"type":"string"}},{"name":"name","in":"path","description":"The name of the connection","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_KafkaConnectionUpsertRequestV2"}}},"required":true},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_AddConnectionResponse"}}}},"400":{"description":"The request input was invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_BadRequest"}}}},"401":{"description":"Authentication error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Unauthorized"}}}},"402":{"description":"The purchased Lenses license does not provide access to this feature","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_LicenseError"}}}},"403":{"description":"Authorisation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Forbidden"}}}},"404":{"description":"The requested resource cannot be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_NotFound"}}}},"409":{"description":"The supplied identifier is already being used by another resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_Conflict"}}}},"500":{"description":"An internal server error has occurred","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent_InternalError"}}}}}}}}}
```
