Lenses API Spec
API reference documentation for Lenses.
Last updated
Was this helpful?
API reference documentation for Lenses.
Last updated
Was this helpful?
Starts a session given a username/password and puts it into a cookie.
/v1/login
No body
Lists all environments
/v1/environments
Creates a new environment.
/v1/environments
Sets the name of the new environment. It must be a valid HQ resource name: it can only contain lowercase alphanumeric characters or hyphens; hyphens cannot appear at the end or start; the length is 63 characters at most.
Sets the display name of the new environment. If not provided, the value of "name" will be used.
Enumerates Tiers.
development
, staging
, production
Allows attaching custom string key/values to resources. The following maxima apply:
Retrieves a single environment by name.
/v1/environments/{name}
Updates an environment.
/v1/environments/{name}
Enumerates Tiers.
development
, staging
, production
Patches metadata. It has the following semantics:
Updates the display name of the environment.
Deletes an environment.
/v1/environments/{name}
No body
Proxies HTTP to a Lenses instance. Note: this is not a regular HTTP API endpoint. The path specified here is a prefix. Everything beneath it gets proxied to the corresponding Lenses instance. Any request body and method (the GET here is only a placeholder) are accepted, as long as the Lenses API accepts it. The connection can even be upgraded to a websocket. The status code and response body are controlled by the Lenses API. This concept does not fit into the OpenAPI world at all; this definition is only here for the sake of documentation to avoid having an undocumented dark matter API.
/v1/environments/{name}/proxy/
Get a single dataset by connection/name. While information mastered externally might be a few second out of sync with their respective sources (e.g. JMX metadata, Elasticsearch index status, etc), information mastered in Lenses's db is guaranteed to be up to date (e.g. tags, descriptions).
/v1/environments/{name}/proxy/api/v1/datasets/{connection}//{dataset}
kafka
customer-positions
Retrieves a list of datasets
/v1/environments/{name}/proxy/api/v1/datasets
The page number to be returned, must be greater than zero. Defaults to 1.
1
The elements amount on a single page, must be greater than zero.
25
A search keyword to match dataset, fields and description against.
name
The field to sort results by
name
, records
, connectionName
, sourceType
, isSystemEntity
, recordsPerSecond
, keyType
, valueType
, replication
, consumers
, partitions
, retentionBytes
, retentionMs
, sizeBytes
, replicas
, shard
, version
, format
, compatibility
, backupRestoreState
Sorting order. Defaults to ascending
asc
, desc
A flag to include in the search also system entities (e.g. Kafka's __consumer_offsets
topic).
Whether to search only by table name, or also to include field names/documentation (defaults to true)
Filter based on whether the dataset has records
Filter based on compacted. Relevant only when sourceType is Kafka
Retrieves a list of dataset tags
/v1/environments/{name}/proxy/api/v1/datasets/tags
Get tags sorted by dataset count
user
Lists all groups
/v1/groups
Creates a new Group.
/v1/groups
Sets the unique name of the new group. It must be a valid HQ resource name: it can only contain lowercase alphanumeric characters or hyphens; hyphens cannot appear at the end or start; the length is 63 characters at most.
Sets the display name of the new group. If not provided, the value of "name" will be used.
Sets the description of the new group.
Allows attaching custom string key/values to resources. The following maxima apply:
Gets a group by its name.
/v1/groups/{name}
Returns all users
/v1/users
Deletes a group.
/v1/groups/{name}
No body
Updates a group.
/v1/groups/{name}
Updates the display name of the group.
Updates the Group description, if a value is provided.
Patches metadata. It has the following semantics:
Creates a new user.
/v1/users
Sets the unique name of the new user. It must be a valid HQ resource name: it can only contain lowercase alphanumeric characters or hyphens; hyphens cannot appear at the end or start; the length is 63 characters at most.
Sets the display name of the new user. If not provided, the value of "name" will be used.
Allows attaching custom string key/values to resources. The following maxima apply:
Returns a specific user
/v1/users/{name}
Updates a user.
/v1/users/{name}
Updates the display name of the user.
Patches metadata. It has the following semantics:
Deletes a user.
/v1/users/{name}
No body
Allows updating fields of the user profile.
/v1/users/{name}/profile
Contains the users' full name, e.g. Mary Jane Doe.
Contains the users' email address, e.g. mary.jane@doe.net. Note that this is not necessarily the same as the user's name, which often looks like an email address, but is not per se.
Returns the currently authenticated user
/v1/users/me
Assigns the given user exactly to the provided groups, ensuring they are not part of any other groups.
/v1/users/{name}/groups
The name of the user.
Starts a session given a username/password and puts it into a cookie.
/v1/login
No body
Deletes all sessions associated with the current user.
/v1/users/me/sessions
No body
Returns all ServiceAccounts.
/v1/service-accounts
Creates a new ServiceAccount.
/v1/service-accounts
Sets the unique name of the new service account. It must be a valid HQ resource name: it can only contain lowercase alphanumeric characters or hyphens; hyphens cannot appear at the end or start; the length is 63 characters at most.
Sets | the display name of the new service account. If not provided, the value of "name" will be used.
Sets the description of the new service account.
Determines the moment of token expiration. If not specified, the token will never expire.
Allows attaching custom string key/values to resources. The following maxima apply:
Returns a specific ServiceAccount.
/v1/service-accounts/{name}
Updates a service account.
/v1/service-accounts/{name}
Updates the display name of the service account.
Updates the description of a service account.
Patches metadata. It has the following semantics:
Deletes a ServiceAccount.
/v1/service-accounts/{name}
No body
Renews the service account's token. The current token is invalidated and a new one is generated. An optional expiration timestamp can be provided.
/v1/service-accounts/{name}/renew-token
Determines the moment of token expiration. If not specified, the token will never expire.
Assigns the given service account exactly to the provided groups, ensuring they are not part of any other groups.
/v1/service-accounts/{name}/groups
The name of the service account.
Returns all roles.
/v1/roles
Creates a new role.
/v1/roles
Sets the unique name of the new role. It must be a valid HQ resource name: it can only contain lowercase alphanumeric characters or hyphens; hyphens cannot appear at the end or start; the length is 63 characters at most.
Sets the display name of the new role. If not provided, the value of "name" will be used.
Allows attaching custom string key/values to resources. The following maxima apply:
Describes the effect for an action and resource.
Returns a specific role.
/v1/roles/{name}
Updates a role.
/v1/roles/{name}
Updates the display name of the role.
Patches metadata. It has the following semantics:
Describes the effect for an action and resource.
Deletes a role.
/v1/roles/{name}
No body
Returns the backend's meta information.
/v1/meta-info
Returns the backend's settings information.
/v1/settings
Returns HQ's licence.
/v1/licence
Returns HQ's licence summary.
/v1/licence-summary