Back to top

Lenses API (v3.1)

Authentication

In order to use the functionality provided by Lenses, the user has to first login. All the available actions, a user can do, are driven by merging all the groups permissions. A user belongs to a least one group. In case of a Service Accounts, there is no login step since the security token has been pre-registered.

Login

Login
POST/api/login

On successful login, it returns the security token each further HTTP request has to provide as an HTTP Header X-Kafka-Lenses-Token: myToken in subsequent requests.

Also bear in mind that Service Account tokens need the account name as well e.g. X-Kafka-Lenses-Token: jenkins-user:jenkins-token

Example URI

POST /api/login
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "user": "admin",
  "password": "admin"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "user": {
      "type": "string",
      "description": "User to login access"
    },
    "password": {
      "type": "string",
      "description": "Password for the user"
    }
  },
  "required": [
    "user",
    "password"
  ]
}
Response  200
HideShow

Contains the full Lenses security token

Headers
Content-Type: text/plain
Body
a1f44cb8-0f37-4b96-828c-57bbd8000000
Response  401
HideShow
Headers
Content-Type: application/json
Body
UNAUTHORIZED

User Details

User Details
GET/api/auth

Returns current user permission

Example URI

GET /api/auth
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "user": "johnsmith",
  "schemaRegistryDelete": false,
  "permissions": [
    "Hello, world!",
    "ViewConnectors",
    "ManageConnectors",
    "ViewKubernetes",
    "ManageKubernetes",
    "ViewDataPolicies",
    "ManageDataPolicies",
    "ViewTopology",
    "ManageTopology",
    "ViewSQLProcessors",
    "ManageSQLProcessors",
    "ViewKafkaSettings",
    "ManageKafkaSettings",
    "ViewAlertRules",
    "ManageAlertRules",
    "ViewSchemaRegistry",
    "ManageSchemaRegistry",
    "ViewUsers",
    "ManageUsers",
    "ViewKafkaConsumers",
    "ManageKafkaConsumers",
    "ViewLogs",
    "ViewAuditLogs",
    "ManageConnections"
  ],
  "security": {
    "ldap": false,
    "kerberos": false,
    "http": false
  },
  "runtime": {
    "adminDefaultPassword": true
  },
  "token": "xxxx"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "user": {
      "type": "string",
      "description": "Username"
    },
    "schemaRegistryDelete": {
      "type": "boolean",
      "description": "Allowed to delete schemas"
    },
    "permissions": {
      "type": "array",
      "description": "All the admin and application permissions linked to this user"
    },
    "security": {
      "type": "object",
      "properties": {
        "ldap": {
          "type": "boolean",
          "description": "If true LDAP is enabled, false otherwise"
        },
        "kerberos": {
          "type": "boolean",
          "description": "If true Kerberos is enabled, false otherwise"
        },
        "http": {
          "type": "boolean",
          "description": "If true Custom HTTP is enabled, false otherwise"
        }
      },
      "required": [
        "ldap",
        "kerberos",
        "http"
      ],
      "description": "Provides details on the authentication modes"
    },
    "runtime": {
      "type": "object",
      "properties": {
        "adminDefaultPassword": {
          "type": "boolean",
          "description": "If true the full admin user has the default password; false otherwise"
        }
      },
      "required": [
        "adminDefaultPassword"
      ],
      "description": "Provides details on runtime"
    },
    "token": {
      "type": "string",
      "description": "Login token"
    }
  },
  "required": [
    "user",
    "schemaRegistryDelete",
    "permissions",
    "security",
    "runtime",
    "token"
  ]
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Logout

Logout
GET/api/logout

Closes the user session and the security token associated with it is dropped.

Example URI

GET /api/logout
Request
HideShow
Headers
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
When the operation is successful.
Response  401
HideShow
Headers
Content-Type: application/json
Body
UNAUTHORIZED

List admin permission

List admin permission
GET/api/v1/permission/admin

Returns all the available admin permissions, with a type that should be included in group requested, a name that is a human readable version, and two boolean flags which indicate if the permission can be set to viewable and / or manageable.

Example URI

GET /api/v1/permission/admin
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "name": "Data Policies",
    "viewable": "ViewDataPolicies",
    "manageable": "ManageDataPolicies"
  },
  {
    "name": "Audit Logs",
    "viewable": "ViewAuditLogs",
    "manageable": null
  },
  {
    "name": "User Management",
    "viewable": "ViewUsers",
    "manageable": "ManageUsers"
  },
  {
    "name": "Alert Rules",
    "viewable": "ViewAlertRules",
    "manageable": "ManageAlertRules"
  },
  {
    "name": "Kafka Settings",
    "viewable": "ViewKafkaSettings",
    "manageable": "ManageKafkaSettings"
  }
]
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "view" permission.

List supported security types

List supported security types
GET/api/v1/security/type/user

Returns all supported user types.

Example URI

GET /api/v1/security/type/user
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "BASIC",
  "KERBEROS"
]
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "view" permission.

SSO

These are the APIs offered for Single Sign On functionality. Currently, SAML 2.0 is supported, where the user’s browser is involved in performing redirections between Lenses and the Identity Provider.

As such, most of these calls are expected to be called via a browser, usually, through Lenses’ Front End.

SAML Login

SAML Login
POST/api/v2/login/saml

Initiates the SAML SSO protocol with the configured external Identity Provider (IdP). This is a browser-based API.

Example URI

POST /api/v2/login/saml
Response  302
HideShow
Headers
Location: https://my.saml.sso.provider
Set-Cookie: ll.pac4j=xxxx

SAML Callback

SAML Callback
POST/api/v2/auth/saml/callback{?client_name}

The endpoint for the external SAML SSO Identity Provider (IdP) to call returning the authenticated-user data. This is a browser-based API.

Example URI

POST /api/v2/auth/saml/callback?client_name=SAML2Client
URI Parameters
HideShow
client_name
string (required) Example: SAML2Client

Specify for Lenses to treat it as a SAML protocol

Response  302
HideShow
Headers
Location: https://my.lenses.io?fromSSO=true

SAML Metadata

SAML Metadata
GET/api/v2/auth/saml/sp-metadata

The Lenses SAML XML metadata as a Service Provider (SP).

Example URI

GET /api/v2/auth/saml/sp-metadata
Response  200
HideShow
Headers
Content-Type: application/xml
Body
<?xml version="1.0" encoding="UTF-8"?>
    <md:EntityDescriptor ID="_8fee9967daba4dd2a13e82c0feeb6f6b1b907ec" entityID="https://my.lenses.io" validUntil="2040-03-27T17:26:53.899Z" xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata">
        <md:Extensions xmlns:alg="urn:oasis:names:tc:SAML:metadata:algsupport">
            <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"/>
            <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha384"/>
            <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha512"/>
            <alg:SigningMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
            <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256"/>
            <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha384"/>
            <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha512"/>
            <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"/>
            <alg:SigningMethod Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"/>
            <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#hmac-sha256"/>
            <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#hmac-sha384"/>
            <alg:SigningMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512"/>
            <alg:SigningMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"/>
            <alg:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
            <alg:DigestMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#sha384"/>
            <alg:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
        </md:Extensions>
        <md:SPSSODescriptor AuthnRequestsSigned="false" WantAssertionsSigned="false" protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol urn:oasis:names:tc:SAML:1.0:protocol urn:oasis:names:tc:SAML:1.1:protocol">
            <md:Extensions xmlns:init="urn:oasis:names:tc:SAML:profiles:SSO:request-init">
                <init:RequestInitiator Binding="urn:oasis:names:tc:SAML:profiles:SSO:request-init" Location="https://my.lenses.io/api/v2/auth/saml/callback?client_name=SAML2Client"/>
            </md:Extensions>
            <md:KeyDescriptor use="signing">
                <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
                    <ds:X509Data>
                        <ds:X509Certificate>xxxx</ds:X509Certificate>
                    </ds:X509Data>
                </ds:KeyInfo>
            </md:KeyDescriptor>
            <md:KeyDescriptor use="encryption">
                <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
                    <ds:X509Data>
                        <ds:X509Certificate>xxxx</ds:X509Certificate>
                    </ds:X509Data>
                </ds:KeyInfo>
            </md:KeyDescriptor>
            <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://my.lenses.io/api/v2/auth/saml/callback?client_name=SAML2Client&amp;logoutendpoint=true"/>
            <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign" Location="https://my.lenses.io/api/v2/auth/saml/callback?client_name=SAML2Client&amp;logoutendpoint=true"/>
            <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://my.lenses.io/api/v2/auth/saml/callback?client_name=SAML2Client&amp;logoutendpoint=true"/>
            <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP" Location="https://my.lenses.io/api/v2/auth/saml/callback?client_name=SAML2Client&amp;logoutendpoint=true"/>
            <md:NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</md:NameIDFormat>
            <md:NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:persistent</md:NameIDFormat>
            <md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress</md:NameIDFormat>
            <md:NameIDFormat>urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified</md:NameIDFormat>
            <md:AssertionConsumerService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" Location="https://my.lenses.io/api/v2/auth/saml/callback?client_name=SAML2Client" index="0"/>
        </md:SPSSODescriptor>
    </md:EntityDescriptor>

Admin Kafka

Lenses APIs for managing Kafka.

Your user or Service Account will require the permission Kafka Settings to utilize the bellow APIs.

ACL

APIs for managing Kafka Access Control Lists

List Kafka ACL
GET/api/acl

Example URI

