Connections

APIs for managing connections to external systems.

Connections are used across various Lenses features including:

  • Core services

    • since Lenses 5.0, configuration of Kafka, Schema Registry, Kafka Connect, Zookeeper and Kerberos is defined dynamically as connections

  • Datasets

    • Elasticsearch and Postgres connections will be indexed by Lenses

  • Alert Channels and Audit Channels

    • Require an associated connection to the external system

Each external system is represented by a connection template which defines the configuration schema for the connection.

get

Lists all connections templates.

A connection's template defines the type of the connection, and the schema of it's configuration.

Path parameters
environmentstringRequired
Query parameters
kindstring · enumOptional

Filter by template kind

Possible values:
Responses
200Success
application/json
get
/api/v1/environments/{environment}/proxy/api/v1/connection/connection-templates
GET /api/v1/environments/{environment}/proxy/api/v1/connection/connection-templates HTTP/1.1
Host: 
Accept: */*
[
  {
    "name": "Kafka",
    "templateVersion": 1,
    "version": "text",
    "enabled": true,
    "builtIn": true,
    "category": "Connection",
    "type": "Not Applicable",
    "kind": "Not Applicable",
    "metadata": {
      "author": "text",
      "description": "text"
    },
    "configuration": [
      {
        "key": "text",
        "displayName": "text",
        "placeholder": "text",
        "description": "text",
        "type": {
          "name": "STRING",
          "displayName": "text"
        },
        "enumValues": [
          "text"
        ],
        "required": true,
        "mounted": true,
        "provided": true
      }
    ],
    "jsonSchema": {},
    "creatable": true
  }
]
get

Returns the list of available connections

Path parameters
environmentstringRequired
Responses
200Success
application/json
get
/api/v1/environments/{environment}/proxy/api/v1/connection/connections
GET /api/v1/environments/{environment}/proxy/api/v1/connection/connections HTTP/1.1
Host: 
Accept: */*
[
  {
    "name": "text",
    "lrn": "text",
    "templateName": "text",
    "templateVersion": 1,
    "tags": [
      "text"
    ],
    "deletable": true
  }
]
post

Adds a new connection

Path parameters
environmentstringRequired
Body
namestringRequired

Name of the connection

Example: the-connection
tagsstring[]Optional
templateNamestring · min: 1Required

The template of the connection

Example: Kafka
configurationObjectobjectOptional

The configuration of the connection. The schema of this object is defined by the template configuration

Responses
201Success
application/json
post
/api/v1/environments/{environment}/proxy/api/v1/connection/connections
POST /api/v1/environments/{environment}/proxy/api/v1/connection/connections HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 89

{
  "name": "the-connection",
  "tags": [
    "text"
  ],
  "templateName": "Kafka",
  "configurationObject": {}
}
{
  "name": "the-connection"
}
post

Adds a new connection

Path parameters
environmentstringRequired
Body
namestringRequired

Name of the connection

Example: the-connection
tagsstring[]Optional
templateNamestring · min: 1Required

The template of the connection

Example: Kafka
configurationobjectOptional

The configuration of the connection. The schema of this object is defined by the template configuration

Responses
201Success
application/json
post
/api/v1/environments/{environment}/proxy/api/v2/connection/connections
POST /api/v1/environments/{environment}/proxy/api/v2/connection/connections HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 83

{
  "name": "the-connection",
  "tags": [
    "text"
  ],
  "templateName": "Kafka",
  "configuration": {}
}
{
  "name": "the-connection"
}
post

Validates the connection

Path parameters
environmentstringRequired
Body
namestringRequired
templateNamestring · min: 1Required

The template of the connection

Example: Kafka
configurationObjectobjectOptional

The configuration of the connection. The schema of this object is defined by the template configuration

updatebooleanOptional

true if testing an update to an existing connection, false if testing a new connection

Responses
200Success

No content

post
/api/v1/environments/{environment}/proxy/api/v1/connection/connections/test
POST /api/v1/environments/{environment}/proxy/api/v1/connection/connections/test HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 77

{
  "name": "text",
  "templateName": "Kafka",
  "configurationObject": {},
  "update": true
}

No content

post

Validates the connection

Path parameters
environmentstringRequired
Body
namestringRequired
templateNamestring · min: 1Required

The template of the connection