GET /api/acl
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Body
{
  "resourceType": "Topic",
  "resourceName": "trades",
  "principal": "User:Alice",
  "permissionType": "Allow",
  "patternType": "LITTERAL",
  "host": "Hello, world!",
  "operation": "Read"
}
Schema
{
  "type": "object",
  "properties": {
    "resourceType": {
      "enum": [
        "Topic",
        "Group",
        "Cluster",
        "TxnId",
        "DelegationToken"
      ],
      "description": "The Kafka resource type to apply the ACL to"
    },
    "resourceName": {
      "type": "string",
      "description": "The name of the resource to apply the ACL to"
    },
    "principal": {
      "type": "string",
      "description": "The principal to appy the ACL to"
    },
    "permissionType": {
      "enum": [
        "Allow",
        "Deny"
      ],
      "description": "The permission type"
    },
    "patternType": {
      "enum": [
        "LITTERAL",
        "PREFIXED"
      ],
      "description": "The pattern type"
    },
    "host": {
      "type": "string",
      "description": "The hosts to apply the ACL to"
    },
    "operation": {
      "enum": [
        "Read",
        "Write",
        "Describe",
        "Delete",
        "DescribeConfigs",
        "AlterConfigs",
        "IdempotentWrite",
        "ClusterAction"
      ],
      "description": "The operation type"
    }
  },
  "required": [
    "resourceType",
    "resourceName",
    "principal",
    "permissionType",
    "host",
    "operation"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "acls": [
    {
      "resourceType": "Topic",
      "resourceName": "trades",
      "principal": "User:Alice",
      "permissionType": "Allow",
      "patternType": "LITTERAL",
      "host": "Hello, world!",
      "operation": "Read"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "acls": {
      "type": "array"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Create or update an ACL
PUT/api/acl

The following operations are valid (depending on the Kafka version)

  • Topic : “Read” | “Write” | “Describe” | “Delete” | “DescribeConfigs” | “AlterConfigs” | “All”

  • Group : “Read” | “Describe” | “Delete” | “All”

  • Cluster : “Create” | “ClusterAction” | “DescribeConfigs” | “AlterConfigs” | “IdempotentWrite” | “Alter” | “Describe” | “All”

  • TransactionalId : “Describe” | “Write” | “All”

  • DelegationToken : “Describe” | “All”

Example URI

PUT /api/acl
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Body
{
  "resourceType": "Topic",
  "resourceName": "trades",
  "principal": "User:Alice",
  "permissionType": "Allow",
  "patternType": "LITTERAL",
  "host": "Hello, world!",
  "operation": "Read"
}
Schema
{
  "type": "object",
  "properties": {
    "resourceType": {
      "enum": [
        "Topic",
        "Group",
        "Cluster",
        "TxnId",
        "DelegationToken"
      ],
      "description": "The Kafka resource type to apply the ACL to"
    },
    "resourceName": {
      "type": "string",
      "description": "The name of the resource to apply the ACL to"
    },
    "principal": {
      "type": "string",
      "description": "The principal to appy the ACL to"
    },
    "permissionType": {
      "enum": [
        "Allow",
        "Deny"
      ],
      "description": "The permission type"
    },
    "patternType": {
      "enum": [
        "LITTERAL",
        "PREFIXED"
      ],
      "description": "The pattern type"
    },
    "host": {
      "type": "string",
      "description": "The hosts to apply the ACL to"
    },
    "operation": {
      "enum": [
        "Read",
        "Write",
        "Describe",
        "Delete",
        "DescribeConfigs",
        "AlterConfigs",
        "IdempotentWrite",
        "ClusterAction"
      ],
      "description": "The operation type"
    }
  },
  "required": [
    "resourceType",
    "resourceName",
    "principal",
    "permissionType",
    "host",
    "operation"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  200
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Delete ACLs
DELETE/api/acl

Example URI

DELETE /api/acl
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Body
{
  "resourceType": "Topic",
  "resourceName": "trades",
  "principal": "User:Alice",
  "permissionType": "Allow",
  "patternType": "LITTERAL",
  "host": "Hello, world!",
  "operation": "Read"
}
Schema
{
  "type": "object",
  "properties": {
    "resourceType": {
      "enum": [
        "Topic",
        "Group",
        "Cluster",
        "TxnId",
        "DelegationToken"
      ],
      "description": "The Kafka resource type to apply the ACL to"
    },
    "resourceName": {
      "type": "string",
      "description": "The name of the resource to apply the ACL to"
    },
    "principal": {
      "type": "string",
      "description": "The principal to appy the ACL to"
    },
    "permissionType": {
      "enum": [
        "Allow",
        "Deny"
      ],
      "description": "The permission type"
    },
    "patternType": {
      "enum": [
        "LITTERAL",
        "PREFIXED"
      ],
      "description": "The pattern type"
    },
    "host": {
      "type": "string",
      "description": "The hosts to apply the ACL to"
    },
    "operation": {
      "enum": [
        "Read",
        "Write",
        "Describe",
        "Delete",
        "DescribeConfigs",
        "AlterConfigs",
        "IdempotentWrite",
        "ClusterAction"
      ],
      "description": "The operation type"
    }
  },
  "required": [
    "resourceType",
    "resourceName",
    "principal",
    "permissionType",
    "host",
    "operation"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  200
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Quotas

APIs for managing Kafka Quotas.

Quotas create entries in zookeeper. The paths in zookeeper dictate the following order of precedence:

  1. /config/users//clients/

  2. /config/users//clients/

  3. /config/users/

  4. /config/users//clients/

  5. /config/users//clients/

  6. /config/users/

  7. /config/clients/

  8. /config/clients/

List Kafka Quotas
GET/api/quotas

Returns all the quotas setup in your cluster.

Example URI

GET /api/quotas
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "entityType": "CLIENT",
    "entityName": "CLIENT",
    "child": "id",
    "properties": {
      "producer_byte_rate": "100000",
      "consumer_byte_rate": "200000",
      "request_percentage": "75"
    },
    "url": "/api/quotas/clients"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Create for all users
PUT/api/quotas/users

Create a quota for all users and all clients

Example URI

PUT /api/quotas/users
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Create a quota for a user
PUT/api/quotas/users/{user}

Create a quota for a specific user

Example URI

PUT /api/quotas/users/admin
URI Parameters
HideShow
user
string (required) Example: admin

The user to create the quota for

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Create for all clients of a user
PUT/api/quotas/users/{user}/clients

Create a quota for a specific user for all him client apps

Example URI

PUT /api/quotas/users/admin/clients
URI Parameters
HideShow
user
string (required) Example: admin

The user to create the quota for

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Create for a user and a client
PUT/api/quotas/users/{user}/clients/{client}

Create a quota for a specific client of a specific user

Example URI

PUT /api/quotas/users/admin/clients/client1
URI Parameters
HideShow
user
string (required) Example: admin

The user to create the quota for

client
string (required) Example: client1

The client id to create the quota for

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Delete for all users
DELETE/api/quotas

Delete a quota for all users and all clients. Deletes properties sent in the payload.

Example URI

DELETE /api/quotas
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Delete a user quota
DELETE/api/quotas/users/{user}

Deletes a quota for a specific user. Deletes properties sent in the payload.

Example URI

DELETE /api/quotas/users/admin
URI Parameters
HideShow
user
string (required) Example: admin

The user to create the quota for

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Body
[
  "producer_byte_rate",
  "consumer_byte_rate",
  "request_percentage"
]
Response  200
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Delete for all users
DELETE/api/quotas/users

Deletes the default quota of all users. Deletes properties sent in the payload.

Example URI

DELETE /api/quotas/users
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Delete for a user and all client
DELETE/api/quotas/users/{user}/clients

Delete a quota for a specific user for all clients. Deletes properties sent in the payload.

Example URI

DELETE /api/quotas/users/admin/clients
URI Parameters
HideShow
user
string (required) Example: admin

The user to create the quota for

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Body
[
  "producer_byte_rate",
  "consumer_byte_rate",
  "request_percentage"
]
Response  200
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Delete for a user and a client
DELETE/api/quotas/users/{user}/clients/{client}

Delete a quota for a specific user and specific client. Deletes properties sent in the payload.

Example URI

DELETE /api/quotas/users/admin/clients/client1
URI Parameters
HideShow
user
string (required) Example: admin

The user to create the quota for

client
string (required) Example: client1

The client id to create the quota for

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Body
[
  "producer_byte_rate",
  "consumer_byte_rate",
  "request_percentage"
]
Response  200
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Create for all clients
PUT/api/quotas/clients

Create a quota for all clients

Example URI

PUT /api/quotas/clients
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Create a quota for a client
PUT/api/quotas/clients/{client}

Create a quota for a specific client

Example URI

PUT /api/quotas/clients/client1
URI Parameters
HideShow
client
string (required) Example: client1

The client id to create the quota for

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Delete for all clients
DELETE/api/quotas/clients

Delete a quota for all clients. Deletes properties sent in the payload.

Example URI

DELETE /api/quotas/clients
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Body
[
  "producer_byte_rate",
  "consumer_byte_rate",
  "request_percentage"
]
Response  200
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Delete a client quota
DELETE/api/quotas/clients/{client}

Delete a quota for a specific clients. Deletes properties sent in the payload.

Example URI

DELETE /api/quotas/clients/client1
URI Parameters
HideShow
client
string (required) Example: client1

The client id to create the quota for

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Body
[
  "producer_byte_rate",
  "consumer_byte_rate",
  "request_percentage"
]
Response  200
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Connectors

Lenses APIs to manage Kafka Connect connectors

Connectors

List active connectors
GET/api/proxy-connect/{clusterAlias}/connectors

Example URI

GET /api/proxy-connect/clusterAlias/connectors
URI Parameters
HideShow
clusterAlias
string (required) 

The connect cluster alias name

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Create new connector
POST/api/proxy-connect/{clusterAlias}/connectors

Example URI

POST /api/proxy-connect/clusterAlias/connectors
URI Parameters
HideShow
clusterAlias
string (required) 

The connect cluster alias name

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Running Connectors

Get information about a specific connector
GET/api/proxy-connect/{clusterAlias}/connectors/{connectorName}

Example URI

GET /api/proxy-connect/clusterAlias/connectors/connectorName
URI Parameters
HideShow
clusterAlias
string (required) 

The connect cluster alias name

connectorName
string (required) 

The connector name to get information for

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Remove a running connector
DELETE/api/proxy-connect/{clusterAlias}/connectors/{connectorName}

Example URI

DELETE /api/proxy-connect/clusterAlias/connectors/connectorName
URI Parameters
HideShow
clusterAlias
string (required) 

The connect cluster alias name

connectorName
string (required) 

The unique connector name

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Get connector config
GET/api/proxy-connect/{clusterAlias}/connectors/{connectorName}/config

Example URI

GET /api/proxy-connect/clusterAlias/connectors/connectorName/config
URI Parameters
HideShow
clusterAlias
string (required) 

The connect cluster alias name

connectorName
string (required) 

The connector name to get information for

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Set connector config
PUT/api/proxy-connect/{clusterAlias}/connectors/{connectorName}/config

Example URI

PUT /api/proxy-connect/clusterAlias/connectors/connectorName/config
URI Parameters
HideShow
clusterAlias
string (required) 

The connect cluster alias name

connectorName
string (required) 

The connector name to set information to

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Get connector status
GET/api/proxy-connect/{clusterAlias}/connectors/{connectorName}/status

Example URI

GET /api/proxy-connect/clusterAlias/connectors/connectorName/status
URI Parameters
HideShow
clusterAlias
string (required) 

The connect cluster alias name

connectorName
string (required) 

The connector name to get status for

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Pause a connector
PUT/api/proxy-connect/{clusterAlias}/connectors/{connectorName}/pause

Example URI

PUT /api/proxy-connect/clusterAlias/connectors/connectorName/pause
URI Parameters
HideShow
clusterAlias
string (required) 

The connect cluster alias name

connectorName
string (required) 

The connector name to pause

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Resume a paused connector
PUT/api/proxy-connect/{clusterAlias}/connectors/{connectorName}/resume

Example URI

PUT /api/proxy-connect/clusterAlias/connectors/connectorName/resume
URI Parameters
HideShow
clusterAlias
string (required) 

The connect cluster alias name

connectorName
string (required) 

The connector name to resume

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Restart a connector
POST/api/proxy-connect/{clusterAlias}/connectors/{connectorName}/restart

Example URI

POST /api/proxy-connect/clusterAlias/connectors/connectorName/restart
URI Parameters
HideShow
clusterAlias
string (required) 

The connect cluster alias name

connectorName
string (required) 

The connector name to restart

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

List connector tasks
GET/api/proxy-connect/{clusterAlias}/connectors/{connectorName}/tasks

Example URI

GET /api/proxy-connect/clusterAlias/connectors/connectorName/tasks
URI Parameters
HideShow
clusterAlias
string (required) 

The connect cluster alias name

connectorName
string (required) 

The connector name to get info for

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Get connector task status
GET/api/proxy-connect/{clusterAlias}/connectors/{connectorName}/tasks/{task_id}/status

Example URI

GET /api/proxy-connect/clusterAlias/connectors/connectorName/tasks/task_id/status
URI Parameters
HideShow
clusterAlias
string (required) 

The connect cluster alias name

connectorName
string (required) 

The unique connector name

task_id
string (required) 

The task id to get status

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Restart a connector task
POST/api/proxy-connect/{clusterAlias}/connectors/{connectorName})/tasks/{task_id}/restart

Example URI

POST /api/proxy-connect/clusterAlias/connectors/connectorName)/tasks/task_id/restart
URI Parameters
HideShow
clusterAlias
string (required) 

The connect cluster alias name

connectorName
string (required) 

The unique connector name

task_id
string (required) 

The task id to restart

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

List available connector plugins
GET/api/proxy-connect/{clusterAlias}/connector-plugins

Example URI

GET /api/proxy-connect/clusterAlias/connector-plugins
URI Parameters
HideShow
clusterAlias
string (required) 

The connect cluster alias name

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Data Access

Lenses APIs for SQL.

Query data via SQL

Query data via SQL
GET/api/ws/v2/sql/execute

The client should be configured to handle Websockets. Once the connection has been opened it is expected the client sends one message containing the SQL and the token to the server. If this first message does not arrive the server will cut the connection.

{
  "token": "LENSES SECURITY TOKEN",
  "stats": 2,
  "sql": "YOUR SQL",
  "live": false
}

The client should wait for incoming messages and stop when EOF is received.

Each message starts with data: followed by a number; the number indicates the type of the data received (see below). Based on the message type number, you should handle each message differently. Here are the possible values for the message type:

  • 0 - Heartbeat to keep the connection open, you must SKIP this (add continue), i.e data:0

  • 1 - JSON payload record which contains topic metadata and the value string field which is the data coming from the topic, i.e data:1{timestamp:…, partition:…, value:"{…}"}

  • 2 - Stop JSON message. When received you can exit the loop. It also contains statistics, i.e data:2{isTimeRemaining:true/false, size:…, offsets:…}

  • 3 - Error JSON message (if any) i.e data:3{fromLine:…,toLine:…,fromColumn:…,toColumn:…,error:…}

Example Response for a record (message type 1)

data:1{"timestamp":1532460006300,"partition":2,"key":"{key:\"value\"}","offset":560207858,"topic":"","value":"{the fetched data}"}

Example Response for stop (message type 2)

data:2{"size":2062,"isTimeRemaining":true,"offsets":[{"partition":2,"min":560207858,"max":568636162},{"partition":1,"min":338050641,"max":347448266},{"partition":0,"min":355312551,"max":364217747}],"isStopped":false,"totalRecords":3,"isTopicEnd":false,"skippedRecords":0,"recordsLimit":3,"totalSizeRead":2062}

Example Response for an error (message type 3)

data:3{"fromLine":4,"toLine":4,"fromColumn":1,"toColumn":1,"error":"Invalid syntax.Encountered \"LIIT\" at line 4, column 1.\nWas expecting one of:\n    <EOF> ... "}

Example URI

GET /api/ws/v2/sql/execute
URI Parameters
HideShow
sql
string (required) Example: SELECT+*+FROM+%60topicA%60%0ALIMIT+1000

Encoded URL Lenses SQL query

stats
number (required) Example: 4000

Stats are enabled and pushed out every x(stats=4000 means every 4 seconds)

offsets
boolean (required) Example: false

The end record will pull the offsets for the topic and will be attached to the end record, Optional

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "data":1,
    {
        "timestamp":1532460006300,
        "partition":2,
        "key":"{\"key\":\"value\"}",
        "offset":560207858,
        "topic":"",
        "value":"{the fetched data}"
    }
}

Delete from Kafka

Delete from Kafka
DELETE/api/topics/{topicName}/{partition}/{offset}

Delete Records from Topic/Partition up to a specified Offset

This works only for kafka versions 0.11+

Example URI

DELETE /api/topics/trades/1/1000
URI Parameters
HideShow
topicName
string (required) Example: trades

The topic name to delete from

partition
number (required) Example: 1

The partition to delete from

offset
number (required) Example: 1000

The offset to delete upto

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
Records deleted
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied
Response  404
HideShow
Headers
Content-Type: text/plain
Body
Not found

Data Entities

APIs for managing data entities in:

  • Apache Kafka

  • ElasticSearch

Apache Kafka Topics

APIs for managing Apache Kafka topics

Create topic
POST/api/topics/

Create a new Kafka topic

Example URI

POST /api/topics/
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Body
{
  "topicName": "newTopicName",
  "replication": 1,
  "partitions": 1,
  "configs": {
    "key": "cleanup.policy",
    "value": "compact"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "topicName": {
      "type": "string",
      "description": "The topic name to create"
    },
    "replication": {
      "type": "number",
      "description": "Replication factor",
      "default": 1
    },
    "partitions": {
      "type": "number",
      "description": "Number of partitions",
      "default": 1
    },
    "configs": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "The new topic key"
        },
        "value": {
          "type": "string",
          "description": "The new value for the topic config key"
        }
      },
      "required": [
        "key",
        "value"
      ],
      "description": "key value topic configurations"
    }
  },
  "required": [
    "topicName"
  ]
}
Response  400
HideShow
Headers
Content-Type: text/plain
Body
Error Message
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Get extended info for all topics
GET/api/topics

Returns description of all topics.

Example URI

GET /api/topics
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "topicName": "trades",
    "partitions": 3,
    "replication": 1,
    "isControlTopic": false,
    "keyType": "STRING",
    "valueType": "JSON",
    "totalMessages": 10000,
    "configs": [
      {
        "name": "retention.bytes",
        "value": "10 GB",
        "defaultValue": "Hello, world!",
        "documentation": "Hello, world!"
      }
    ],
    "consumers": [
      {
        "id": "cg",
        "coordinator": [
          {
            "id": 1,
            "host": "Hello, world!",
            "port": 1,
            "rack": "Hello, world!"
          }
        ],
        "active": false,
        "state": "Rebalancing",
        "consumers": [
          "c1",
          "c2"
        ],
        "consumersCount": 2,
        "topicPartitionsCount": 4
      }
    ],
    "messagesPerPartition": [
      {
        "partition": 3,
        "messages": 1549,
        "begin": 1000,
        "end": 1718
      }
    ],
    "messagesPerSecond": 10,
    "isMarkedForDeletion": false,
    "timestamp": 1573212526,
    "keySchema": "Hello, world!",
    "valueSchema": "Hello, world!",
    "permissions": [
      "QueryTopic",
      "ShowTopic"
    ]
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  400
HideShow
Headers
Content-Type: text/plain
Body
Error Message
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Get topic info
GET/api/topics/{topicName}

Returns description of the specified topic

Example URI

GET /api/topics/topicName
URI Parameters
HideShow
topicName
string (required) 

The topic to retrieve

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "topicName": "trades",
  "partitions": 3,
  "replication": 1,
  "isControlTopic": false,
  "keyType": "STRING",
  "valueType": "JSON",
  "totalMessages": 10000,
  "configs": [
    {
      "name": "retention.bytes",
      "value": "10 GB",
      "defaultValue": "Hello, world!",
      "documentation": "Hello, world!"
    }
  ],
  "consumers": [
    {
      "id": "cg",
      "coordinator": [
        {
          "id": 1,
          "host": "Hello, world!",
          "port": 1,
          "rack": "Hello, world!"
        }
      ],
      "active": false,
      "state": "Rebalancing",
      "consumers": [
        "c1",
        "c2"
      ],
      "consumersCount": 2,
      "topicPartitionsCount": 4
    }
  ],
  "messagesPerPartition": [
    {
      "partition": 3,
      "messages": 1549,
      "begin": 1000,
      "end": 1718
    }
  ],
  "messagesPerSecond": 10,
  "isMarkedForDeletion": false,
  "timestamp": 1573212526,
  "keySchema": "Hello, world!",
  "valueSchema": "Hello, world!",
  "permissions": [
    "QueryTopic",
    "ShowTopic"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "topicName": {
      "type": "string",
      "description": "Name of the topic"
    },
    "partitions": {
      "type": "number",
      "description": "The number of partitions in the topic"
    },
    "replication": {
      "type": "number",
      "description": "The topic replication factor"
    },
    "isControlTopic": {
      "type": "boolean",
      "description": "Flag indicating is the topic is a Lenses control topic"
    },
    "keyType": {
      "type": "string",
      "description": "The data type for the key currently set in Lenses"
    },
    "valueType": {
      "type": "string",
      "description": "The data type for the value currently set in Lenses"
    },
    "totalMessages": {
      "type": "number",
      "description": "Total number of messages currently measured"
    },
    "configs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the property"
          },
          "value": {
            "type": "string",
            "description": "The value of this property for the current topic"
          },
          "defaultValue": {
            "type": "string",
            "description": "The default value of the property"
          },
          "documentation": {
            "type": "string",
            "description": "Description of the property"
          }
        },
        "required": [
          "name",
          "value"
        ]
      },
      "description": "The configuration values for the topic"
    },
    "consumers": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "645 (required, string) - Id for the group"
          },
          "coordinator": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number",
                  "description": "Id of coordinator"
                },
                "host": {
                  "type": "string",
                  "description": "Host of coordinator"
                },
                "port": {
                  "type": "number",
                  "description": "Port number of coordinator"
                },
                "rack": {
                  "type": "string",
                  "description": "Rack of coordinator"
                }
              },
              "required": [
                "id",
                "host",
                "port",
                "rack"
              ]
            }
          },
          "active": {
            "type": "boolean",
            "description": "Flag indicating if the consumer group is active"
          },
          "state": {
            "type": "string",
            "description": "State of the group"
          },
          "consumers": {
            "type": "array",
            "description": "ids of the consumers"
          },
          "consumersCount": {
            "type": "number",
            "description": "The number of consumers"
          },
          "topicPartitionsCount": {
            "type": "number",
            "description": "The number of partitions"
          }
        },
        "required": [
          "active",
          "state",
          "consumers",
          "consumersCount",
          "topicPartitionsCount"
        ]
      },
      "description": "The number of consumers consuming this topic"
    },
    "messagesPerPartition": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "partition": {
            "type": "number",
            "description": "The number of partitions in the topic"
          },
          "messages": {
            "type": "number",
            "description": "The total number of messages on the partition"
          },
          "begin": {
            "type": "number",
            "description": "The offset of the first message on the topic"
          },
          "end": {
            "type": "number",
            "description": "The offset of the latest on the topic"
          }
        },
        "required": [
          "partition",
          "messages",
          "begin",
          "end"
        ]
      },
      "description": "The number of messages per second currently measured"
    },
    "messagesPerSecond": {
      "type": "number",
      "description": "The number of messages per second currently measured"
    },
    "isMarkedForDeletion": {
      "type": "boolean",
      "description": "Flag indicating is the topic is marked for deletion"
    },
    "timestamp": {
      "type": "number",
      "description": "Last time this information has been updated"
    },
    "keySchema": {
      "type": "string",
      "description": "json schema for the key"
    },
    "valueSchema": {
      "type": "string",
      "description": "json schema for the value"
    },
    "permissions": {
      "type": "array",
      "description": "Permissions that user has to access this topic"
    }
  },
  "required": [
    "topicName",
    "partitions",
    "replication",
    "isControlTopic",
    "keyType",
    "valueType",
    "totalMessages",
    "messagesPerSecond",
    "isMarkedForDeletion",
    "timestamp",
    "permissions"
  ]
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied
Response  404
HideShow
Headers
Content-Type: text/plain
Body
Topic summary requested for topic {topicName} but no such summary exists

Get topic list - v1
GET/api/v1/kafka/topics

Returns a list of topics accessible by the user

Example URI

GET /api/v1/kafka/topics
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "topicName": "trades",
    "partitions": 3,
    "replication": 1,
    "isControlTopic": false,
    "keyType": "STRING",
    "valueType": "JSON",
    "totalMessages": 10000,
    "configs": 25,
    "consumers": 1,
    "messagesPerSecond": 10,
    "isMarkedForDeletion": false,
    "isCompacted": false,
    "permissions": [
      "QueryTopic",
      "ShowTopic"
    ]
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  400
HideShow
Headers
Content-Type: text/plain
Body
Error Message
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Get topic list - v2
GET/api/v2/kafka/topics?pageSize={pageSize}&page={page}&name={name}&sortBy={sortBy}&sortingOrder={sortingOrder}&includeSystemTopics={includeSystemTopics}

Returns description of topics accessible by the user divided into pages. Allows to specify page number and page size.

Example URI

GET /api/v2/kafka/topics?pageSize=25&page=1&name=name&sortBy=partitions&sortingOrder=asc&includeSystemTopics=false
URI Parameters
HideShow
pageSize
number (required) Example: 25

The items per single page, must be greater than zero.

page
number (optional) Example: 1

The page number to be returned, must be greater than zero. Defaults to 1.

name
string (optional) 

Filter topics by name. Only topics with any part of the name matching the parameter value will be included into result.

sortBy
string (optional) Example: partitions

Used for sorting the paged results. Accepts topic field names (e.g. topicName, partitions)

sortingOrder
string (optional) Example: asc

Allows to specify sorting order. Accepted values: asc (ascending, default value), desc (descending)

includeSystemTopics
boolean (optional) Example: false

Allows to include system topics. Default value is false

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "pageCount": 1,
  "topicCount": 100,
  "topics": [
    {
      "topicName": "trades",
      "partitions": 3,
      "replication": 1,
      "isControlTopic": false,
      "keyType": "STRING",
      "valueType": "JSON",
      "totalMessages": 10000,
      "configs": 25,
      "consumers": 1,
      "messagesPerSecond": 10,
      "isMarkedForDeletion": false,
      "isCompacted": false,
      "permissions": [
        "QueryTopic",
        "ShowTopic"
      ]
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "pageCount": {
      "type": "number",
      "description": "The number of pages reflecting the filters given by the user"
    },
    "topicCount": {
      "type": "number",
      "description": "The number of topics accessible by the user filtered by the includeSystemTopics property"
    },
    "topics": {
      "type": "array",
      "description": "The list of the topics"
    }
  }
}
Response  400
HideShow
Headers
Content-Type: text/plain
Body
Error Message
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Update topic
PUT/api/configs/topics/{topicName}

Update topic configuration

Example URI

PUT /api/configs/topics/topicName
URI Parameters
HideShow
topicName
string (required) 

The topic to update/configure

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Body
{
  "configs": [
    {
      "key": "cleanup.policy",
      "value": "compact"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "configs": {
      "type": "array",
      "description": "Example"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: text/plain
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Delete topic
DELETE/api/topics/{topicName}

Example URI

DELETE /api/topics/topicName
URI Parameters
HideShow
topicName
string (required) 

The topic to delete

Response  200
HideShow
Headers
Content-Type: text/plain
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Topic Meta Data

Metastore operations to set override the key and value types for Apache Kafka topics.

List all tables/topics metadata
GET/api/metadata/topics

Retrieve all data catalog metadata.

Example URI

GET /api/metadata/topics
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "keyType": "AVRO",
    "valueType": "AVRO",
    "topicName": "name",
    "keySchema": "Hello, world!",
    "valueSchema": "Hello, world!"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Get topic metadata
GET/api/metadata/topics/{topicName}

Example URI

GET /api/metadata/topics/topicName
URI Parameters
HideShow
topicName
string (required) 

The topic to get metadata

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: text/plain
Body
{
  "keyType": "AVRO",
  "valueType": "AVRO",
  "topicName": "name",
  "keySchema": "Hello, world!",
  "valueSchema": "Hello, world!"
}
Schema
{
  "type": "object",
  "properties": {
    "keyType": {
      "type": "string",
      "description": "The serde used on the Key"
    },
    "valueType": {
      "type": "string",
      "description": "The serde used on the Value"
    },
    "topicName": {
      "type": "string",
      "description": "The topic name"
    },
    "keySchema": {
      "type": "string",
      "description": "json schema for the key"
    },
    "valueSchema": {
      "type": "string",
      "description": "json schema for the value"
    }
  },
  "required": [
    "keyType",
    "valueType",
    "topicName"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Set topic metadata
POST/api/metadata/topics/{topicName}?keyType={keyType}&valueType={valueType}

Example URI

POST /api/metadata/topics/test?keyType=STRING&valueType=STRING
URI Parameters
HideShow
topicName
string (required) Example: test

The topic to set metadata

keyType
string (required) Example: STRING

The type for the key

valueType
string (required) Example: STRING

The type for the value

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: text/plain
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Delete topic metadata
DELETE/api/system/topics/metadata/{topicName}

Example URI

DELETE /api/system/topics/metadata/topicName
URI Parameters
HideShow
topicName
string (required) 

The topic to delete metadata

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: text/plain
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

ElasticSearch Indexes

APIs for managing ElasticSearch Indexes

Get ES Indixes list
GET/api/elastic/indexes?{connectionName}&{includeSystemIndexes}

The result will be an array of objects.

This array will by default contain all the indexes of all ES connections. The user will be able to see the Indexes of a single connection through connection name paremeter.

Example URI

GET /api/elastic/indexes?esConnection&includeSystemIndexes
URI Parameters
HideShow
connectionName
string (optional) Example: esConnection

The name of the connection to get indexes from.

includeSystemIndexes
boolean (optional) 

Whether to include the system indexes or not

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "shardsCount": 1,
    "replicas": 0,
    "status": "green",
    "permissions": [
      "ShowTopic",
      "QueryTopic",
      "ViewSchema"
    ],
    "indexName": "position_reports",
    "connectionName esConnection1": "Hello, world!",
    "totalMessages": 872753304,
    "size": 572743304000,
    "keySchema": "STRING",
    "keyType": "STRING",
    "valueSchema": {
      "type": "record",
      "name": "aisClassAPositionReport",
      "namespace": "com.landoop.ais",
      "doc": "Schema for AIS class A Position Reports",
      "fields": [
        {
          "name": "Type",
          "type": "int",
          "doc": "Documentation"
        }
      ]
    },
    "valueType": "JSON"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied
Response  404
HideShow
Headers
Content-Type: text/plain
Body
Not found
Response  500
HideShow
Headers
Content-Type: text/plain
Body
Failed to retrieve ES Indexes. Error [error message]

Details of an ES Index
GET/api/elastic/indexes/{connectionName}/{indexName}

The result will be an object.

Example URI

GET /api/elastic/indexes/esConnection/IndexName
URI Parameters
HideShow
connectionName
string (required) Example: esConnection

The name of the connection to get indexes from

indexName
string (required) Example: IndexName

The name of the index to get records from

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "shards": [
    {
      "shard": "1",
      "records": 4,
      "replicas": 2,
      "availableReplicas": 2
    }
  ],
  "replicas": 0,
  "status": "green",
  "permissions": [
    "ShowTopic",
    "QueryTopic",
    "ViewSchema"
  ],
  "indexName": "position_reports",
  "connectionName": "esConnection1",
  "totalMessages": 872753304,
  "size": 572743304000,
  "keySchema": "STRING",
  "keyType": "STRING",
  "valueSchema": {
    "type": "record",
    "name": "aisClassAPositionReport",
    "namespace": "com.landoop.ais",
    "doc": "Schema for AIS class A Position Reports",
    "fields": [
      {
        "name": "Type",
        "type": "int",
        "doc": "Documentation"
      }
    ]
  },
  "valueType": "JSON"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "shards": {
      "type": "array",
      "description": "array of the shards of the current index"
    },
    "replicas": {
      "type": "number",
      "description": "the amount of replicas"
    },
    "status": {
      "type": "string",
      "enum": [
        "green",
        "yellow",
        "red"
      ],
      "description": "The status of the index"
    },
    "permissions": {
      "type": "array",
      "description": "List of permissions (using the same permissions with topics)"
    },
    "indexName": {
      "type": "string",
      "description": "The name of the index"
    },
    "connectionName": {
      "type": "string",
      "description": "The name of the ES connection"
    },
    "totalMessages": {
      "type": "number",
      "description": "Total messages"
    },
    "size": {
      "type": "number",
      "description": "total size in bytes"
    },
    "keySchema": {
      "type": "string",
      "description": "the key schema of this index"
    },
    "keyType": {
      "type": "string",
      "description": "Should always be string for ES"
    },
    "valueSchema": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "the type"
        },
        "name": {
          "type": "string",
          "description": "the name"
        },
        "namespace": {
          "type": "string",
          "description": "the namespace"
        },
        "doc": {
          "type": "string",
          "description": "the documentation"
        },
        "fields": {
          "type": "array",
          "description": "array of fields"
        }
      },
      "description": "The value schema of this index"
    },
    "valueType": {
      "type": "string",
      "description": "Should always be JSON for ES"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied
Response  404
HideShow
Headers
Content-Type: text/plain
Body
Not found
Response  500
HideShow
Headers
Content-Type: text/plain
Body
Failed to retrieve ES Indexes. Error [error message]

Data Governance

Lenses APIs for data governance.

Your user or Service Account will require the permission Data Policies to utilize the bellow APIs.

Data Policies

List obfuscation functions
GET/api/protection/static/obfuscation

Returns all available data protection functions as a list of strings. Learn more at https://docs.lenses.io/using-lenses/data-policies/index.html#data-obfuscation

Example URI

GET /api/protection/static/obfuscation
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "None",
  "All",
  "Email",
  "Initials",
  "First-1",
  "First-2",
  "First-3",
  "First-4",
  "Last-1",
  "Last-2",
  "Last-3",
  "Last-4",
  "Number-to-negative-one",
  "Number-to-zero",
  "Number-to-null"
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied
Response  500
HideShow
Headers
Content-Type: text/plain
Body
Failed to retrieve obfuscation types. Error [error message]

List data categories
GET/api/protection/static/category

Returns the existing categories of sensitive data as a list of strings. Allows Data Officer to monitor sensitive data by category.

Example URI

GET /api/protection/static/category
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "PII",
  "Financial",
  "Classified"
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

List impact types
GET/api/protection/static/impact

A data policy impact on the data can be assessed by the person setting it.

Example URI

GET /api/protection/static/impact
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "Low",
  "Medium",
  "High"
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

List all data policies
GET/api/protection/policy

Get all current Data Protection policies - with relevant stats

Example URI

GET /api/protection/policy
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "0",
    "name": "name",
    "category": "category",
    "impact": "HIGH",
    "obfuscation": "Email",
    "fields": [
      "The fields to protect"
    ],
    "lastUpdated": "2018-12-01 16:00:01",
    "lastUpdatedUser": "admin"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied
Response  500
HideShow
Headers
Content-Type: text/plain
Body
Failed to retrieve policies. Error [error message]

Create new policy
POST/api/protection/policy

Create a new Data Protection Policy that gets activated immediately.

Example URI

POST /api/protection/policy
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Body
{
  "id": "id",
  "name": "name",
  "category": "category",
  "impactType": "HIGH",
  "obfuscation": "Email",
  "fields": [
    "fields"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Policy version. All versions share this. Needs to be provided by the client but it will be ignored."
    },
    "name": {
      "type": "string",
      "description": "The name for the entry"
    },
    "category": {
      "type": "string",
      "description": "A grouping offered for the policy entries"
    },
    "impactType": {
      "type": "string",
      "enum": [
        "HIGH",
        "MEDIUM",
        "LOW"
      ],
      "description": "What's the implication of this policy"
    },
    "obfuscation": {
      "type": "string",
      "enum": [
        "Email",
        "Initials",
        "First-1",
        "First-2",
        "First-3",
        "First-4",
        "Last-1",
        "Last-2",
        "Last-3",
        "Last-4",
        "None"
      ],
      "description": "The method used to protect the data"
    },
    "fields": {
      "type": "array",
      "description": "The fields to protect"
    }
  },
  "required": [
    "name",
    "category",
    "impactType",
    "obfuscation",
    "fields"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
Policy created
Response  400
HideShow
Headers
Content-Type: application/json
Body
Failed to create policy. Error [error message]
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied
Response  500
HideShow
Headers
Content-Type: text/plain
Body
Failed to create policy. Error [error message]

Update a policy
PUT/api/protection/policy/{policy_id}

Update a Data Policy by ID

Example URI

PUT /api/protection/policy/0
URI Parameters
HideShow
policy_id
string (required) Example: 0

The unique identifier for the policy

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Body
{
  "id": "id",
  "name": "name",
  "category": "category",
  "impactType": "HIGH",
  "obfuscation": [
    "Email",
    "Initials",
    "First"
  ],
  "fields": [
    "fields"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Policy version. All versions share this. Needs to be provided by the client but it will be ignored."
    },
    "name": {
      "type": "string",
      "description": "The name for the entry"
    },
    "category": {
      "type": "string",
      "description": "A grouping offered for the policy entries"
    },
    "impactType": {
      "type": "string",
      "enum": [
        "HIGH",
        "MEDIUM",
        "LOW"
      ],
      "description": "What's the implication of this policy"
    },
    "obfuscation": {
      "type": "array",
      "description": "1, First-2, First-3, First-4, Last-1, Last-2, Last-3, Last-4, None (required, enum) - The method used to protect the data"
    },
    "fields": {
      "type": "array",
      "description": "The fields to protect"
    }
  },
  "required": [
    "name",
    "category",
    "impactType",
    "fields"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
Policy updated
Response  400
HideShow
Headers
Content-Type: application/json
Body
Failed to update policy. Error [error message]
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied
Response  404
HideShow
Headers
Content-Type: application/json
Body
Not found
Response  500
HideShow
Headers
Content-Type: text/plain
Body
Failed to update policy. Error [error message]

List data policy versions
GET/api/protection/policy/{policy_id}/versions

Example URI

GET /api/protection/policy/0/versions
URI Parameters
HideShow
policy_id
string (required) Example: 0

The unique identifier for the policy

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "array": {
    "id": "0",
    "name": "name",
    "category": "category",
    "impact": "HIGH",
    "obfuscation": "Email",
    "fields": [
      "The fields to protect"
    ],
    "lastUpdated": "2018-12-01 16:00:01",
    "lastUpdatedUser": "admin"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "array": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Policy version. All versions share this"
        },
        "name": {
          "type": "string",
          "description": "The name for the entry"
        },
        "category": {
          "type": "string",
          "description": "A grouping offered for the policy entries"
        },
        "impact": {
          "type": "string",
          "enum": [
            "HIGH",
            "MEDIUM",
            "LOW"
          ],
          "description": "What's the implication of this policy"
        },
        "obfuscation": {
          "type": "string",
          "enum": [
            "Email",
            "Initials",
            "First-1",
            "First-2",
            "First-3",
            "First-4",
            "Last-1",
            "Last-2",
            "Last-3",
            "Last-4",
            "None"
          ],
          "description": "The method used to protect the data"
        },
        "fields": {
          "type": "array"
        },
        "lastUpdated": {
          "type": "string",
          "description": "ISO8601 date timestamp the policy is effective from"
        },
        "lastUpdatedUser": {
          "type": "string",
          "description": "The user who created/changed the entry"
        }
      },
      "description": "Policy versions"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied
Response  404
HideShow
Headers
Content-Type: application/json
Body
Not found
Response  500
HideShow
Headers
Content-Type: text/plain
Body
Failed to retrieve policy. Error [error message]

Delete policy
DELETE/api/protection/policy/{policy_id}

Delete a Data Policy by ID

Example URI

DELETE /api/protection/policy/0
URI Parameters
HideShow
policy_id
number (required) Example: 0

The unique identifier for the policy

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
Policy [policy_id] deleted
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied
Response  404
HideShow
Headers
Content-Type: application/json
Body
Not found
Response  500
HideShow
Headers
Content-Type: text/plain
Body
Failed to delete policy. Error [error message]

Monitoring

Lenses Monitoring APIs

Alerts

Endpoints to manage Lenses alerts including:

  • alert channels - to dispatch alert events to 3rd party integrations

  • alert settings - to configure the conditions by which alert events are raised, and route those alerts to alert channels

  • alert events - query previously raised alert events

List alert channel templates
GET/api/v1/alert/channel-templates

List alert channel templates with their applicable connections

Example URI

GET /api/v1/alert/channel-templates
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": 439,
    "name": "Slack",
    "version": "1",
    "enabled": true,
    "builtIn": true,
    "metadata": {
      "author": "Lenses",
      "description": "Slack channel template"
    },
    "configuration": [
      {
        "id": 26,
        "key": "username",
        "displayName": "Username",
        "placeholder": "health-bot",
        "description": "The user name to appear in slack as the sender.",
        "type": {
          "name": "STRING",
          "displayName": "String",
          "enumValues": null
        },
        "required": true,
        "provided": false
      },
      {
        "id": 27,
        "key": "channel",
        "displayName": "Channel",
        "placeholder": "#kafka-health",
        "description": "The Slack channel send alerts to.",
        "type": {
          "name": "STRING",
          "displayName": "String",
          "enumValues": null
        },
        "required": true,
        "provided": false
      },
      {
        "id": 28,
        "key": "icon-url",
        "displayName": "Icon URL",
        "placeholder": "http://example.com/slack/mybot/icon.png",
        "description": "The full path to an image to set for the slack message.",
        "type": {
          "name": "STRING",
          "displayName": "String",
          "enumValues": null
        },
        "required": false,
        "provided": false
      }
    ],
    "suitableConnections": [
      {
        "templateName": "Slack",
        "name": "slack-connection"
      }
    ]
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number"
    },
    "name": {
      "type": "string"
    },
    "version": {
      "type": "number"
    },
    "enabled": {
      "type": "boolean"
    },
    "builtIn": {
      "type": "boolean"
    },
    "metadata": {
      "type": "object",
      "properties": {
        "author": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "iconUrl": {
          "type": "string"
        }
      },
      "required": [
        "author"
      ]
    },
    "configuration": {
      "type": "array"
    },
    "suitableConnections": {
      "type": "array"
    }
  },
  "required": [
    "id",
    "name",
    "version",
    "enabled",
    "builtIn",
    "metadata",
    "configuration",
    "suitableConnections"
  ]
}

List alert channels
GET/api/v1/alert/channels{?page,pageSize,templateName,channelName,sortField,sortOrder}

Lists alert channels ordered by their creation time (most recent first)

Example URI

GET /api/v1/alert/channels?page=1&pageSize=25&templateName=Slack&channelName=kafka-prd&sortField=updatedAt&sortOrder=desc
URI Parameters
HideShow
page
string (optional) Example: 1

The page number to be fetched, must be greater than zero. Defaults to 1.

pageSize
string (required) Example: 25

The amount of items to return in a single page, must be greater than zero.

templateName
string (optional) Example: Slack

Filter channels by template name.

channelName
string (optional) Example: kafka-prd

Filter channels whith a name matching the supplied string (e.g. kafka-prd would match kafka-prd-pagerduty and kafka-prd-slack).

sortField
string (optional) Example: updatedAt

The field to sort channel results by. Defults to createdAt.

Choices: name templateName createdAt updatedAt

sortOrder
string (optional) Example: desc

Choices: asc desc

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "values": [
    {
      "id": "2c1fc20d-59b4-4f67-8982-6e0377e8fdbd",
      "name": "kafka-prd-health",
      "templateName": "Slack",
      "connectionName": "slack-connection",
      "properties": [
        {
          "key": "username",
          "value": "Lenses"
        },
        {
          "key": "channel",
          "value": "my-kafka-health-prd"
        },
        {
          "key": "icon-url",
          "value": "https://lenses.io/favicon-32x32.png"
        }
      ],
      "createdAt": "2020-03-05T11:47:22.970Z",
      "createdBy": "joe.bloggs",
      "updatedAt": "2020-03-05T11:47:22.970Z",
      "updatedBy": "joe.bloggs"
    }
  ],
  "pagesAmount": 1,
  "totalCount": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "values": {
      "type": "array"
    },
    "pagesAmount": {
      "type": "number"
    },
    "totalCount": {
      "type": "number"
    }
  },
  "required": [
    "values",
    "pagesAmount",
    "totalCount"
  ]
}