Example: Kafka
configurationobjectOptional

The configuration of the connection. The schema of this object is defined by the template configuration

updatebooleanOptional

true if testing an update to an existing connection, false if testing a new connection

Responses
200Success

No content

post
/api/v1/environments/{environment}/proxy/api/v2/connection/connections/test
POST /api/v1/environments/{environment}/proxy/api/v2/connection/connections/test HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 71

{
  "name": "text",
  "templateName": "Kafka",
  "configuration": {},
  "update": true
}

No content

get

Returns the connection details

Path parameters
environmentstringRequired
namestringRequired

The name of the connection

Responses
200Success
application/json
get
/api/v1/environments/{environment}/proxy/api/v1/connection/connections/{name}
GET /api/v1/environments/{environment}/proxy/api/v1/connection/connections/{name} HTTP/1.1
Host: 
Accept: */*
{
  "name": "the-connection",
  "lrn": "the-connection",
  "templateVersion": 1,
  "templateName": "Kafka",
  "builtIn": true,
  "createdBy": "text",
  "createdAt": 1,
  "modifiedBy": "text",
  "modifiedAt": 1,
  "configurationObject": {},
  "tags": [
    "text"
  ],
  "deletable": true
}
put

Updates the connection details

Path parameters
environmentstringRequired
namestringRequired

The name of the connection

Body
tagsstring[]Optional
templateNamestring · min: 1Optional

The template of the connection

Example: Kafka
configurationObjectobjectOptional

The configuration of the connection. The schema of this object is defined by the template configuration

Responses
200Success
application/json
put
/api/v1/environments/{environment}/proxy/api/v1/connection/connections/{name}
PUT /api/v1/environments/{environment}/proxy/api/v1/connection/connections/{name} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 65

{
  "tags": [
    "text"
  ],
  "templateName": "Kafka",
  "configurationObject": {}
}
{
  "name": "the-connection"
}
delete

Deletes the connection

Path parameters
environmentstringRequired
namestringRequired

The name of the connection

Responses
200Success

No content

delete
/api/v1/environments/{environment}/proxy/api/v1/connection/connections/{name}
DELETE /api/v1/environments/{environment}/proxy/api/v1/connection/connections/{name} HTTP/1.1
Host: 
Accept: */*

No content

get

Returns the connection details

Path parameters
environmentstringRequired
namestringRequired

The name of the connection

Responses
200Success
application/json
get
/api/v1/environments/{environment}/proxy/api/v2/connection/connections/{name}
GET /api/v1/environments/{environment}/proxy/api/v2/connection/connections/{name} HTTP/1.1
Host: 
Accept: */*
{
  "name": "the-connection",
  "lrn": "Lenses Resource Name",
  "templateVersion": 1,
  "templateName": "Kafka",
  "builtIn": true,
  "createdBy": "text",
  "createdAt": 1,
  "modifiedBy": "text",
  "modifiedAt": 1,
  "configuration": {},
  "tags": [
    "text"
  ],
  "deletable": true
}
put

Updates the connection details

Path parameters
environmentstringRequired
namestringRequired

The name of the connection

Body
tagsstring[]Optional
templateNamestring · min: 1Optional
configurationobjectOptional
Responses
200Success
application/json
put
/api/v1/environments/{environment}/proxy/api/v2/connection/connections/{name}
PUT /api/v1/environments/{environment}/proxy/api/v2/connection/connections/{name} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 58

{
  "tags": [
    "text"
  ],
  "templateName": "text",
  "configuration": {}
}
{
  "name": "the-connection"
}
post

Upload a file

Path parameters
environmentstringRequired
Body
filestring · binaryRequired
Responses
200Success
application/json
post
/api/v1/environments/{environment}/proxy/api/v1/files
POST /api/v1/environments/{environment}/proxy/api/v1/files HTTP/1.1
Host: 
Content-Type: multipart/form-data
Accept: */*
Content-Length: 17

{
  "file": "binary"
}
{
  "id": "45447f25-3ad2-441d-b849-49bf696606b8",
  "filename": "keystore.jks",
  "uploadedBy": "user",
  "uploadedAt": "2021-01-01T00:00:00Z",
  "size": 1024,
  "contentType": "application/x-java-keystore"
}

Last updated

Was this helpful?