Create an alert channel
POST/api/v1/alert/channels

The JSON object representing the properties to set this channel with

Example URI

POST /api/v1/alert/channels
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Body
{
  "name": "kafka-prd-health",
  "templateName": "Slack",
  "connectionName": "slack-connection",
  "properties": [
    {
      "key": "username",
      "value": "Lenses"
    },
    {
      "key": "channel",
      "value": "my-kafka-health-prd"
    },
    {
      "key": "icon-url",
      "value": "https://lenses.io/favicon-32x32.png"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "templateName": {
      "type": "string"
    },
    "connectionName": {
      "type": "string"
    },
    "properties": {
      "type": "array"
    }
  },
  "required": [
    "name",
    "templateName",
    "connectionName",
    "properties"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "id": "db2391fe-8a71-4bfe-8c42-046201c1cf23",
}
Response  409
HideShow

Responds with Conflict when the supplied channel name is already used

Body
{
  "fields": [
    {
      "field": "Hello, world!",
      "error": "Hello, world!"
    }
  ],
  "error": "Hello, world!",
  "nonFieldErrors": []
}
Schema
{
  "type": "object",
  "properties": {
    "fields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "field",
          "error"
        ]
      }
    },
    "error": {
      "type": "string"
    },
    "nonFieldErrors": {
      "type": "array",
      "description": "+"
    }
  },
  "required": [
    "fields",
    "error",
    "nonFieldErrors"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  400
HideShow

An object wrapping field validation errors and other error messages

Headers
Content-Type: application/json
Body
{
  "fields": [
    {
      "field": "Hello, world!",
      "error": "Hello, world!"
    }
  ],
  "error": "Hello, world!",
  "nonFieldErrors": []
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "fields": {
      "type": "array"
    },
    "error": {
      "type": "string"
    },
    "nonFieldErrors": {
      "description": "+"
    }
  },
  "required": [
    "fields",
    "error",
    "nonFieldErrors"
  ]
}

Update an alert channel
PUT/api/v1/alert/channels/{id}

The JSON object representing the properties to set this channel with

Example URI

PUT /api/v1/alert/channels/1812c74a
URI Parameters
HideShow
id
string (required) Example: 1812c74a

5731-4921-9da4-9dd586160ef0 (required) - The alert channel id

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Body
{
  "name": "kafka-prd-health",
  "connectionName": "slack-connection",
  "properties": [
    {
      "key": "username",
      "value": "Lenses"
    },
    {
      "key": "channel",
      "value": "my-kafka-health-prd"
    },
    {
      "key": "icon-url",
      "value": "https://lenses.io/favicon-32x32.png"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "connectionName": {
      "type": "string"
    },
    "properties": {
      "type": "array"
    }
  },
  "required": [
    "name",
    "connectionName",
    "properties"
  ]
}
Response  204
Response  404
HideShow

Responds with NotFound when the supplied channel id doesn’t match any known channel

Body
{
  "fields": [
    {
      "field": "Hello, world!",
      "error": "Hello, world!"
    }
  ],
  "error": "Hello, world!",
  "nonFieldErrors": []
}
Schema
{
  "type": "object",
  "properties": {
    "fields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "field",
          "error"
        ]
      }
    },
    "error": {
      "type": "string"
    },
    "nonFieldErrors": {
      "type": "array",
      "description": "+"
    }
  },
  "required": [
    "fields",
    "error",
    "nonFieldErrors"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  409
HideShow

Responds with Conflict when the supplied channel name is already used

Body
{
  "fields": [
    {
      "field": "Hello, world!",
      "error": "Hello, world!"
    }
  ],
  "error": "Hello, world!",
  "nonFieldErrors": []
}
Schema
{
  "type": "object",
  "properties": {
    "fields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "field",
          "error"
        ]
      }
    },
    "error": {
      "type": "string"
    },
    "nonFieldErrors": {
      "type": "array",
      "description": "+"
    }
  },
  "required": [
    "fields",
    "error",
    "nonFieldErrors"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  400
HideShow

An object wrapping field validation errors and other error messages

Headers
Content-Type: application/json
Body
{
  "fields": [
    {
      "field": "Hello, world!",
      "error": "Hello, world!"
    }
  ],
  "error": "Hello, world!",
  "nonFieldErrors": []
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "fields": {
      "type": "array"
    },
    "error": {
      "type": "string"
    },
    "nonFieldErrors": {
      "description": "+"
    }
  },
  "required": [
    "fields",
    "error",
    "nonFieldErrors"
  ]
}

Delete an alert channel
DELETE/api/v1/alert/channels/{id}

Permanently delete an alert channel

Example URI

DELETE /api/v1/alert/channels/90cb0419
URI Parameters
HideShow
id
string (required) Example: 90cb0419

5d15-4960-9ea6-2ccb4d26ebb4 (required) - The alert channel id

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  204
Response  404
HideShow

Responds with NotFound when the supplied channel id doesn’t match any known channel

Body
{
  "fields": [
    {
      "field": "Hello, world!",
      "error": "Hello, world!"
    }
  ],
  "error": "Hello, world!",
  "nonFieldErrors": []
}
Schema
{
  "type": "object",
  "properties": {
    "fields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "field",
          "error"
        ]
      }
    },
    "error": {
      "type": "string"
    },
    "nonFieldErrors": {
      "type": "array",
      "description": "+"
    }
  },
  "required": [
    "fields",
    "error",
    "nonFieldErrors"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}

List alert settings
GET/api/v1/alert/settings

Example URI

GET /api/v1/alert/settings
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "categories": {
    "Infrastructure": [
      {
        "id": 1000,
        "description": "Kafka Broker is down",
        "category": "Infrastructure",
        "enabled": true,
        "channels": [
          {
            "id": "3d0bb810-5f45-4945-8086-0f7d4d9a7034",
            "name": "PagerDuty-incidents-prd",
            "templateName": "Pagerduty"
          }
        ],
        "conditionDetails": {},
        "isAvailable": true
      }
    ],
    "Consumers": [
      {
        "id": 2000,
        "description": "Consumer Lag exceeded",
        "category": "Consumers",
        "enabled": true,
        "conditionTemplate": "lag >= $Threshold-Number on group $Consumer-Group and topic $Topic-Name",
        "conditionRegex": "lag >= ([1-9][0-9]*) on group (\\b\\S+\\b) and topic (\\b\\S+\\b)",
        "docs": "Raises an alert when the consumer lag exceeds the threshold on any partition.",
        "conditions": {
          "f1074135-133c-46a9-9ca5-fb67682cca40": "lag >= 4000 on group group and topic positions"
        },
        "channels": [],
        "conditionDetails": {
          "f1074135-133c-46a9-9ca5-fb67682cca40": {
            "createdAt": "2020-03-05T11:47:23.416Z",
            "createdBy": "john-doe",
            "modifiedAt": "2020-03-05T11:47:23.416Z",
            "modifiedBy": "joe-bloggs",
            "channels": [
              {
                "id": "29fa0981-e383-401f-b610-f5e1e8d26ce2",
                "name": "slow-consumers-alerts",
                "templateName": "Webhook"
              }
            ],
            "conditionDsl": {
              "group": "group",
              "topic": "positions",
              "threshold": 4000
            }
          }
        },
        "isAvailable": true
      }
    ]
  }
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Update a fixed alert setting
PUT/api/v1/alert/settings/{alert_setting_id}

Update a fixed alert setting.

Example URI

PUT /api/v1/alert/settings/1000
URI Parameters
HideShow
alert_setting_id
string (required) Example: 1000

The Alert ID to enable

Request
HideShow

A request payload specifying whether to enable/disable the alert and supplying a distinct list of channel ids to route this alert to.

Headers
Content-Type: application/json
Body
{
  "enable": true,
  "channels": [
    "56fa0d2c-1f7c-4597-a61b-b52e1b43d81b",
    "dfd6273a-c1b5-4ff5-9b1e-6f3a044d3886"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "message": "Ok"
}
Response  404
HideShow
Headers
Content-Type: application/json
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Create an alert setting condition
POST/api/v1/alert/settings/{alert_setting_id}/conditions

For conditional rules, create a new custom alert condition.

Example URI

POST /api/v1/alert/settings/2000/conditions
URI Parameters
HideShow
alert_setting_id
string (required) Example: 2000

The Alert ID to enable. Currently only ConsumerLag (i.e. ID 2000) supports conditions.

Request
HideShow

The custom alert condition and a list of channel ids to route alerts to

Headers
Content-Type: application/json
Body
{
  "condition": "When lag >= 4000 on group group1 and topic __topology",
  "channels": [
    "5aab1753-7306-489b-8def-da9044a4f171",
    "ae9c809f-0c4b-4380-a8c8-1e1e1394b978"
  ]
}
Response  201
HideShow

The newly created alert condition unique id

Headers
Content-Type: application/json
Body
{
  "id": "1e385be7-8ca0-4c6d-935f-67c7d3761499"
}

Update an alert setting condition
PUT/api/v1/alert/settings/{alert_setting_id}/conditions/{condition_uuid}

For conditional rules, update an existing custom alert condition.

Example URI

PUT /api/v1/alert/settings/2000/conditions/50716b0c
URI Parameters
HideShow
alert_setting_id
string (required) Example: 2000

The Alert ID to enable. Currently only ConsumerLag (i.e. ID 2000) supports conditions.

condition_uuid
string (required) Example: 50716b0c

a171-48f7-a99f-dff915894f72 (required) - The condition unique identifier

Request
HideShow

The custom alert condition and a list of channel ids to route alerts to

Headers
Content-Type: application/json
Body
{
  "condition": "When lag >= 4000 on group group1 and topic __topology",
  "channels": [
    "56fa0d2c-1f7c-4597-a61b-b52e1b43d81b",
    "dfd6273a-c1b5-4ff5-9b1e-6f3a044d3886"
  ]
}
Response  200
HideShow
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied
Response  404
HideShow
Headers
Content-Type: text/plain
Body
The condition cannot be found

Delete an alert setting condition
DELETE/api/v1/alert/settings/{alert_setting_id}/conditions/{condition_uuid})

Example URI

DELETE /api/v1/alert/settings/2000/conditions/50716b0c)
URI Parameters
HideShow
alert_setting_id
string (required) Example: 2000

The Alert ID to enable. Currently only ConsumerLag (i.e. ID 2000) supports conditions.

condition_uuid
string (required) Example: 50716b0c

a171-48f7-a99f-dff915894f72 (required) - The condition unique identifier

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: text/plain
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied
Response  404
HideShow
Headers
Content-Type: text/plain
Body
The condition cannot be found

List alerts events
GET/api/v1/alert/events{?page,pageSize,summary,category,level,alertId}

Returns alerts events divided into pages. Allows to specify page number and page size.

Example URI

GET /api/v1/alert/events?page=1&pageSize=25&summary=active controllers&category=Infrastructure&level=INFO&alertId=1000
URI Parameters
HideShow
page
number (optional) Example: 1

The page number to be returned, must be greater than zero. Defaults to 1.

pageSize
number (required) Example: 25

The elements amount on a single page, must be greater than zero.

summary
string (optional) Example: active controllers

Allows to filter results by partial summary text

category
enum[string] - Allows to filter results by category (optional) Example: Infrastructure

Allows to filter results by category

Choices: Infrastructure Consumers Kafka Connect Topics

level
string (optional) Example: INFO

Allows to filter results by level

Choices: INFO LOW MEDIUM HIGH CRITICAL

alertId
number (optional) Example: 1000

Allows to filter by alert setting ID

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "pagesAmount": 100,
  "values": [
    {
      "level": "HIGH",
      "category": "Infrastructure",
      "tags": [],
      "instance": "Dev1",
      "summary": "summary",
      "docs": "documentation",
      "timestamp": 1562922234102,
      "alertId": 123,
      "map": [
        {}
      ]
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "pagesAmount": {
      "type": "number",
      "description": "Total amount of pages"
    },
    "values": {
      "type": "array",
      "description": "Alerts"
    }
  },
  "required": [
    "pagesAmount"
  ]
}
Response  400
HideShow
Headers
Content-Type: text/plain
Body
Error Message
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Delete alert events
DELETE/api/v1/alert/events{?timestamp}

Deletes alerts events with timestamps before the specified value

Example URI

DELETE /api/v1/alert/events?timestamp=1562922585000
URI Parameters
HideShow
timestamp
number (required) Example: 1562922585000

Timestamp (milliseconds since the epoch), for which any alerts older than it should be deleted

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Response  400
HideShow
Headers
Content-Type: text/plain
Body
Error Message
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Alert SSE API
GET/api/sse/alerts

The client should be configured to expect Server Side Events

"Accept": "application/json, text/event-stream"

The client should wait(infinite loop/forever) for incoming messages and stop when EOF.

Each message received starts with “data:” and ends with “\n”. If the message has not that prefix, skip it.

Example URI

GET /api/sse/alerts
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "level": "HIGH",
    "category": "Infrastructure",
    "tags": [],
    "instance": "Dev1",
    "summary": "summary",
    "docs": "documentation",
    "timestamp": 1562922234102,
    "alertId": 123,
    "map": [
      {}
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "level": {
          "type": "string",
          "description": "The type of alert.   INFO, LOW, MEDIUM, HIGH, CRITICAL"
        },
        "category": {
          "type": "string",
          "description": "There are a few categories provided from Infrastructure to Consumers, Topics, Kafka Connect"
        },
        "tags": {
          "type": "array",
          "description": "A sequence of tags for the alert"
        },
        "instance": {
          "type": "string",
          "description": "The Lenses instance. It can be Dev, QA or Prod"
        },
        "summary": {
          "type": "string",
          "description": "Contains the alert information"
        },
        "docs": {
          "type": "string",
          "description": "Contains the documentation link describing how the problem can be solved"
        },
        "timestamp": {
          "type": "number",
          "description": "Unix timestamp of the audit entry"
        },
        "alertId": {
          "type": "number",
          "description": "A unique identified for the alert type."
        },
        "map": {
          "type": "array",
          "description": "A set of key-values entries to allow easier routing of alerts"
        }
      },
      "description": "Alert object"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Prometheus

Lenses exposes a Prometheus API as it integrates and enriches it. All you need to do is add Lenses as an additional target on your Prometheus collector so it can consume usable metrics via the /metrics API

Prometheus endpoint
GET/metrics

Returns Prometheus formatted information for consumer lags and other kpis

  • Headers

    X-Kafka-Lenses-Token: XXXXX

Example URI

GET /metrics
Response  200
HideShow
Headers
Content-Type: text/plain
Body
# HELP lenses_topic_consumer_lag The lag of Stable consumer groups
# TYPE lenses_topic_consumer_lag gauge
lenses_partition_consumer_lag{topic="iot_data",partition="3",consumerGroup="consumer2"} 537
lenses_topic_consumer_lag{topic="topic1",consumerGroup="consumer1"} 0
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Audit

List audit entries
GET/api/audit{?pageSize,page,type,action,user,filter}

Returns audit entries divided into pages. Allows to specify page number and page size.

Example URI

GET /api/audit?pageSize=25&page=1&type=TOPIC&action=ADD&user=johnsmith&filter=Filters by resource Id and resource name. Allows a partial match, so that the user doesn't have to type in the entire resourceId
URI Parameters
HideShow
page
number (optional) Example: 1

The page number to be returned, must be greater than zero. Defaults to 1.

pageSize
number (required) Example: 25

The elements amount on a single page, must be greater than zero.

type
string (optional) Example: TOPIC

Allows to filter results by resource type affected

Choices: TOPIC TOPIC_DATA QUOTAS BROKER_CONFIG ACL SCHEMA PROCESSOR CONNECTOR KUBERNETES_EXTERNAL_APP KUBERNETES_SECRET KUBERNETES_NAMESPACE KUBERNETES_SERVICE_ACCOUNT KUBERNETES_SERVICE KUBERNETES_INGRESS CONSUMER_OFFSET DATA_POLICIES USER_MANAGEMENT_GROUP USER_MANAGEMENT_USER USER_MANAGEMENT_SERVICE_ACCOUNT LENSES USER CONNECTIONS

action
string (optional) Example: ADD

Allows to filter results by audit change

Choices: ADD REMOVE UPDATE INSERT STARTED STOPPED SCALED RESTARTED PAUSED VIEWED LOGIN LOGOUT

user
string (optional) Example: johnsmith

Allows to filter results by user who triggered audit entry

filter
string (required) Example: Filters by resource Id and resource name. Allows a partial match, so that the user doesn't have to type in the entire resourceId
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "pagesAmount": 100,
  "values": [
    {
      "type": "TOPIC",
      "action": "ADD",
      "user": "johnsmith",
      "timestamp": 329185402,
      "resourceId": "topicAbc",
      "resourceName": "topicAbc",
      "content": {}
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "pagesAmount": {
      "type": "number",
      "description": "Total amount of pages"
    },
    "values": {
      "type": "array",
      "description": "The audit entries"
    }
  },
  "required": [
    "pagesAmount"
  ]
}
Response  400
HideShow

Invalid request body.

Headers
Content-Type: application/json
Body
[
  {
    "field": "name",
    "error": "name cannot be empty"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

List audit values
GET/api/audit/values

Returns audit unique values of user id, audit type and change.

Example URI

GET /api/audit/values
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "users": [
    "Hello, world!"
  ],
  "types": [
    "Hello, world!"
  ],
  "actions": [
    "Hello, world!"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "users": {
      "type": "array",
      "description": "unique values of user ids in stored alerts"
    },
    "types": {
      "type": "array",
      "description": "unique values of audit types in stored alerts"
    },
    "actions": {
      "type": "array",
      "description": "unique values of audit changes in stored alerts"
    }
  }
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Delete audit entries
DELETE/api/audit{?timestamp}

Deletes audits with timestamps before the specified value

Example URI

DELETE /api/audit?timestamp=1562922585000
URI Parameters
HideShow
timestamp
number (required) Example: 1562922585000

Timestamp (milliseconds since the epoch), for which any audits older than it should be deleted

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Response  400
HideShow
Headers
Content-Type: text/plain
Body
Error Message
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Schemas

Lenses APIs for managing schemas in a Confluent API compatible schema registries.

List schemas

List schemas
GET/api/proxy-sr/subjects

Get a list of all subjects

Example URI

GET /api/proxy-sr/subjects
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "subject1",
  "schema2"
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Version of a subject

List subject versions
GET/api/proxy-sr/subjects/{subject}/versions

Example URI

GET /api/proxy-sr/subjects/subject/versions
URI Parameters
HideShow
subject
string (required) 

Name of the subject

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "1",
  "2"
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Register a new schema under a particular subject
POST/api/proxy-sr/subjects/{subject}/versions

Example URI

POST /api/proxy-sr/subjects/subject/versions
URI Parameters
HideShow
subject
string (required) 

Name of the subject

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Delete a subject and associated compatibility level
DELETE/api/proxy-sr/subjects/{subject}

Example URI

DELETE /api/proxy-sr/subjects/subject
URI Parameters
HideShow
subject
string (required) 

Name of the subject

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Get the schema for a particular subject id
GET/api/proxy-sr/schemas/ids/{id}

Example URI

GET /api/proxy-sr/schemas/ids/id
URI Parameters
HideShow
id
number (required) 

The ID of the subject

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Subject at version

Get the schema at a particular version
GET/api/proxy-sr/subjects/{subject}/versions/{versionId}

Example URI

GET /api/proxy-sr/subjects/subject/versions/versionId
URI Parameters
HideShow
subject
string (required) 

Name of the subject

versionId
number (required) 

The version of the subject to delete

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Delete a particular version of a subject
DELETE/api/proxy-sr/subjects/{subject}/versions/{versionId}

Example URI

DELETE /api/proxy-sr/subjects/subject/versions/versionId
URI Parameters
HideShow
subject
string (required) 

Name of the subject

versionId
number (required) 

The version of the subject to delete

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Compatibility Level

  • Request (application/json)

    • Headers

      X-Kafka-Lenses-Token: XXXXX

Update global compatibility level
PUT/api/proxy-sr/config

Example URI

PUT /api/proxy-sr/config
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Get global compatibility level
GET/api/proxy-sr/config

Example URI

GET /api/proxy-sr/config
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Change compatibility level of a subject
PUT/{subject}

Example URI

PUT /subject
URI Parameters
HideShow
subject
string (required) 

Name of the subject

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Body
{
  "compatibility": "BACKWARD"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "compatibility": {
      "type": "string",
      "enum": [
        "BACKWARD",
        "BACKWARD_TRANSITIVE",
        "FORWARD",
        "FORWARD_TRANSITIVE",
        "FULL",
        "FULL_TRANSITIVE",
        "NONE"
      ],
      "description": "Compatibility to set"
    }
  },
  "required": [
    "compatibility"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
"OK"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Get compatibility level for a subject
GET/{subject}

Example URI

GET /subject
URI Parameters
HideShow
subject
string (required) 

Name of the subject

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "compatibility": "FULL"
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

SQL Processors

SQL Processors

Lenses APIs for managing Lenses SQL Processors.

List all processors
GET/api/streams/

Example URI

GET /api/streams/
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "processors": {
    "targets": {
      "cluster": "aks",
      "namespaces": [
        "default"
      ]
    },
    "streams": {
      "id": "lsql_c7f177994db640cab95a99900c4fb7e7",
      "name": "cc_payments_freq_1min",
      "clusterName": "aks",
      "user": "admin",
      "uptime": 3387090,
      "sql": "INSERT INTO",
      "runners": 1,
      "deploymentState": "RUNNING",
      "topicValueDecoder": "STRING",
      "topicKeyDecoder": "LONG",
      "pipeline": "lenses",
      "startTs": 1522180383208,
      "toTopics": [
        "cc_payments_1m_freq"
      ],
      "runnerState": {
        "e94433cf-cf99-4e46-9adc-407bb06b35c2": {
          "id": "e94433cf-cf99-4e46-9adc-407bb06b35c2",
          "worker": "e94433cf-cf99-4e46-9adc-407bb06b35c2",
          "state": "RUNNING",
          "errorMsg": "Hello, world!"
        }
      },
      "lastAction": "Scaled to 3",
      "topology": [
        {
          "keyType": "LONG",
          "name": "cc_payments_freq_1min",
          "description": "cc_payments_freq_1min",
          "parents": [
            "Hello, world!"
          ],
          "valueType": "STRING",
          "descendants": [
            "Hello, world!"
          ],
          "isTable": false,
          "type": "TOPIC"
        }
      ]
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "processors": {
      "type": "object",
      "properties": {
        "targets": {
          "type": "object",
          "properties": {
            "cluster": {
              "type": "string",
              "description": "Available Kubernetes or Kafka Connect cluster to deploy to"
            },
            "namespaces": {
              "type": "array",
              "description": "Available Kubernetes namespaces if in Kubernetes mode"
            }
          },
          "required": [
            "cluster"
          ],
          "description": "Available Kubernetes clusters and namespaces in the clusters"
        },
        "streams": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string",
              "description": "Processor id"
            },
            "name": {
              "type": "string",
              "description": "Name of the procesor"
            },
            "clusterName": {
              "type": "string",
              "description": "Name of the Kubernetes or Kafka Connect cluster the procesor is deployed to (kubeconfig context name)"
            },
            "user": {
              "type": "string",
              "description": "Name of the user that deploy the procesor"
            },
            "uptime": {
              "type": "number",
              "description": "Time the procesor has been running in milliseconds"
            },
            "sql": {
              "type": "string",
              "description": "Lenses SQL statement"
            },
            "runners": {
              "type": "number",
              "description": "Number of runners deployed"
            },
            "deploymentState": {
              "type": "string",
              "enum": [
                "RUNNING",
                "FAILED",
                "STOPPED",
                "UNKNOWN"
              ],
              "description": "State of the deployment"
            },
            "topicValueDecoder": {
              "type": "string",
              "description": "The type of decoder used for the value of the messages"
            },
            "topicKeyDecoder": {
              "type": "string",
              "description": "The type of decoder used for the key of the messages"
            },
            "pipeline": {
              "type": "string",
              "description": "Tag added to the Kubernetes deployment"
            },
            "startTs": {
              "type": "number",
              "description": "Start time in milliseconds"
            },
            "toTopics": {
              "type": "array",
              "description": "The target topic to insert into"
            },
            "runnerState": {
              "type": "object",
              "properties": {
                "e94433cf-cf99-4e46-9adc-407bb06b35c2": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Runner id"
                    },
                    "worker": {
                      "type": "string",
                      "description": "Host or Pod the runner is running in"
                    },
                    "state": {
                      "type": "string",
                      "enum": [
                        "RUNNING",
                        "FAILED",
                        "STOPPED",
                        "UNKNOWN"
                      ],
                      "description": "State of the runner"
                    },
                    "errorMsg": {
                      "type": "string",
                      "description": "Error message if failed"
                    }
                  },
                  "required": [
                    "id",
                    "worker",
                    "state"
                  ],
                  "description": "Map of runner Runner Id to Runner State"
                }
              },
              "description": "State of the runner, map of runner id to state"
            },
            "lastAction": {
              "type": "string",
              "description": "Last action performed on the processor"
            },
            "topology": {
              "type": "array",
              "description": "The topology of the processor"
            }
          },
          "required": [
            "id",
            "name",
            "clusterName",
            "user",
            "uptime",
            "sql",
            "runners",
            "deploymentState",
            "topicValueDecoder",
            "topicKeyDecoder",
            "pipeline",
            "startTs",
            "toTopics",
            "lastAction"
          ],
          "description": "The registered SQL Processors"
        }
      }
    }
  }
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Get a processor
GET/api/streams/{processor_id}

Example URI

GET /api/streams/lsql_c7f177994db640cab95a99900c4fb7e7
URI Parameters
HideShow
processor_id
string (required) Example: lsql_c7f177994db640cab95a99900c4fb7e7

The processor id to look up

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "processor": {
    "id": "lsql_c7f177994db640cab95a99900c4fb7e7",
    "name": "cc_payments_freq_1min",
    "clusterName": "aks",
    "user": "admin",
    "uptime": 3387090,
    "sql": "INSERT INTO",
    "runners": 1,
    "deploymentState": "RUNNING",
    "topicValueDecoder": "STRING",
    "topicKeyDecoder": "LONG",
    "pipeline": "lenses",
    "startTs": 1522180383208,
    "toTopics": [
      "cc_payments_1m_freq"
    ],
    "runnerState": {
      "e94433cf-cf99-4e46-9adc-407bb06b35c2": {
        "id": "e94433cf-cf99-4e46-9adc-407bb06b35c2",
        "worker": "e94433cf-cf99-4e46-9adc-407bb06b35c2",
        "state": "RUNNING",
        "errorMsg": "Hello, world!"
      }
    },
    "lastAction": "Scaled to 3",
    "topology": [
      {
        "keyType": "LONG",
        "name": "cc_payments_freq_1min",
        "description": "cc_payments_freq_1min",
        "parents": [
          "Hello, world!"
        ],
        "valueType": "STRING",
        "descendants": [
          "Hello, world!"
        ],
        "isTable": false,
        "type": "TOPIC"
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "processor": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Processor id"
        },
        "name": {
          "type": "string",
          "description": "Name of the procesor"
        },
        "clusterName": {
          "type": "string",
          "description": "Name of the Kubernetes or Kafka Connect cluster the procesor is deployed to (kubeconfig context name)"
        },
        "user": {
          "type": "string",
          "description": "Name of the user that deploy the procesor"
        },
        "uptime": {
          "type": "number",
          "description": "Time the procesor has been running in milliseconds"
        },
        "sql": {
          "type": "string",
          "description": "Lenses SQL statement"
        },
        "runners": {
          "type": "number",
          "description": "Number of runners deployed"
        },
        "deploymentState": {
          "type": "string",
          "enum": [
            "RUNNING",
            "FAILED",
            "STOPPED",
            "UNKNOWN"
          ],
          "description": "State of the deployment"
        },
        "topicValueDecoder": {
          "type": "string",
          "description": "The type of decoder used for the value of the messages"
        },
        "topicKeyDecoder": {
          "type": "string",
          "description": "The type of decoder used for the key of the messages"
        },
        "pipeline": {
          "type": "string",
          "description": "Tag added to the Kubernetes deployment"
        },
        "startTs": {
          "type": "number",
          "description": "Start time in milliseconds"
        },
        "toTopics": {
          "type": "array",
          "description": "The target topic to insert into"
        },
        "runnerState": {
          "type": "object",
          "properties": {
            "e94433cf-cf99-4e46-9adc-407bb06b35c2": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Runner id"
                },
                "worker": {
                  "type": "string",
                  "description": "Host or Pod the runner is running in"
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "RUNNING",
                    "FAILED",
                    "STOPPED",
                    "UNKNOWN"
                  ],
                  "description": "State of the runner"
                },
                "errorMsg": {
                  "type": "string",
                  "description": "Error message if failed"
                }
              },
              "required": [
                "id",
                "worker",
                "state"
              ],
              "description": "Map of runner Runner Id to Runner State"
            }
          },
          "description": "State of the runner, map of runner id to state"
        },
        "lastAction": {
          "type": "string",
          "description": "Last action performed on the processor"
        },
        "topology": {
          "type": "array",
          "description": "The topology of the processor"
        }
      },
      "required": [
        "id",
        "name",
        "clusterName",
        "user",
        "uptime",
        "sql",
        "runners",
        "deploymentState",
        "topicValueDecoder",
        "topicKeyDecoder",
        "pipeline",
        "startTs",
        "toTopics",
        "lastAction"
      ]
    }
  }
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Create a processor
POST/api/streams

Example URI

POST /api/streams
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Body
{
  "name": "myProcessor",
  "sql": "SET autocreate=true;INSERT INTO topicB SELECT * FROM topicA",
  "runners": 1,
  "clusterName": "aks",
  "namespace": "lenses"
}
Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the processor"
    },
    "sql": {
      "type": "string",
      "description": "The SQL to runner"
    },
    "runners": {
      "type": "number",
      "description": "The number of runners (instances) to runner"
    },
    "clusterName": {
      "type": "string",
      "description": "The cluster to deploy to"
    },
    "namespace": {
      "type": "string",
      "description": "The Kubernetes namespace to deploy if in Kubernetes mode"
    }
  },
  "required": [
    "name",
    "sql",
    "runners",
    "clusterName"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  200
HideShow
Headers
Content-Type: application/text
Body
`lsql_c7f177994db640cab95a99900c4fb7e7`
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Scale a processor
PUT/api/streams/{processor_id}/scale/{runners}

Example URI

PUT /api/streams/lsql_c7f177994db640cab95a99900c4fb7e7/scale/5
URI Parameters
HideShow
processor_id
string (required) Example: lsql_c7f177994db640cab95a99900c4fb7e7

The processor_id to scale

runners
number (required) Example: 5

The number of runners to scale to

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/text
Body
Processor [lsql_c7f177994db640cab95a99900c4fb7e7] scaled
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Pause a processor
PUT/api/streams/{processor_id}/pause

Example URI

PUT /api/streams/lsql_c7f177994db640cab95a99900c4fb7e7/pause
URI Parameters
HideShow
processor_id
string (required) Example: lsql_c7f177994db640cab95a99900c4fb7e7

The processor_id to pause

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/text
Body
Processor [lsql_c7f177994db640cab95a99900c4fb7e7] paused
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Resume a processor
PUT/api/streams/{processor_id}/resume

Example URI

PUT /api/streams/lsql_c7f177994db640cab95a99900c4fb7e7/resume
URI Parameters
HideShow
processor_id
string (required) Example: lsql_c7f177994db640cab95a99900c4fb7e7

The processor_id to resume

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/text
Body
Processor [lsql_c7f177994db640cab95a99900c4fb7e7] resumed
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Delete a processor
DELETE/api/streams/{processor_id}

Example URI

DELETE /api/streams/lsql_c7f177994db640cab95a99900c4fb7e7
URI Parameters
HideShow
processor_id
string (required) Example: lsql_c7f177994db640cab95a99900c4fb7e7

The processor_id to delete

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/text
Body
Processor [lsql_c7f177994db640cab95a99900c4fb7e7] deleted
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied

Connections

APIs for managing connections.

Connection Templates

List all connection templates
GET/api/v1/connection/connection-templates

List all connection templates.

Example URI

GET /api/v1/connection/connection-templates
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application / json
Body
[
  {
    "name": "connection",
    "version": 1,
    "category": "Connection",
    "type": "Hello, world!",
    "metadata": {
      "author": "Lenses.io",
      "description": "Connection for Apache Cassandra"
    },
    "configuration": [
      {
        "key": "connect.cassandra.contact.points",
        "displayName": "Contact points",
        "placeholder": "host",
        "description": "Comma separated list of Cassandra nodes",
        "type": {
          "name": "STRING",
          "displayName": "long"
        },
        "required": true,
        "mounted": false
      }
    ],
    "builtIn": true,
    "enabled": true,
    "templateVersion": 1
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "template-name (required, string) - unique name for the connection template"
      },
      "version": {
        "type": "number",
        "description": "External service version (e.g ElasticSearch *5.2* or *6.0* )"
      },
      "category": {
        "enum": [
          "Connection",
          "App",
          "Integration"
        ],
        "description": "Connection category"
      },
      "type": {
        "type": "string",
        "description": "Connection type (e.g. Alerts integration(Slack or Datadog), Kafka connections(kafka, SR), Datasources connection(Elastic, Redis etc))"
      },
      "metadata": {
        "type": "object",
        "properties": {
          "author": {
            "type": "string",
            "description": "name of connection template author (Lenses.io for built in templates)"
          },
          "description": {
            "type": "string",
            "description": "short sentence describing the connection\\"
          }
        },
        "required": [
          "author",
          "description"
        ],
        "description": "additional connection information"
      },
      "configuration": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "key": {
              "type": "string",
              "description": "key assigned to the field (used to identify the field)"
            },
            "displayName": {
              "type": "string",
              "description": "label"
            },
            "placeholder": {
              "type": "string",
              "description": "001,host-002 (optional, string) - value displayed in the input element"
            },
            "description": {
              "type": "string",
              "description": "short property description"
            },
            "type": {
              "type": "object",
              "properties": {
                "name": {
                  "enum": [
                    "STRING",
                    "NUMBER",
                    "SECRET",
                    "BOOLEAN",
                    "ARRAY",
                    "BASE64",
                    "MULTILINE"
                  ]
                },
                "displayName": {
                  "type": "string",
                  "description": "text (optional, string)"
                }
              },
              "required": [
                "name"
              ]
            },
            "required": {
              "type": "boolean",
              "description": "whether parameter is required or optional"
            },
            "mounted": {
              "type": "boolean",
              "description": "whether parameter value will be mounted as a file"
            }
          },
          "required": [
            "key",
            "displayName",
            "type",
            "required",
            "mounted"
          ]
        },
        "description": "connection template"
      },
      "builtIn": {
        "type": "boolean",
        "description": "true for built-in template, false for a custom template (defined by the user)"
      },
      "enabled": {
        "type": "boolean",
        "description": "true if it's an active connection template"
      },
      "templateVersion": {
        "type": "number",
        "description": "Lenses internal templating version - This version will be automatically increased in every update _(when update endpoint will be implementation)_"
      }
    },
    "required": [
      "version",
      "category",
      "type",
      "metadata",
      "configuration",
      "builtIn",
      "enabled",
      "templateVersion"
    ]
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  401
HideShow

The client is not authenticated.

Headers
Content-Type: text/plain
Response  403
HideShow

The client is unauthorized to list connection templates.

Headers
Content-Type: text/plain
Response  500
HideShow

Failed to read. Internal server error.

Headers
Content-Type: text/plain

Connection

Add Connection
POST/api/v1/connection/connections

Adds connection instance. Note that the name of the connection must be a 1-127 character string, containing only 0-9, a-z, A-Z, and -. Requires ManageConnections permission.

Example URI

POST /api/v1/connection/connections
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Body
{
  "tags": [
    "t1",
    "t2"
  ],
  "configuration": [
    {
      "key": "users",
      "value <number>": 1
    }
  ],
  "name": "users",
  "templateName": "template"
}
Schema
{
  "type": "object",
  "properties": {
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "list of tags assigned to the connection."
    },
    "configuration": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "store (required, string) - Name of the configuration property. Must be a 1-127 character string, containing only 0-9, a-z, A-Z, and -./"
          },
          "value <number>": {
            "type": "number",
            "description": "Value of the configuration property."
          },
          "value <string>": {
            "type": "string",
            "description": "Value of the configuration property."
          },
          "value <boolean>": {
            "type": "boolean",
            "description": "Value of the configuration property."
          },
          "value <array>": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Value of the configuration property."
          }
        },
        "allOf": [
          {
            "not": {
              "required": [
                "value <number>",
                "value <string>",
                "value <boolean>",
                "value <array>"
              ]
            }
          }
        ]
      },
      "description": "configuration properties needed by the connection to be built."
    },
    "name": {
      "type": "string",
      "description": "store (required, string) - Name of the connection. Must be a 1-127 character string, containing only 0-9, a-z, A-Z, and -."
    },
    "templateName": {
      "type": "string",
      "description": "name (required, string) - Template name the connection will be based on."
    }
  },
  "required": [
    "configuration"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  200
HideShow

The connection has been successfully added.

Headers
Content-Type: application/json
Body
{
  "name": "connection"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "name (required, string) - Name of the created connection."
    }
  }
}
Response  400
HideShow

Invalid request body. It can be due to invalid field content or the provided name already exists.

Headers
Content-Type: application/json
Body
{
  "fields": [
    {
      "field": "configuration.displayName",
      "error": "secretId cannot be empty"
    }
  ],
  "error": "required fields are missing"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "fields": {
      "type": "array",
      "description": "list of the fields with invalid or missing values (can be empty)"
    },
    "error": {
      "type": "string",
      "description": "description of the problem"
    }
  },
  "required": [
    "fields",
    "error"
  ]
}
Response  401
HideShow

The client is not authenticated.

Headers
Content-Type: text/plain
Body
The client is not authenticated
Response  403
HideShow

The client is not authorized to add a connection.

Headers
Content-Type: text/plain
Body
The client is not authorized to add custom connection templates
Response  500
HideShow

Internal server error.

Headers
Content-Type: text/plain
Body
Error creating a connection. Internal server error

List all connections
GET/api/v1/connection/connections

List all connection instances.

Example URI

GET /api/v1/connection/connections
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application / json
Body
[
  {
    "name": "users",
    "tags": [
      "t1",
      "t2"
    ],
    "templateName": "template",
    "templateVersion": 1,
    "readOnly": true
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "store (required, string) - name of the connection instance"
      },
      "tags": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "list of tags assigned to connection"
      },
      "templateName": {
        "type": "string",
        "description": "1 (required, string) - connection template name"
      },
      "templateVersion": {
        "type": "number",
        "description": "Version of the connection template"
      },
      "readOnly": {
        "type": "boolean",
        "description": "flags read-only connections that are provided with Lenses Installation(e.g: Kafka and Schema Registry)"
      }
    },
    "required": [
      "templateVersion"
    ]
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The client is not authenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client is unauthorized to list connections.
Response  500
HideShow
Headers
Content-Type: text/plain
Body
Failed to read. Internal server error.

Update Connection
PUT/api/v1/connection/connections/{name}

Updates connection instance. The connection name is not updatable as well as templateName. Existing configuration properties not provided in the update request body will be pruned. Requires ManageConnections permission.

Example URI

PUT /api/v1/connection/connections/name
URI Parameters
HideShow
name
string (required) 

Name of the connection to be updated.

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Body
{
  "tags": [
    "t1",
    "t2"
  ],
  "configuration": [
    {
      "key": "users",
      "value <number>": 1
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "list of tags assigned to the connection."
    },
    "configuration": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "description": "store (required, string) - Name of the configuration property. Must be a 1-127 character string, containing only 0-9, a-z, A-Z, and -./"
          },
          "value <number>": {
            "type": "number",
            "description": "Value of the configuration property."
          },
          "value <string>": {
            "type": "string",
            "description": "Value of the configuration property."
          },
          "value <boolean>": {
            "type": "boolean",
            "description": "Value of the configuration property."
          },
          "value <array>": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Value of the configuration property."
          }
        },
        "allOf": [
          {
            "not": {
              "required": [
                "value <number>",
                "value <string>",
                "value <boolean>",
                "value <array>"
              ]
            }
          }
        ]
      },
      "description": "configuration properties needed by the connection to be built."
    }
  },
  "required": [
    "configuration"
  ],
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  200
HideShow

The connection has been successfully updated. The response contains the name of the updated connection.

Headers
Content-Type: application/json
Body
{
  "name": "connection"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "name (required, string) - Name of the created connection."
    }
  }
}
Response  400
HideShow

Invalid request body. It can be due to invalid field content or the provided name already exists.

Headers
Content-Type: application/json
Body
{
  "fields": [
    {
      "field": "configuration.displayName",
      "error": "secretId cannot be empty"
    }
  ],
  "error": "required fields are missing"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "fields": {
      "type": "array",
      "description": "list of the fields with invalid or missing values (can be empty)"
    },
    "error": {
      "type": "string",
      "description": "description of the problem"
    }
  },
  "required": [
    "fields",
    "error"
  ]
}
Response  401
HideShow

The client is not authenticated.

Headers
Content-Type: text/plain
Body
The client is not authenticated
Response  403
HideShow

The client is not authorized to update the connection instance.

Headers
Content-Type: text/plain
Body
The client is not authorized to update connection instance
Response  404
HideShow

Connection with the provided name could not be found.

Headers
Content-Type: text/plain
Body
The requested connection could not be found
Response  409
HideShow

The connection is Read-Only and cannot be updated

Headers
Content-Type: application/json
Body
{
  "error": "`Read-only` Connection cannot be updated"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "description of an issue"
    }
  },
  "required": [
    "error"
  ]
}
Response  500
HideShow

Internal server error.

Headers
Content-Type: text/plain
Body
Error updating connection. Internal server error

Delete Connection
DELETE/api/v1/connection/connections/{name}

Delete a Connection instance. Requires ManageConnections permission.

Example URI

DELETE /api/v1/connection/connections/name
URI Parameters
HideShow
name
string (required) 

Name of the connection (Lenses)

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: text/plain
Body
Connection deleted
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied
Response  404
HideShow
Headers
Content-Type: text/plain
Body
The requested connection could not be found
Response  409
HideShow

The connection is Read-Only or in use and cannot be deleted

Headers
Content-Type: application/json
Body
{
  "error": "`Read-only` Connections cannot be deleted"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "description of an issue"
    }
  },
  "required": [
    "error"
  ]
}
Response  500
HideShow
Headers
Content-Type: text/plain
Body
Failed to delete the connection. Internal server error

Get connection details
GET/api/v1/connection/connections/{name}

Returns a Connection instance. The user will need ManageConnections permission to see the contents of the configuration array(sensitive data).

Example URI

GET /api/v1/connection/connections/name
URI Parameters
HideShow
name
string (required) 

Unique name assigned to the connection (Lenses)

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "users",
  "tags": [
    "t1",
    "t2"
  ],
  "templateName": "template",
  "templateVersion": 1,
  "readOnly": true,
  "builtIn": true,
  "configuration": [
    {
      "key": "users",
      "value <number>": 1,
      "type": "STRING"
    }
  ],
  "createdBy": "user1",
  "createdAt": 1559353700,
  "modifiedBy": "user2",
  "modifiedAt": 1559353700
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "store (required, string) - name of the connection instance"
    },
    "tags": {
      "type": "array",
      "description": "list of tags assigned to connection"
    },
    "templateName": {
      "type": "string",
      "description": "1 (required, string) - connection template name"
    },
    "templateVersion": {
      "type": "number",
      "description": "Version of the connection template"
    },
    "readOnly": {
      "type": "boolean",
      "description": "flags read-only connections that are provided with Lenses Installation(e.g: Kafka and Schema Registry)"
    },
    "builtIn": {
      "type": "boolean",
      "description": "flags the connections that are based on built-in connection-templates provided by Lenses.io"
    },
    "configuration": {
      "type": "array",
      "description": "Configuration Options for each connection. The user will need *ManageConnections* permission in order to see the contents of the configuration array(sensitive data)."
    },
    "createdBy": {
      "type": "string"
    },
    "createdAt": {
      "type": "number"
    },
    "modifiedBy": {
      "type": "string"
    },
    "modifiedAt": {
      "type": "number"
    }
  },
  "required": [
    "templateVersion",
    "configuration",
    "createdBy",
    "createdAt",
    "modifiedBy",
    "modifiedAt"
  ]
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
Permission denied
Response  404
HideShow
Headers
Content-Type: text/plain
Body
The requested connection could not be found
Response  500
HideShow
Headers
Content-Type: text/plain
Body
Failed to read the connection. Internal server error

User Group Management

User management allows clients to create, edit, and delete user accounts, service accounts and groups. In order to support the stringent requirements from enterprises, Lenses supports a few authentication modes as well as an authorization approach to meet the various configuration a client might have.

Lenses permission management system makes it easy to manage permissions for groups. The permissions system isn not based on hierarchical roles, but rather on groups, reflecting Unix and Windows-based permissions. You can create groups that have pre-defined (fully customizable) permissions sets; users added to a group inherit the permissions of that group.

Permissions are granted based on group assignment. Permissions are granted to groups and users are assigned to groups, as illustrated below:

Lenses group permissions

Groups

List groups
GET/api/v1/group

Returns all the groups.

Example URI

GET /api/v1/group
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "name": "DevAdmin",
    "description": "some info 2",
    "namespaces": [
      {
        "wildcards": [
          "*"
        ],
        "permissions": [
          "CreateTopic",
          "DropTopic",
          "ConfigureTopic",
          "QueryTopic",
          "ShowTopic",
          "ViewSchema"
        ],
        "system": "Kafka",
        "instance": "Dev"
      },
      {
        "wildcards": [
          "abc*"
        ],
        "permissions": [
          "QueryTopic",
          "ShowTopic",
          "ViewSchema"
        ],
        "system": "Kafka",
        "instance": "Dev"
      }
    ],
    "scopedPermissions": [
      "ViewKafkaConsumers",
      "ManageKafkaConsumers",
      "ViewConnectors",
      "ManageConnectors",
      "ViewSQLProcessors",
      "ManageSQLProcessors",
      "ViewSchemaRegistry",
      "ViewTopology",
      "ManageTopology"
    ],
    "adminPermissions": [
      "ViewDataPolicies",
      "ViewAuditLogs",
      "ViewUsers",
      "ManageUsers",
      "ViewAlertRules",
      "ManageAlertRules",
      "ViewKafkaSettings",
      "ManageKafkaSettings"
    ],
    "userAccounts": 1,
    "serviceAccounts": 0
  },
  {
    "name": "janitors",
    "description": "only head of janitors",
    "namespaces": [
      {
        "wildcards": [
          "*"
        ],
        "permissions": [
          "ConfigureTopic",
          "QueryTopic",
          "ShowTopic",
          "ViewSchema"
        ],
        "system": "Kafka",
        "instance": "Dev"
      }
    ],
    "scopedPermissions": [
      "ViewKafkaConsumers",
      "ManageKafkaConsumers",
      "ViewConnectors",
      "ManageConnectors",
      "ViewSQLProcessors",
      "ViewSchemaRegistry",
      "ViewTopology"
    ],
    "adminPermissions": [
      "ViewDataPolicies",
      "ViewAuditLogs",
      "ViewUsers",
      "ManageUsers",
      "ViewAlertRules",
      "ManageAlertRules",
      "ViewKafkaSettings",
      "ManageKafkaSettings"
    ],
    "userAccounts": 0,
    "serviceAccounts": 0
  }
]
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "view" permission.

Get a group
GET/api/v1/group/{groupname}

Returns a group identified by the group name

Example URI

GET /api/v1/group/groupname
URI Parameters
HideShow
groupname
string (required) 

The unique identifier for the user group (required)

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "DevAdmin",
  "description": "some info 2",
  "namespaces": [
    {
      "wildcards": [
        "*"
      ],
      "permissions": [
        "CreateTopic",
        "DropTopic",
        "ConfigureTopic",
        "QueryTopic",
        "ShowTopic",
        "ViewSchema"
      ],
      "system": "Kafka",
      "instance": "Dev"
    },
    {
      "wildcards": [
        "abc*"
      ],
      "permissions": [
        "QueryTopic",
        "ShowTopic",
        "ViewSchema"
      ],
      "system": "Kafka",
      "instance": "Dev"
    }
  ],
  "scopedPermissions": [
    "ViewKafkaConsumers",
    "ManageKafkaConsumers",
    "ViewConnectors",
    "ManageConnectors",
    "ViewSQLProcessors",
    "ManageSQLProcessors",
    "ViewSchemaRegistry",
    "ViewTopology",
    "ManageTopology"
  ],
  "adminPermissions": [
    "ViewDataPolicies",
    "ViewAuditLogs",
    "ViewUsers",
    "ManageUsers",
    "ViewAlertRules",
    "ManageAlertRules",
    "ViewKafkaSettings",
    "ManageKafkaSettings"
  ],
  "userAccounts": 1,
  "serviceAccounts": 0
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "manage" permission.
Response  404
HideShow
Headers
Content-Type: text/plain
Body
The requested group does not exist

Create a group
POST/api/v1/group

Creates a new group. The name must be unique.

Example URI

POST /api/v1/group
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Body
{
  "name": "janitors",
  "description": "only head of janitors",
  "scopedPermissions": [
    "ViewKafkaConsumers",
    "ManageKafkaConsumers",
    "ViewConnectors",
    "ManageConnectors",
    "ViewSQLProcessors",
    "ManageSQLProcessors",
    "ViewSchemaRegistry",
    "ManageSchemaRegistry",
    "ViewTopology",
    "ManageTopology"
  ],
  "adminPermissions": [
    "ViewDataPolicies",
    "ManageDataPolicies",
    "ViewAuditLogs",
    "ViewUsers",
    "ManageUsers",
    "ViewAlertRules",
    "ManageAlertRules",
    "ViewKafkaSettings",
    "ManageKafkaSettings"
  ],
  "namespaces": [
    {
      "wildcards": [
        "*"
      ],
      "permissions": [
        "CreateTopic",
        "DropTopic",
        "ConfigureTopic",
        "QueryTopic",
        "ShowTopic",
        "ViewSchema",
        "InsertData",
        "DeleteData",
        "UpdateTablestore"
      ],
      "system": "Kafka",
      "instance": "Dev"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "required": true
    },
    "description": {
      "type": "string",
      "required": false
    },
    "adminPermissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "required": false
    },
    "scopedPermissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "required": true
    },
    "namespaces": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "instance": {
            "type": "string",
            "required": true
          },
          "system": {
            "type": "string",
            "required": true
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "required": false
          },
          "wildcards": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "required": false
          }
        }
      },
      "required": true
    }
  }
}
Response  200
HideShow
Headers
Content-Type: text/plain
Body
Group has been created.
Response  400
HideShow

The given group is invalid. Could be invalid or missing group name, invalid or missing regex on namespace, invalid description of group.

Headers
Content-Type: application/json
Body
[
  {
    "field": "group",
    "error": "Invalid group name"
  },
  {
    "field": "namespace",
    "error": "Invalid namespace regex '*'"
  },
  {
    "field": "description",
    "error": "Invalid description"
  }
]
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "manage" permission.

Update a group
PUT/api/v1/group/{groupname}

Updates a group identified by the group name.

Example URI

PUT /api/v1/group/groupname
URI Parameters
HideShow
groupname
string (required) 

The unique identifier for the user (required)

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "description": "only head of janitors",
  "scopedPermissions": [
    "ViewKafkaConsumers",
    "ManageKafkaConsumers",
    "ViewConnectors",
    "ManageConnectors",
    "ViewSQLProcessors",
    "ManageSQLProcessors",
    "ViewSchemaRegistry",
    "ManageSchemaRegistry",
    "ViewTopology",
    "ManageTopology"
  ],
  "adminPermissions": [
    "ViewDataPolicies",
    "ManageDataPolicies",
    "ViewAuditLogs",
    "ViewUsers",
    "ManageUsers",
    "ViewAlertRules",
    "ManageAlertRules",
    "ViewKafkaSettings",
    "ManageKafkaSettings"
  ],
  "namespaces": [
    {
      "wildcards": [
        "*"
      ],
      "permissions": [
        "CreateTopic",
        "DropTopic",
        "ConfigureTopic",
        "QueryTopic",
        "ShowTopic",
        "ViewSchema",
        "InsertData",
        "DeleteData",
        "UpdateTablestore"
      ],
      "system": "Kafka",
      "instance": "Dev"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "description": {
      "type": "string",
      "required": false
    },
    "adminPermissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "required": false
    },
    "scopedPermissions": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "required": true
    },
    "namespaces": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "instance": {
            "type": "string",
            "required": true
          },
          "system": {
            "type": "string",
            "required": true
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "required": false
          },
          "wildcards": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "required": false
          }
        }
      },
      "required": true
    }
  }
}
Response  200
HideShow
Headers
Content-Type: text/plain
Body
Group has been update.
Response  400
HideShow

The given group is invalid. Could be invalid or missing group name, invalid or missing regex on namespace, invalid description of group.

Headers
Content-Type: application/json
Body
[
  {
    "field": "group",
    "error": "Invalid group name"
  },
  {
    "field": "namespace",
    "error": "Invalid namespace regex '*'"
  },
  {
    "field": "description",
    "error": "Invalid description"
  }
]
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "manage" permission.

Delete a group
DELETE/api/v1/group/{groupname}

Deletes a group identified by the group name

Example URI

DELETE /api/v1/group/groupname
URI Parameters
HideShow
groupname
string (required) 

The unique identifier for the user group (required)

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: text/plain
Body
Group is deleted
Response  400
HideShow
Headers
Content-Type: text/plain
Body
The requested group does not exist or could not be deleted because it is in use by one or more users or service accounts.
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "manage" permission.

Clone a group
POST/api/v1/group/{group}/clone/{newname}

Copies a group with a new name.

Example URI

POST /api/v1/group/group/clone/newname
URI Parameters
HideShow
group
string (required) 

The unique identifier for the user group to copy (required)

newname
string (required) 

The unique identifier for the name of the copied group (required)

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: text/plain
Body
Group is has been copied under the new name
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "manage" permission.
Response  400
HideShow
Headers
Content-Type: text/plain
Body
The source group does not exist or the target group name already exists. This API will not overwrite an existing group.

User Accounts

These are entries which are associated only with the basic authentication. With basic authentication, Lenses is responsible for managing the username and password entries. When LDAP is enabled (it is supported to combine basic and LDAP), the LDAP users are not listed/managed. Your LDAP setup would has tools to handle that.

List user accounts
GET/api/v1/user

Returns all the user accounts in the security management layer.

Example URI

GET /api/v1/user
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "username": "sam",
    "email": "sam@landoop.com",
    "groups": [
      "foo",
      "bar"
    ]
  },
  {
    "username": "stef",
    "groups": [
      "boo"
    ],
    "type": "BASIC"
  }
]
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "view" permission.

Get a user
GET/api/v1/user/{username}

Returns a user identified by the given username.

Example URI

GET /api/v1/user/username
URI Parameters
HideShow
username
string (required) 

The unique identifier for the user (required)

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "username": "sam",
  "email": "sam@landoop.com",
  "groups": [
    "foo",
    "bar"
  ],
  "type": "BASIC"
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "view" permission.
Response  404
HideShow
Headers
Content-Type: text/plain
Body
The requested user does not exist

Create a user
POST/api/v1/user/

Creates a new user, username (string) must be unique.

Example URI

POST /api/v1/user/
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Request
HideShow
Headers
Content-Type: application/json
Body
{
   "username":"sammy",
   "email":"sam@landoop.com",
   "password":"letmein",
   "groups:["foo"]
   "type": "BASIC/KERBEROS"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "username": {
      "type": "string",
      "required": true
    },
    "email": {
      "type": "string",
      "required": false
    },
    "password": {
      "type": "string",
      "required": true
    },
    "groups": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "required": true
    },
    "type": {
      "type": "string",
      "required": true
    },
  }
}
Response  200
HideShow
Headers
Content-Type: text/plain
Body
User has been created.
Response  400
HideShow

The provided entity is invalid. Examples include invalid or missing username, invalid email, invalid password, invalid group name or group name does not exist.

Headers
Content-Type: application/json
Body
[
  {
    "field": "username",
    "error": "Invalid username"
  },
  {
    "field": "groups",
    "error": "Invalid group name"
  },
  {
    "field": "password",
    "error": "Invalid password"
  },
  {
    "field": "email",
    "error": "Invalid email"
  }
]
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "manage" permission.

Update a user
PUT/api/v1/user/{username}

Updates a user identified by the username.

Example URI

PUT /api/v1/user/username
URI Parameters
HideShow
username
string (required) 

The unique identifier for the user (required)

Request
HideShow
Headers
Content-Type: application/json
Body
{
   "email":"sam@landoop.com",
   "groups:["foo"]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "required": false
    },
    "groups": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "required": true
    }
  }
}
Response  200
HideShow
Headers
Content-Type: text/plain
Body
User has been updated.
Response  400
HideShow

The provided entity is invalid. Examples include invalid email, invalid group name or group name does not exist.

Headers
Content-Type: application/json
Body
[
  {
    "field": "groups",
    "error": "Invalid group name"
  },
  {
    "field": "email",
    "error": "Invalid email"
  }
]
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "manage" permission.

Update user password
PUT/api/v1/user/{username}/password

Updates a users password, only if the user type is BASIC. For Kerberos this is not allowed

Example URI

PUT /api/v1/user/username/password
URI Parameters
HideShow
username
string (required) 

The unique identifier for the user (required)

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "value": "password"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "value": {
      "type": "string",
      "required": true
    }
  }
}
Response  200
HideShow
Headers
Content-Type: text/plain
Body
Password has been updated.
Response  400
HideShow

The provided entity is invalid. Examples include empty value or no value at all.

Headers
Content-Type: application/json
Body
"Invalid password"
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "manage" permission.

Delete a user
DELETE/api/v1/user/{username}

Deletes a user identified by the username.

Example URI

DELETE /api/v1/user/username
URI Parameters
HideShow
username
string (required) 

The unique identifier for the user (required)

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: text/plain
Body
User is deleted
Response  400
HideShow
Headers
Content-Type: text/plain
Body
The requested user does not exist.
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "manage" permission.

Service Accounts

List service accounts
GET/api/v1/serviceaccount

Returns all the service accounts in the security management layer.

Example URI

GET /api/v1/serviceaccount
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "name": "pam",
    "owner": "paul",
    "groups": [
      "foo"
    ]
  },
  {
    "name": "sam",
    "owner": null,
    "groups": [
      "bar"
    ]
  },
  {
    "name": "tim",
    "owner": null,
    "groups": [
      "foo"
    ]
  }
]
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "view" permission.

Get a service account
GET/api/v1/serviceaccount/{name}

Returns a service account identified by the given account name.

Example URI

GET /api/v1/serviceaccount/name
URI Parameters
HideShow
name
string (required) 

The unique identifier for the service account (required)

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "pam",
  "owner": "paul",
  "groups": [
    "foo"
  ]
}
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "view" permission.
Response  404
HideShow
Headers
Content-Type: text/plain
Body
The requested service account does not exist

Create a service account
POST/api/v1/serviceaccount/

Creates a new service account. The name must be unique. If token is not provided one will be randomly generated and returned in the response.

Example URI

POST /api/v1/serviceaccount/
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXX
Body
{
  "name": "sammy",
  "owner": "bossman",
  "groups": [
    "foo",
    "bar"
  ],
  "token": "4cbddcfd-a5ca-4d6e-acc5-4f5db3c9548f"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "required": true
    },
    "owner": {
      "type": "string",
      "required": false
    },
    "groups": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "required": true
    },
    "token": {
      "type": "string",
      "required": false
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "token": "4cbddcfd-a5ca-4d6e-acc5-4f5db3c9548f"
}
Response  400
HideShow

The provided entity is invalid. Could be invalid or missing account name, invalid owner, invalid token, invalid group name or group name does not exist.

Headers
Content-Type: application/json
Body
[
  {
    "field": "name",
    "error": "Invalid account name"
  },
  {
    "field": "groups",
    "error": "Invalid group name"
  }
]
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "manage" permission.

Update a service account
PUT/api/v1/serviceaccount/{name}

Updates a service account identified by the account name.

Example URI

PUT /api/v1/serviceaccount/name
URI Parameters
HideShow
name
string (required) 

The unique identifier for the service account (required)

Request
HideShow
Headers
Content-Type: application/json
Body
{
   "owner":"sam@landoop.com",
   "groups:["foo"]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "owner": {
      "type": "string",
      "required": false
    },
    "groups": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "required": true
    }
  }
}
Response  200
HideShow
Headers
Content-Type: text/plain
Body
Service account has been updated.
Response  400
HideShow

The provided entity is invalid. Could be invalid or missing accout name, invalid owner, invalid or missing token, invalid group name or group name does not exist.

Headers
Content-Type: application/json
Body
[
  {
    "field": "name",
    "error": "Invalid account name"
  },
  {
    "field": "groups",
    "error": "Invalid group name"
  }
]
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "manage" permission.

Delete a service account
DELETE/api/v1/serviceaccount/{name}

Deletes a service account identified by the name.

Example URI

DELETE /api/v1/serviceaccount/name
URI Parameters
HideShow
name
string (required) 

The unique identifier for the service account (required)

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: text/plain
Body
Service account is deleted
Response  400
HideShow
Headers
Content-Type: text/plain
Body
The requested service account does not exist.
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "manage" permission.

Revoke a service account token
PUT/api/v1/serviceaccount/{name}/revoke

Revokes the current service account token. A new token is assigned to the service account.

Example URI

PUT /api/v1/serviceaccount/name/revoke
URI Parameters
HideShow
name
string (required) 

The unique identifier for the service account (required)

Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Body
{
   "token":"4cbddcfd-a5ca-4d6e-acc5-4f5db3c9548f",
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "required": false
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "token": "4cbddcfd-a5ca-4d6e-acc5-4f5db3c9548f"
}
Response  400
HideShow
Headers
Content-Type: text/plain
Body
The requested service account does not exist.
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "manage" permission.

Permissions

These endpoints all return enumerations of permissions that can be included when creating or editing groups.

List namespace permissions
GET/api/v1/permission/namespace

Returns all the available namespace permissions, with a type that should be included in group requested, and a name that is a human readable version.

Example URI

GET /api/v1/permission/namespace
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "type": "CreateTopic",
    "name": "Create Topic",
    "system": "Kafka"
  },
  {
    "type": "DropTopic",
    "name": "Delete Topic",
    "system": "Kafka"
  },
  {
    "type": "ConfigureTopic",
    "name": "Configure Topic",
    "system": "Kafka"
  },
  {
    "type": "QueryTopic",
    "name": "View Data",
    "system": "Kafka"
  },
  {
    "type": "ShowTopic",
    "name": "Show Topic",
    "system": "Kafka"
  },
  {
    "type": "ViewSchema",
    "name": "View Topic Metadata",
    "system": "Kafka"
  },
  {
    "type": "InsertData",
    "name": "Insert Data",
    "system": "Kafka"
  },
  {
    "type": "DeleteData",
    "name": "Delete Data",
    "system": "Kafka"
  },
  {
    "type": "UpdateTablestore",
    "name": "Update Tablestore",
    "system": "Kafka"
  }
]
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "view" permission.

List scoped permissions
GET/api/v1/permission/scoped

Returns all the available scoped permissions, with a type that should be included in group requested, a name that is a human readable version, and two boolean flags which indicate if the permission can be set to viewable and / or manageable.

Example URI

GET /api/v1/permission/scoped
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "name": "Kafka Consumers",
    "viewable": "ViewKafkaConsumers",
    "manageable": "ManageKafkaConsumers"
  },
  {
    "name": "Kafka Connectors",
    "viewable": "ViewConnectors",
    "manageable": "ManageConnectors"
  },
  {
    "name": "SQL Processors",
    "viewable": "ViewSQLProcessors",
    "manageable": "ManageSQLProcessors"
  },
  {
    "name": "Schemas",
    "viewable": "ViewSchemaRegistry",
    "manageable": "ManageSchemaRegistry"
  },
  {
    "name": "Topology",
    "viewable": "ViewTopology",
    "manageable": "ManageTopology"
  }
]
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain

List admin permissions
GET/api/v1/permission/admin

Returns all the available admin permissions, with a type that should be included in group requested, a name that is a human readable version, and two boolean flags which indicate if the permission can be set to viewable and / or manageable.

Example URI

GET /api/v1/permission/admin
Request
HideShow
Headers
X-Kafka-Lenses-Token: XXXXX
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "name": "Data Policies",
    "viewable": "ViewDataPolicies",
    "manageable": "ManageDataPolicies"
  },
  {
    "name": "Audit Logs",
    "viewable": "ViewAuditLogs",
    "manageable": null
  },
  {
    "name": "User Management",
    "viewable": "ViewUsers",
    "manageable": "ManageUsers"
  },
  {
    "name": "Alert Rules",
    "viewable": "ViewAlertRules",
    "manageable": "ManageAlertRules"
  },
  {
    "name": "Kafka Settings",
    "viewable": "ViewKafkaSettings",
    "manageable": "ManageKafkaSettings"
  },
  {
    "name": "Connection Management",
    "viewable": null,
    "manageable": "ManageConnections"
  }
]
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the UserManagement "view" permission.

Consumers

APIs for managing Kafka consumer groups.

Offsets

APIs for managing Kafka consumer group offsets.

Bulk update offsets for a consumer group
PUT/api/consumers/{groupId}/offsets

Updates consumer group offsets for all partitions of multiple topics of a consumer group.

If the optional topics array is omitted, then all topics will be affected. Otherwise only the specified topics will be affected.

Accepts multiple types of request payload:

  • timestamp - sets partition offset to that of the first record with timestamp greater or equal to the target timestamp

  • start - resets partition offset to earliest offset

  • end - sets partition offset to latest offset

Example URI

PUT /api/consumers/MyGroup/offsets
URI Parameters
HideShow
groupId
string (required) Example: MyGroup

The consumer group ID

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXXX
Body
{
  "type": "timestamp",
  "target": "2019-01-01T17:16:02+01:00",
  "topics": [
    "TopicA",
    "TopicB"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "timestamp"
      ]
    },
    "target": {
      "type": "string",
      "description": "The target timestamp in ISO 8601 format"
    },
    "topics": {
      "type": "array"
    }
  },
  "required": [
    "type",
    "target"
  ]
}
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXXX
Body
{
  "type": "start",
  "topics": [
    "TopicA",
    "TopicB"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "start"
      ]
    },
    "topics": {
      "type": "array"
    }
  },
  "required": [
    "type"
  ]
}
Request
HideShow
  • HeadersBulkOffsetEnd X-Kafka-Lenses-Token: XXXXXX
Headers
Content-Type: application/json
Body
{
  "type": "end",
  "topics": [
    "TopicA",
    "TopicB"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "end"
      ]
    },
    "topics": {
      "type": "array"
    }
  },
  "required": [
    "type"
  ]
}
Response  200
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the necessary permissions.

Update a single offset of a consumer group
PUT/api/consumers/{groupId}/offsets/topics/{topicName}/partitions/{partitionId}

Updates consumer group offsets for a single partition of a single topic.

Accepts multiple types of request payload:

  • absolute - sets partition offset to the provided value

  • start - resets partition offset to earliest offset

  • end - sets partition offset to latest offset

Example URI

PUT /api/consumers/MyGroup/offsets/topics/MyTopic/partitions/1
URI Parameters
HideShow
groupId
string (required) Example: MyGroup

The consumer group ID

topicName
string (required) Example: MyTopic

The topic name

partitionId
number (required) Example: 1

The partition ID

Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXXX
Body
{
  "type": "absolute",
  "offset": 100
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "absolute"
      ]
    },
    "offset": {
      "type": "number"
    }
  },
  "required": [
    "type",
    "offset"
  ]
}
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXXX
Body
{
  "type": "start"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "start"
      ]
    }
  },
  "required": [
    "type"
  ]
}
Request
HideShow
Headers
Content-Type: application/json
X-Kafka-Lenses-Token: XXXXXX
Body
{
  "type": "end"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "end"
      ]
    }
  },
  "required": [
    "type"
  ]
}
Response  200
Response  401
HideShow
Headers
Content-Type: text/plain
Body
The request is unauthenticated
Response  403
HideShow
Headers
Content-Type: text/plain
Body
The client does not have the necessary permissions.

Generated by aglio on 10 Apr 2020